Module Name: src
Committed By: mrg
Date: Sun Aug 12 00:01:50 UTC 2012
Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd-elf.h
Log Message:
pay attention to -pie: link crt{begin,end}S.o.
this fixes -fpie on sparc and sparc64, and probably others.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.3 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.4
--- src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.3 Fri Apr 27 00:57:44 2012
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h Sun Aug 12 00:01:50 2012
@@ -52,8 +52,11 @@ along with GCC; see the file COPYING3.
%{!p:crt0%O%s}}} \
%:if-exists(crti%O%s) \
%{static:%:if-exists-else(crtbeginT%O%s crtbegin%O%s)} \
- %{!static: \
- %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}}"
+ %{!static: \
+ %{!shared: \
+ %{!pie:crtbegin%O%s} \
+ %{pie:crtbeginS%O%s}} \
+ %{shared:crtbeginS%O%s}}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC NETBSD_STARTFILE_SPEC
@@ -64,7 +67,10 @@ along with GCC; see the file COPYING3.
C++ file-scope static objects deconstructed after exiting "main". */
#define NETBSD_ENDFILE_SPEC \
- "%{!shared:crtend%O%s} %{shared:crtendS%O%s} \
+ "%{!shared: \
+ %{!pie:crtend%O%s} \
+ %{pie:crtendS%O%s}} \
+ %{shared:crtendS%O%s} \
%:if-exists(crtn%O%s)"
#undef ENDFILE_SPEC