summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorPascal Stumpf <pascal@cvs.openbsd.org>2012-08-31 16:58:23 +0000
committerPascal Stumpf <pascal@cvs.openbsd.org>2012-08-31 16:58:23 +0000
commit3e2303c4b7aad976c062910cd68c83b254bf08bd (patch)
tree43488a79191e9c25ad01c8949ceeaf20f558b8a1 /gnu
parent725aefb0dfb045cc72874cf6b7bf303f145fda38 (diff)
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@
Diffstat (limited to 'gnu')
-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