This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add -static-pie to GCC driver to create static PIE
- From: Markus Trippelsdorf <markus at trippelsdorf dot de>
- To: Aaron Sawdey <acsawdey at linux dot vnet dot ibm dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Segher Boessenkool <segher at kernel dot crashing dot org>
- Date: Wed, 13 Sep 2017 08:57:39 +0200
- Subject: Re: [PATCH] Add -static-pie to GCC driver to create static PIE
- Authentication-results: sourceware.org; auth=none
- References: <20170808221841.GA16793@gmail.com> <alpine.DEB.2.20.1708281607010.13583@digraph.polyomino.org.uk> <CAMe9rOrHPm362i+YsUhf5br6kh3UkDSs5RBX=xz4JVAmPBc4Yg@mail.gmail.com> <alpine.DEB.2.20.1709121619500.28643@digraph.polyomino.org.uk> <1505242116.20208.1.camel@linux.vnet.ibm.com>
On 2017.09.12 at 13:48 -0500, Aaron Sawdey wrote:
> On Tue, 2017-09-12 at 16:20 +0000, Joseph Myers wrote:
> > On Mon, 28 Aug 2017, H.J. Lu wrote:
> >
> > > Here is the updated patch. OK for trunk?
> >
> > OK.
>
> This seems to be causing an issue for me on powerpc:
>
> ../../trunk/gcc/config/rs6000/sysv4.h:819:0: error: "LINK_EH_SPEC" redefined [-Werror]
> # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
It will cause problems on other platforms as well:
gcc/config/alpha/elf.h:171:#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
gcc/config/alpha/vms.h:209:#define LINK_EH_SPEC "vms-dwarf2eh.o%s "
gcc/config/dragonfly.h:64:#define LINK_EH_SPEC "--eh-frame-hdr"
gcc/config/freebsd.h:48:#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
gcc/config/gnu-user.h:135:#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
gcc/config/netbsd.h:128:#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
gcc/config/openbsd.h:139:#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
gcc/config/powerpcspe/sysv4.h:808:# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
gcc/config/rs6000/sysv4.h:819:# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
gcc/config/sol2.h:375:#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
--
Markus