Commit a0f503a0 by Maya Rashish Committed by Jeff Law

re PR target/87221 (cannot build with -pie)

	PR target/87221
	* config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
	(NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.

From-SVN: r265994
parent e602e1f7
2018-11-09 Maya Rashish <coypu@sdf.org>
PR target/87221
* config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
(NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
2018-11-09 Sandra Loosemore <sandra@codesourcery.com> 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
PR driver/41179 PR driver/41179
...@@ -40,8 +40,11 @@ along with GCC; see the file COPYING3. If not see ...@@ -40,8 +40,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
...@@ -52,7 +55,10 @@ along with GCC; see the file COPYING3. If not see ...@@ -52,7 +55,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment