From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>,
libc-alpha@sourceware.org,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: Re: [PATCH] csu: Fix static when PIE is enabled but static PIE is not supported (BZ #29575)
Date: Thu, 6 Oct 2022 16:41:44 -0300 [thread overview]
Message-ID: <d53902f7-7ffb-cae2-1a18-6481d06b7e40@linaro.org> (raw)
In-Reply-To: <05cc7966-d9fe-3241-d48b-35457ea094a4@sourceware.org>
On 06/10/22 15:21, Siddhesh Poyarekar wrote:
> On 2022-10-06 14:09, Adhemerval Zanella Netto wrote:
>>
>>
>> On 05/10/22 16:04, Siddhesh Poyarekar wrote:
>>>
>>>
>>> On 2022-10-05 13:08, Adhemerval Zanella wrote:
>>>> On architectures where static PIE is not supported, both libc and
>>>> static binaries are built still with -fPIE and -DPIC. It leads to
>>>> wrong code for some architectures (for instance sparc).
>>>>
>>>> This patch only enables -DPIC for .o files iff static-pie is also
>>>> supported. Since the same rule is used for both libc.a objects and
>>>> installed binaries, the -fno-pie is added if static-pie is not
>>>> supported (with a strategy similar to how stack protector is
>>>> disabled for some architectures).
>>>>
>>>> Checked on x86_64-linux-gnu (with and without --disable-static-pie)
>>>> and I also checked on sparc64-linux-gnu to verify that static binaries
>>>> are not broken and both binaries and tests continue to be built
>>>> for PIE.
>>>> ---
>>>
>>> It should be --disable-default-pie. Can you please check again and confirm?
>>
>> My mistake, I did use --disable-default-pie (the config.make files on
>> sparc64 build differs for build-pie-default).
>
> OK then it looks good with the typo fixed.
>
> Thanks,
> Sid
Sigh... it is not correct if gcc has --enable-default-pie.
next prev parent reply other threads:[~2022-10-06 19:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 17:08 Adhemerval Zanella
2022-10-05 19:04 ` Siddhesh Poyarekar
2022-10-06 18:09 ` Adhemerval Zanella Netto
2022-10-06 18:21 ` Siddhesh Poyarekar
2022-10-06 19:41 ` Adhemerval Zanella Netto [this message]
2022-11-06 15:14 ` John Paul Adrian Glaubitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d53902f7-7ffb-cae2-1a18-6481d06b7e40@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=libc-alpha@sourceware.org \
--cc=siddhesh@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).