aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/freebsd-spec.h
diff options
context:
space:
mode:
authorAndreas Tobler <andreast@gcc.gnu.org>2015-05-18 20:37:18 +0200
committerAndreas Tobler <andreast@gcc.gnu.org>2015-05-18 20:37:18 +0200
commit8ea0dcb9e0ccebfc03bbe1b52a096c65c8e4d11c (patch)
tree033adad23885c4a7d4ef4c6de9ccd9fc3062f4bb /gcc/config/freebsd-spec.h
parentf41aecf4283f14f54fb0774103fbf7931dff2aa3 (diff)
downloadgcc-8ea0dcb9e0ccebfc03bbe1b52a096c65c8e4d11c.zip
gcc-8ea0dcb9e0ccebfc03bbe1b52a096c65c8e4d11c.tar.gz
gcc-8ea0dcb9e0ccebfc03bbe1b52a096c65c8e4d11c.tar.bz2
freebsd-spec.h (FBSD_STARTFILE_SPEC): Add the bits to build pie executables.
2015-05-18 Andreas Tobler <andreast@gcc.gnu.org> gcc: * config/freebsd-spec.h (FBSD_STARTFILE_SPEC): Add the bits to build pie executables. (FBSD_ENDFILE_SPEC): Likewise. * config/i386/freebsd.h (STARTFILE_SPEC): Remove and use the one from config/freebsd-spec.h. (ENDFILE_SPEC): Likewise. gcc/testsuite: * lib/target-supports.exp (check_effective_target_pie): Add *-*-freebsd* to the family of pie capable targets. From-SVN: r223308
Diffstat (limited to 'gcc/config/freebsd-spec.h')
-rw-r--r--gcc/config/freebsd-spec.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h
index e3fa912..9341db78 100644
--- a/gcc/config/freebsd-spec.h
+++ b/gcc/config/freebsd-spec.h
@@ -66,8 +66,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
%{!p:%{profile:gcrt1.o%s} \
- %{!profile:crt1.o%s}}}} \
- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+ %{!profile: \
+ %{pie: Scrt1.o%s;:crt1.o%s}}}}} \
+ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
the magical crtend.o file (see crtstuff.c) which provides part of
@@ -76,7 +77,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
`crtn.o'. */
#define FBSD_ENDFILE_SPEC \
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+ "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
/* Provide a LIB_SPEC appropriate for FreeBSD as configured and as
required by the user-land thread model. Before __FreeBSD_version