This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Replece LDFLAGS-* = $(no-pie-ldflag) with tst-*-no-pie = yes [BZ #22630]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 19 Dec 2017 18:01:16 +0000
- Subject: Re: [PATCH] Replece LDFLAGS-* = $(no-pie-ldflag) with tst-*-no-pie = yes [BZ #22630]
- Authentication-results: sourceware.org; auth=none
- References: <20171219010728.GA3002@gmail.com> <alpine.DEB.firstname.lastname@example.org> <CAMe9rOoz_w281Nj-2pboBhn7zE6OFNWJXUksNNM=ZCz-A0qqJw@mail.gmail.com>
On Tue, 19 Dec 2017, H.J. Lu wrote:
> On Tue, Dec 19, 2017 at 9:07 AM, Joseph Myers <email@example.com> wrote:
> > On Mon, 18 Dec 2017, H.J. Lu wrote:
> >> $(no-pie-ldflag) is no longer effective since no-pie-ldflag is defined
> >> to -no-pie only if GCC defaults to PIE. When --enable-static-pie is
> >> used to configure glibc build and GCC doesn't default to PIE. no-pie-ldflag
> >> is undefined and these tests:
> >> elf/Makefile:LDFLAGS-tst-dlopen-aout = $(no-pie-ldflag)
> >> elf/Makefile:LDFLAGS-tst-prelink = $(no-pie-ldflag)
> >> elf/Makefile:LDFLAGS-tst-main1 = $(no-pie-ldflag)
> >> gmon/Makefile:LDFLAGS-tst-gmon := $(no-pie-ldflag)
> >> may fail to link. This patch replaces "-pie" with
> > Why is --enable-static-pie causing non-static test cases to be built as
> > PIE? I see nothing in the NEWS or INSTALL entries to indicate such an
> > effect. That looks like the underlying problem here.
> To build static PIE, all .o files need to compiled with -fPIE. Given all
> input .o files are compiled with -fPIE when creating an executable, should
> we generate PIE or nor no-PIE?
I'd expect a normal executable, in the case of dynamic executables, since
nothing about --enable-static-pie says it changes how non-static
executables are built.
Joseph S. Myers