re PR target/6123 (__pic__/__PIC__ not defined when -fpic/-fPIC is specified)
authorDaniel Jacobowitz <dan@codesourcery.com>
Tue, 16 Nov 2004 22:42:21 +0000 (22:42 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 16 Nov 2004 22:42:21 +0000 (22:42 +0000)
2004-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
            Mark Mitchell  <mark@codesourcery.com>

PR target/6123
* config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __PIC__ and
__pic__ if PIC.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r90770

gcc/ChangeLog
gcc/config/sol2.h

index 72729f4563f4c7bf691aca9418288ec55bbd49b6..600089338f6653371a8bc97cf801e63fa3a2d6fa 100644 (file)
@@ -1,3 +1,10 @@
+2004-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
+            Mark Mitchell  <mark@codesourcery.com>
+
+       PR target/6123
+       * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __PIC__ and
+       __pic__ if PIC.
+
 2004-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * regmove.c (regmove_optimize): Use lowpart_subreg instead of
index 07994e222508fc96fa22656c31d3606cd165edb4..86d359c178bd77efaf995d13afb85294fe0434dd 100644 (file)
@@ -72,6 +72,11 @@ Boston, MA 02111-1307, USA.  */
            builtin_define ("_LARGEFILE64_SOURCE=1");   \
            builtin_define ("__EXTENSIONS__");          \
          }                                             \
+       if (flag_pic)                                   \
+         {                                             \
+           builtin_define ("__PIC__");                 \
+           builtin_define ("__pic__");                 \
+         }                                             \
        TARGET_SUB_OS_CPP_BUILTINS();                   \
     } while (0)