OSDN Git Service

Index: gcc/ChangeLog
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Feb 2007 16:45:38 +0000 (16:45 +0000)
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Feb 2007 16:45:38 +0000 (16:45 +0000)
2007-02-20  Geoffrey Keating  <geoffk@apple.com>

* config/darwin.h (LINK_SPEC): Default -mmacosx-version-min only
if user didn't pass it.
* config/i386/darwin.h (CC1_SPEC): Likewise.
* config/rs6000/darwin.h (CC1_SPEC): Likewise.
(DARWIN_MINVERSION_SPEC): Don't depend on user's setting of
-mmacosx-version-min.

Index: gcc/testsuite/ChangeLog
2007-02-20  Geoffrey Keating  <geoffk@apple.com>

* gcc.dg/darwin-minversion-1.c: New.
* gcc.dg/darwin-minversion-2.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122166 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/darwin.h
gcc/config/i386/darwin.h
gcc/config/rs6000/darwin.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/darwin-minversion-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/darwin-minversion-2.c [new file with mode: 0644]

index 292bfbc..61e247b 100644 (file)
@@ -1,3 +1,12 @@
+2007-02-20  Geoffrey Keating  <geoffk@apple.com>
+
+       * config/darwin.h (LINK_SPEC): Default -mmacosx-version-min only
+       if user didn't pass it.
+       * config/i386/darwin.h (CC1_SPEC): Likewise.
+       * config/rs6000/darwin.h (CC1_SPEC): Likewise.
+       (DARWIN_MINVERSION_SPEC): Don't depend on user's setting of
+       -mmacosx-version-min.
+
 2007-02-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
            Uros Bizjak  <ubizjak@gmail.com>
 
index 7070072..43c7937 100644 (file)
@@ -297,7 +297,8 @@ extern GTY(()) int darwin_ms_struct;
    %{headerpad_max_install_names*} \
    %{Zimage_base*:-image_base %*} \
    %{Zinit*:-init %*} \
-   -macosx_version_min %(darwin_minversion) \
+   %{!mmacosx-version-min=*:-macosx_version_min %(darwin_minversion)} \
+   %{mmacosx-version-min=*:-macosx_version_min %*} \
    %{nomultidefs} \
    %{Zmulti_module:-multi_module} %{Zsingle_module:-single_module} \
    %{Zmultiply_defined*:-multiply_defined %*} \
index c00a791..e507d59 100644 (file)
@@ -74,7 +74,7 @@ Boston, MA 02110-1301, USA.  */
 
 #undef CC1_SPEC
 #define CC1_SPEC "%{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}} \
-  -mmacosx-version-min=%(darwin_minversion) \
+  %{!mmacosx-version-min=*:-mmacosx-version-min=%(darwin_minversion)} \
   %{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }}"
 
 #undef ASM_SPEC
index 9a000c8..6aa7d65 100644 (file)
@@ -93,7 +93,7 @@
 #define CC1_SPEC "\
   %{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }} \
   %{static: %{Zdynamic: %e conflicting code gen style switches are used}}\
-  -mmacosx-version-min=%(darwin_minversion) \
+  %{!mmacosx-version-min=*:-mmacosx-version-min=%(darwin_minversion)} \
   %{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}}"
 
 #define DARWIN_ARCH_SPEC "%{m64:ppc64;:ppc}"
 
 /* Determine a minimum version based on compiler options.  */
 #define DARWIN_MINVERSION_SPEC \
-  "%{mmacosx-version-min=*:%*; \
-     m64:10.4;                 \
+  "%{m64:10.4;                 \
      shared-libgcc:10.3;       \
      :10.1}"
 
index 80c712c..d1e67da 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-20  Geoffrey Keating  <geoffk@apple.com>
+
+       * gcc.dg/darwin-minversion-1.c: New.
+       * gcc.dg/darwin-minversion-2.c: New.
+
 2007-02-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * gcc.dg/builtins-34.c: Add scalb/scalbn/scalbln cases.
diff --git a/gcc/testsuite/gcc.dg/darwin-minversion-1.c b/gcc/testsuite/gcc.dg/darwin-minversion-1.c
new file mode 100644 (file)
index 0000000..d8a3243
--- /dev/null
@@ -0,0 +1,11 @@
+/* Basic test for -mmacosx-version-min switch on Darwin.  */
+/* { dg-options "-mmacosx-version-min=10.1" } */
+/* { dg-do run { target *-*-darwin* } } */
+
+int main(void)
+{
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1010
+  fail me;
+#endif
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/darwin-minversion-2.c b/gcc/testsuite/gcc.dg/darwin-minversion-2.c
new file mode 100644 (file)
index 0000000..fd4975a
--- /dev/null
@@ -0,0 +1,11 @@
+/* Basic test for -mmacosx-version-min switch on Darwin.  */
+/* { dg-options "-mmacosx-version-min=10.1 -mmacosx-version-min=10.3" } */
+/* { dg-do run { target *-*-darwin* } } */
+
+int main(void)
+{
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1030
+  fail me;
+#endif
+  return 0;
+}