This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PING^N: [PATCH] Add --enable-static-pie to build static PIE [BZ #19574]
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 1 Dec 2017 09:58:55 +0000
- 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> <CAMe9rOrWi1W+F6K3TRL-2ipz-K4e0aP0ywsVg0XWgdCU1FV7OQ@mail.gmail.com> <CAMe9rOrTW7-JBtfOWjQrqMtS6Kp8efsAAbouFwQOnaAzh=sNpA@mail.gmail.com> <CAMe9rOr5qR-MnP+bEY_3OPdPK1qTnn_7JLi3Xn688E9JWKr1Zw@mail.gmail.com> <5A12C781.3030700@arm.com> <CAMe9rOohYeS4BJFp=TB4Zz26V4K2n8ZXSJX9kYqgEa=eW+w1xQ@mail.gmail.com> <5A18196C.90208@arm.com> <CAMe9rOqFfabivUDke1_ZxyEtV+L9T7VwKKdsdnR9M418L2TQBg@mail.gmail.com> <CAMe9rOpNdwd52vEnAUzOkmwkJXUWZz9-=dc9xfeZ96CYVM=8gQ@mail.gmail.com> <02278c7c-ade4-c8f2-c978-e66f77a101bd@redhat.com> <alpine.DEB.2.00.1711302227190.31156@tp.orcam.me.uk> <CAMe9rOpDRknZANuSvXAqU_qaXzGRjt=uY5BZLJoE_o9Ke+9yfw@mail.gmail.com> <alpine.DEB.2.00.1711302308170.31156@tp.orcam.me.uk> <CAMe9rOoaP=LT16Ee=-MOsL=zpem5XDjo4avhkJgC38FbeqSF4w@mail.gmail.com> <alpine.DEB.2.00.1712010142540.31156@tp.orcam.me.uk> <CAMe9rOq=9Fah3OB65VJ_J+jyQGAOPH9cnSzwm4516tUAM0-x_A@mail.gmail.com>
On Thu, 30 Nov 2017, H.J. Lu wrote:
> This patch fixes mips build with --enable-static-pie:
>
> diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile
> index fd891ddf09..7ac6fa5031 100644
> --- a/sysdeps/mips/Makefile
> +++ b/sysdeps/mips/Makefile
> @@ -23,6 +23,9 @@ CPPFLAGS-crtn.S += $(pic-ccflag)
> endif
>
> ASFLAGS-.os += $(pic-ccflag)
> +# libc.a and libc_p.a must be compiled with -fPIE/-fpie for static PIE.
> +ASFLAGS-.o += $(pie-default)
> +ASFLAGS-.op += $(pie-default)
>
> ifeq ($(subdir),elf)
> ifneq ($(o32-fpabi),)
>
> 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.
Perhaps Joseph would be kind enough, as the MIPS port maintainer --
Joseph?
Maciej