diff options
author | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-08-30 18:31:38 +0000 |
---|---|---|
committer | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-08-30 18:31:38 +0000 |
commit | e7c7e9598c5cbddf239208bce0b11399996b5032 (patch) | |
tree | 8db247f3530945caac1e3a9ccb1c5ea3bd86365a /gnu | |
parent | 40d7126d6783c87afc99d8afb88d9585d07d0c83 (diff) |
On sparc64, we still need to pass -K PIC to the assembler when compiling PIE.
Found out the hard way by deraadt@.
ok kettenis@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/gcc/gcc/config/sparc/openbsd64.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/gcc/gcc/config/sparc/openbsd64.h b/gnu/gcc/gcc/config/sparc/openbsd64.h index 33fa8f75a3c..dc419b97f8b 100644 --- a/gnu/gcc/gcc/config/sparc/openbsd64.h +++ b/gnu/gcc/gcc/config/sparc/openbsd64.h @@ -52,11 +52,19 @@ Boston, MA 02110-1301, USA. */ #undef NO_IMPLICIT_EXTERN_C #undef ASM_SPEC +#ifdef PIE_DEFAULT +#define ASM_SPEC "\ +%{v:-V} -s %{fpic|fPIC:-K PIC} %{!fno-pie: %{!p: %{!pg: -K PIC}}} \ +%{mlittle-endian:-EL} \ +%(asm_cpu) %(asm_arch) \ +" +#else #define ASM_SPEC "\ %{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \ %{mlittle-endian:-EL} \ %(asm_cpu) %(asm_arch) \ " +#endif /* Layout of source language data types. */ #undef WCHAR_TYPE |