summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpascal <pascal@openbsd.org>2012-08-31 16:58:22 +0000
committerpascal <pascal@openbsd.org>2012-08-31 16:58:22 +0000
commita083a04744fd950a5048e825a4048058e0f389c2 (patch)
tree3db1e8846040f361ddf2aa034e5f758ab91ea526
parentdocument SUBST_CMD* again, hopefully for the last time. (diff)
downloadwireguard-openbsd-a083a04744fd950a5048e825a4048058e0f389c2.tar.xz
wireguard-openbsd-a083a04744fd950a5048e825a4048058e0f389c2.zip
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@
-rw-r--r--gnu/gcc/gcc/config/sparc/openbsd.h8
1 files changed, 8 insertions, 0 deletions
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