darwin-c.c (darwin_cpp_builtins): Move __STATIC__ and __DYNAMIC__ from here back...
authorMike Stump <mrs@apple.com>
Fri, 27 Oct 2006 17:47:38 +0000 (17:47 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Fri, 27 Oct 2006 17:47:38 +0000 (17:47 +0000)
* config/darwin-c.c (darwin_cpp_builtins): Move __STATIC__ and
__DYNAMIC__ from here back to ...
* config/darwin.h (CPP_SPEC): ... here.
Radar 4804385

From-SVN: r118082

gcc/ChangeLog
gcc/config/darwin-c.c
gcc/config/darwin.h

index c4699707b092456d0d6192c45ff25bde6b59ce53..36f08661d4a1797395355ac68f086ac7466438ec 100644 (file)
@@ -1,3 +1,9 @@
+2006-10-27  Mike Stump  <mrs@apple.com>
+
+       * config/darwin-c.c (darwin_cpp_builtins): Move __STATIC__ and
+       __DYNAMIC__ from here back to ...
+       * config/darwin.h (CPP_SPEC): ... here.
+
 2006-10-26  Nathan Froyd  <froydnj@codesourcery.com>
             Nathan Sidwell  <nathan@codesourcery.com>
 
index 51dbf5c956056c3e9bd0bf9b7564478a5d786cfe..88ce9ef54d59aaa25d29b5f3bdb20203d0b918ff 100644 (file)
@@ -619,9 +619,4 @@ darwin_cpp_builtins (cpp_reader *pfile)
   if (darwin_macosx_version_min)
     builtin_define_with_value ("__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__",
                               version_as_macro(), false);
-
-  if (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
-    builtin_define ("__DYNAMIC__");
-  else
-    builtin_define ("__STATIC__");
 }
index 21f909d41079ab917d795528fa9934aa775f172f..43288f758e5e917f8982610bb9f5f614ef92b747 100644 (file)
@@ -214,7 +214,7 @@ extern GTY(()) int darwin_ms_struct;
    them to darwin_cpp_builtins in darwin-c.c.  */
 
 #undef CPP_SPEC
-#define CPP_SPEC ""
+#define CPP_SPEC "%{static:%{!dynamic:-D__STATIC__}}%{!static:-D__DYNAMIC__}"
 
 /* This is mostly a clone of the standard LINK_COMMAND_SPEC, plus
    precomp, libtool, and fat build additions.  Also we