pay attention to -pie: link crt{begin,end}S.o.
this fixes -fpie on sparc and sparc64, and probably others.
This commit is contained in:
parent
924aafb1e9
commit
99a54d3479
12
external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
vendored
12
external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
vendored
@ -52,8 +52,11 @@ along with GCC; see the file COPYING3. If not see
|
|||||||
%{!p:crt0%O%s}}} \
|
%{!p:crt0%O%s}}} \
|
||||||
%:if-exists(crti%O%s) \
|
%:if-exists(crti%O%s) \
|
||||||
%{static:%:if-exists-else(crtbeginT%O%s crtbegin%O%s)} \
|
%{static:%:if-exists-else(crtbeginT%O%s crtbegin%O%s)} \
|
||||||
%{!static: \
|
%{!static: \
|
||||||
%{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}}"
|
%{!shared: \
|
||||||
|
%{!pie:crtbegin%O%s} \
|
||||||
|
%{pie:crtbeginS%O%s}} \
|
||||||
|
%{shared:crtbeginS%O%s}}"
|
||||||
|
|
||||||
#undef STARTFILE_SPEC
|
#undef STARTFILE_SPEC
|
||||||
#define STARTFILE_SPEC NETBSD_STARTFILE_SPEC
|
#define STARTFILE_SPEC NETBSD_STARTFILE_SPEC
|
||||||
@ -64,7 +67,10 @@ along with GCC; see the file COPYING3. If not see
|
|||||||
C++ file-scope static objects deconstructed after exiting "main". */
|
C++ file-scope static objects deconstructed after exiting "main". */
|
||||||
|
|
||||||
#define NETBSD_ENDFILE_SPEC \
|
#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)"
|
%:if-exists(crtn%O%s)"
|
||||||
|
|
||||||
#undef ENDFILE_SPEC
|
#undef ENDFILE_SPEC
|
||||||
|
Loading…
Reference in New Issue
Block a user