This is the mail archive of the
mailing list for the glibc project.
Re: PING^N: [PATCH] Add --enable-static-pie to build static PIE [BZ #19574]
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: "Maciej W. Rozycki" <macro at mips dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 1 Dec 2017 05:35:00 -0800
- Subject: Re: PING^N: [PATCH] Add --enable-static-pie to build static PIE [BZ #19574]
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOoyPf-77=cqmEW5Vg2KHwq48g6giW38qpA=oDUsnHaxCA@mail.gmail.com> <CAMe9rOrTW7-JBtfOWjQrqMtS6Kp8efsAAbouFwQOnaAzh=sNpA@mail.gmail.com> <CAMe9rOr5qR-MnP+bEY_3OPdPK1qTnn_7JLi3Xn688E9JWKr1Zw@mail.gmail.com> <5A12C781.email@example.com> <CAMe9rOohYeS4BJFp=TB4Zz26V4K2n8ZXSJX9kYqgEa=eW+w1xQ@mail.gmail.com> <5A18196C.firstname.lastname@example.org> <CAMe9rOqFfabivUDke1_ZxyEtV+L9T7VwKKdsdnR9M418L2TQBg@mail.gmail.com> <CAMe9rOpNdwd52vEnAUzOkmwkJXUWZz9-=dc9xfeZ96CYVM=8gQ@mail.gmail.com> <email@example.com> <alpine.DEB.firstname.lastname@example.org> <CAMe9rOpDRknZANuSvXAqU_qaXzGRjt=uY5BZLJoE_o9Keemail@example.com> <alpine.DEB.firstname.lastname@example.org> <CAMe9rOoaP=LT16Ee=-MOsL=zpem5XDjo4avhkJgC38FbeqSF4w@mail.gmail.com> <alpine.DEB.email@example.com> <CAMe9rOq=9Fah3OB65VJ_J+jyQGAOPH9cnSzwm4516tUAM0-x_A@mail.gmail.com> <alpine.DEB.firstname.lastname@example.org> <alpine.DEB.email@example.com>
On Fri, Dec 1, 2017 at 4:27 AM, Joseph Myers <firstname.lastname@example.org> 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
> 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.