diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-10-23 17:53:49 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-10-23 17:53:49 +0000 |
commit | 5a014e3963ac3b6ff70c6453c1dabd33d7f2f4c4 (patch) | |
tree | 2c577a6c5f2983bb4f53a6db35bf2587ee701c44 | |
parent | f729d979c70b3f5c29483f2c8cb09f26c65d5b35 (diff) |
Define __PIE__ and __pie__ when compiling PIE code, just like newer versions
of GCC do.
ok millert@, guenther@, pascal@, deraadt@
-rw-r--r-- | gnu/gcc/gcc/c-cppbuiltin.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/gcc/gcc/c-cppbuiltin.c b/gnu/gcc/gcc/c-cppbuiltin.c index 45e2acbf88a..0d2a53c959b 100644 --- a/gnu/gcc/gcc/c-cppbuiltin.c +++ b/gnu/gcc/gcc/c-cppbuiltin.c @@ -517,6 +517,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__"); |