summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2015-07-03 11:16:43 +0000
committermiod <miod@openbsd.org>2015-07-03 11:16:43 +0000
commit179d29c70e2d0656e34ee2bb697a58d72abe5d89 (patch)
tree1156802b13e54c2ed93bfc2a116408bca26b34ff
parentCorrectly handle relative-type relocations; very old ld.so bug which got (diff)
downloadwireguard-openbsd-179d29c70e2d0656e34ee2bb697a58d72abe5d89.tar.xz
wireguard-openbsd-179d29c70e2d0656e34ee2bb697a58d72abe5d89.zip
Link static pie binaries against rcrt0.o
-rw-r--r--gnu/gcc/gcc/config/sparc/openbsd.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/gcc/gcc/config/sparc/openbsd.h b/gnu/gcc/gcc/config/sparc/openbsd.h
index 6a51ce81f8a..907928aa5f0 100644
--- a/gnu/gcc/gcc/config/sparc/openbsd.h
+++ b/gnu/gcc/gcc/config/sparc/openbsd.h
@@ -88,8 +88,9 @@ Boston, MA 02110-1301, USA. */
/* As an elf system, we need crtbegin/crtend stuff. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "\
- %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
- crtbegin%O%s} %{shared:crtbeginS%O%s}"
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \
+ %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \
+ %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"