diff options
author | Richard Sandiford <richard@codesourcery.com> | 2007-03-21 09:07:19 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-03-21 09:07:19 +0000 |
commit | 7c0ffd09f85799e9ce4b8625b7e951c6f2fd2ae5 (patch) | |
tree | 852f997ceb3609aa6610cf48316a27f5c8e6614a /gcc | |
parent | 9f2966203fa776ec02ce2963ca1c6aeb1473234b (diff) | |
download | gcc-7c0ffd09f85799e9ce4b8625b7e951c6f2fd2ae5.zip gcc-7c0ffd09f85799e9ce4b8625b7e951c6f2fd2ae5.tar.gz gcc-7c0ffd09f85799e9ce4b8625b7e951c6f2fd2ae5.tar.bz2 |
invoke.texi (-fpie, -fPIE): Document __pie__ and __PIE__.
gcc/
* doc/invoke.texi (-fpie, -fPIE): Document __pie__ and __PIE__.
* c-cppbuiltin.c (c_cpp_builtins): Define them.
From-SVN: r123104
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-cppbuiltin.c | 5 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a3db8db..c2bcf89 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-03-21 Richard Sandiford <richard@codesourcery.com> + + * doc/invoke.texi (-fpie, -fPIE): Document __pie__ and __PIE__. + * c-cppbuiltin.c (c_cpp_builtins): Define them. + 2007-03-20 Mark Mitchell <mark@codesourcery.com> * config/arm/elf.h (TARGET_ASM_DESTRUCTOR): Define. diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c index 0239a1c..e9f608e 100644 --- a/gcc/c-cppbuiltin.c +++ b/gcc/c-cppbuiltin.c @@ -532,6 +532,11 @@ c_cpp_builtins (cpp_reader *pfile) builtin_define_with_int_value ("__pic__", flag_pic); builtin_define_with_int_value ("__PIC__", flag_pic); } + if (flag_pie) + { + builtin_define_with_int_value ("__pie__", flag_pie); + builtin_define_with_int_value ("__PIE__", flag_pie); + } if (flag_iso) cpp_define (pfile, "__STRICT_ANSI__"); diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b11681b..f2451c3 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -14210,6 +14210,10 @@ generated position independent code can be only linked into executables. Usually these options are used when @option{-pie} GCC option will be used during linking. +@option{-fpie} and @option{-fPIE} both define the macros +@code{__pie__} and @code{__PIE__}. The macros have the value 1 +for @option{-fpie} and 2 for @option{-fPIE}. + @item -fno-jump-tables @opindex fno-jump-tables Do not use jump tables for switch statements even where it would be |