summaryrefslogtreecommitdiff
path: root/gnu/gcc
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-10-23 17:53:49 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-10-23 17:53:49 +0000
commit5a014e3963ac3b6ff70c6453c1dabd33d7f2f4c4 (patch)
tree2c577a6c5f2983bb4f53a6db35bf2587ee701c44 /gnu/gcc
parentf729d979c70b3f5c29483f2c8cb09f26c65d5b35 (diff)
Define __PIE__ and __pie__ when compiling PIE code, just like newer versions
of GCC do. ok millert@, guenther@, pascal@, deraadt@
Diffstat (limited to 'gnu/gcc')
-rw-r--r--gnu/gcc/gcc/c-cppbuiltin.c5
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__");