-static-pie and -static -pie

2018-01-30 Thread Cory Fields
Hi list I'm playing with -static-pie and musl, which seems to be in good shape for 8.0.0. Nice work :) However, the fact that "gcc -static -pie" and "gcc -static-pie" produce different results is very unexpected. I understand the case for the new link-type, but merging the options when possible w

Re: -static-pie and -static -pie

2018-01-30 Thread H.J. Lu
On Tue, Jan 30, 2018 at 10:26 AM, Cory Fields wrote: > Hi list > > I'm playing with -static-pie and musl, which seems to be in good shape > for 8.0.0. Nice work :) > > However, the fact that "gcc -static -pie" and "gcc -static-pie" > produce different results is very unexpected. I understand the c

Re: -static-pie and -static -pie

2018-01-30 Thread Cory Fields
On Tue, Jan 30, 2018 at 1:35 PM, H.J. Lu wrote: > On Tue, Jan 30, 2018 at 10:26 AM, Cory Fields wrote: >> Hi list >> >> I'm playing with -static-pie and musl, which seems to be in good shape >> for 8.0.0. Nice work :) >> >> However, the fact that "gcc -static -pie" and "gcc -static-pie" >> produc

Re: -static-pie and -static -pie

2018-01-30 Thread H.J. Lu
On Tue, Jan 30, 2018 at 11:07 AM, Cory Fields wrote: > On Tue, Jan 30, 2018 at 1:35 PM, H.J. Lu wrote: >> On Tue, Jan 30, 2018 at 10:26 AM, Cory Fields wrote: >>> Hi list >>> >>> I'm playing with -static-pie and musl, which seems to be in good shape >>> for 8.0.0. Nice work :) >>> >>> However, t

Re: -static-pie and -static -pie

2018-01-30 Thread Cory Fields
On Tue, Jan 30, 2018 at 2:14 PM, H.J. Lu wrote: > On Tue, Jan 30, 2018 at 11:07 AM, Cory Fields wrote: >> On Tue, Jan 30, 2018 at 1:35 PM, H.J. Lu wrote: >>> On Tue, Jan 30, 2018 at 10:26 AM, Cory Fields wrote: Hi list I'm playing with -static-pie and musl, which seems to be in g

Re: -static-pie and -static -pie

2018-01-30 Thread H.J. Lu
On Tue, Jan 30, 2018 at 11:18 AM, Cory Fields wrote: > On Tue, Jan 30, 2018 at 2:14 PM, H.J. Lu wrote: >> On Tue, Jan 30, 2018 at 11:07 AM, Cory Fields wrote: >>> On Tue, Jan 30, 2018 at 1:35 PM, H.J. Lu wrote: On Tue, Jan 30, 2018 at 10:26 AM, Cory Fields wrote: > Hi list > >

Re: -static-pie and -static -pie

2018-01-31 Thread Cory Fields
After looking at this for quite a while, I'm afraid I'm unsure how to proceed. As of now, static and static-pie are mutually exclusive. So given the GNU_USER_TARGET_STARTFILE_SPEC you pasted earlier, "static" matches before "static-pie", causing the wrong start files. It seems to me that the stat

Re: -static-pie and -static -pie

2018-01-31 Thread H.J. Lu
On Wed, Jan 31, 2018 at 7:44 AM, Cory Fields wrote: > After looking at this for quite a while, I'm afraid I'm unsure how to proceed. > > As of now, static and static-pie are mutually exclusive. So given the > GNU_USER_TARGET_STARTFILE_SPEC you pasted > earlier, "static" matches before "static-pie"

Re: -static-pie and -static -pie

2018-01-31 Thread H.J. Lu
On Wed, Jan 31, 2018 at 7:56 AM, H.J. Lu wrote: > On Wed, Jan 31, 2018 at 7:44 AM, Cory Fields wrote: >> After looking at this for quite a while, I'm afraid I'm unsure how to >> proceed. >> >> As of now, static and static-pie are mutually exclusive. So given the >> GNU_USER_TARGET_STARTFILE_SPEC

Re: -static-pie and -static -pie

2018-02-02 Thread Szabolcs Nagy
passed to ld in LD_PIE_SPEC for static pie, not just on linux systems and selected targets.) then there should be no difference between -static -pie and -static-pie. (and the new -static-pie flag would be redundant.) this would e.g. break static linking with default pie toolchain on systems where

Re: -static-pie and -static -pie

2018-02-02 Thread Rich Felker
On Wed, Jan 31, 2018 at 07:58:31AM -0800, H.J. Lu wrote: > On Wed, Jan 31, 2018 at 7:56 AM, H.J. Lu wrote: > > On Wed, Jan 31, 2018 at 7:44 AM, Cory Fields wrote: > >> After looking at this for quite a while, I'm afraid I'm unsure how to > >> proceed. > >> > >> As of now, static and static-pie a

Re: -static-pie and -static -pie

2018-02-02 Thread Rich Felker
t; (and !static: to !static:%{!static-pie: etc.), > except where it is used to mean "no-pie static", > those should be changed to PIE_SPEC:;static: > (and i think --no-dynamic-linker should always > be passed to ld in LD_PIE_SPEC for static pie, > not just on linux systems an

Re: -static-pie and -static -pie

2018-02-02 Thread graham stott
Original message From: Rich Felker Date: 02/02/2018 18:32 (GMT+00:00) To: Szabolcs Nagy Cc: li...@coryfields.com, "H.J. Lu" , n...@arm.com, GCC Development Subject: Re: -static-pie and -static -pie On Fri, Feb 02, 2018 at 11:33:22AM +, Szabolcs