From 3e2303c4b7aad976c062910cd68c83b254bf08bd Mon Sep 17 00:00:00 2001 From: Pascal Stumpf Date: Fri, 31 Aug 2012 16:58:23 +0000 Subject: Apply to sparc the same change as to sparc64: Pass -K PIC to the assembler when we're default PIE. allows Theo to build PIE-by-default sparc; ok kettenis@ --- gnu/gcc/gcc/config/sparc/openbsd.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnu/gcc/gcc/config/sparc/openbsd.h b/gnu/gcc/gcc/config/sparc/openbsd.h index 693efc7e968..9ca87ad5170 100644 --- a/gnu/gcc/gcc/config/sparc/openbsd.h +++ b/gnu/gcc/gcc/config/sparc/openbsd.h @@ -36,11 +36,19 @@ Boston, MA 02110-1301, USA. */ #undef MD_STARTFILE_PREFIX #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 SIZE_TYPE -- cgit v1.2.3