This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PING^N: [PATCH] Add --enable-static-pie to build static PIE [BZ #19574]


On Fri, Dec 1, 2017 at 4:27 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Fri, 1 Dec 2017, Maciej W. Rozycki wrote:
>
>> > Can you try native mips build with --enable-static-pie using hjl/pie/static
>> > branch?
>>
>>  I'm not sure if I'm set up for a native glibc build right now, I haven't
>> done one for a while now.  I could try a cross build right away, however I
>> am too loaded with other stuff to commit to do testing for you at the
>> moment.
>
> I've not done native MIPS builds at all, but I don't think native versus
> cross is relevant here.  The main thing is that the wiki instructions, if
> and when this feature reaches consensus for inclusion on master, give
> sufficient information on what testing is needed of whether the feature
> works on a given architecture before that architecture can be removed from
> the list of those that haven't had execution testing (whether or not the
> build completes OK for them).  For example, are any special GCC configure
> options needed, or just the glibc configure option --enable-static-pie?
> Does GCC need to be a version (i.e. GCC 8 or later) that supports the
> -static-pie option in order to test this glibc feature?
>

GCC must support PIE to build static PIE glibc.  The main issue is linker.
Many ELF linker backends have various issues with PIE, especially
static PIE.  Other than those, there are no special requirements.

To use static PIE glibc to create static PIE with "gcc -static-pie", GCC 8
is needed.  I also have backported it to GCC 7 on hjl/pie/gcc-7-branch
branch in gcc git repo.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]