aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-cppbuiltin.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2005-11-22 03:09:59 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2005-11-22 03:09:59 +0000
commit3d119f8fec4569301afddf6f8e308cc0e1558091 (patch)
tree07d9f6c22713fe789abf1b85c1fcab98db070107 /gcc/c-cppbuiltin.c
parentd773588022f2e3c1bd166658b6c6c8bbba230ddf (diff)
downloadgcc-3d119f8fec4569301afddf6f8e308cc0e1558091.zip
gcc-3d119f8fec4569301afddf6f8e308cc0e1558091.tar.gz
gcc-3d119f8fec4569301afddf6f8e308cc0e1558091.tar.bz2
c-cppbuiltin.c (c_cpp_builtins): Define __pic__ and __PIC__ when flag_pic is set.
* c-cppbuiltin.c (c_cpp_builtins): Define __pic__ and __PIC__ when flag_pic is set. * config/alpha/freebsd.h, config/alpha/linux.h, config/arm/linux-elf.h, config/bfin/bfin.h, config/cris/linux.h, config/darwin.h, config/freebsd-spec.h, config/i386/beos-elf.h, config/i386/gnu.h, config/i386/linux.h, config/i386/linux64.h, config/i386/nto.h, config/i386/sco5.h, config/m32r/m32r.h, config/m68k/linux.h, config/m68k/m68k.h, config/mips/linux.h, config/pa/pa-linux.h, config/rs6000/linux64.h, config/rs6000/sysv4.h, config/rs6000/vxworks.h, config/s390/linux.h, config/s390/tpf.h, config/sh/linux.h, config/sh/sh.h, config/sol2.h, config/sparc/linux.h, config/sparc/linux64.h, config/xtensa/xtensa.h: Don't define __pic__ or __PIC__. * doc/invoke.texi: Document that the macros __pic__ and __PIC__ are both defined when either flag -fpic or -fPIC are used. From-SVN: r107347
Diffstat (limited to 'gcc/c-cppbuiltin.c')
-rw-r--r--gcc/c-cppbuiltin.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c
index 9020e0b..e0d6189 100644
--- a/gcc/c-cppbuiltin.c
+++ b/gcc/c-cppbuiltin.c
@@ -419,6 +419,11 @@ c_cpp_builtins (cpp_reader *pfile)
cpp_define (pfile, "__FINITE_MATH_ONLY__=1");
else
cpp_define (pfile, "__FINITE_MATH_ONLY__=0");
+ if (flag_pic)
+ {
+ builtin_define_with_int_value ("__pic__", flag_pic);
+ builtin_define_with_int_value ("__PIC__", flag_pic);
+ }
if (flag_iso)
cpp_define (pfile, "__STRICT_ANSI__");