diff options
author | 2013-01-11 21:25:05 +0000 | |
---|---|---|
committer | 2013-01-11 21:25:05 +0000 | |
commit | 7a02e9510eb04c05ab186a4b3aeccbb1f77ba2af (patch) | |
tree | 7fe98a4945c89eb9401064ba06c30cff7e86f15c | |
parent | Add END() directives to the various functions. (diff) | |
download | wireguard-openbsd-7a02e9510eb04c05ab186a4b3aeccbb1f77ba2af.tar.xz wireguard-openbsd-7a02e9510eb04c05ab186a4b3aeccbb1f77ba2af.zip |
Automagically define __PIC__ and __pic__ to 1 or 2, when building with
-fpic or -fPIC. Same for __PIE__ and __pie__; matches the behaviour of
the in-tree gcc 4.
-rw-r--r-- | gnu/usr.bin/gcc/gcc/c-common.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/gcc/c-common.c b/gnu/usr.bin/gcc/gcc/c-common.c index 3d51549959c..f850942c9f9 100644 --- a/gnu/usr.bin/gcc/gcc/c-common.c +++ b/gnu/usr.bin/gcc/gcc/c-common.c @@ -5004,6 +5004,17 @@ cb_register_builtins (pfile) 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_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__"); |