public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Replace --enable-static-pie with --disable-default-pie
Date: Tue, 7 Dec 2021 21:51:49 +0530	[thread overview]
Message-ID: <8b091d31-fff1-db57-1928-be9d2605d79d@sourceware.org> (raw)
In-Reply-To: <87pmq8pffr.fsf@oldenburg.str.redhat.com>

On 12/7/21 21:36, Florian Weimer wrote:
> * Siddhesh Poyarekar:
> 
>> Build glibc programs and tests as PIE by default and enable static-pie
>> automatically if the architecture and toolchain supports it.
>>
>> Also add a new configuration option --disable-default-pie to prevent
>> building programs as PIE.
>>
>> Only the following architectures now have PIE disabled by default
>> because they do not work at the moment.  hppa, ia64 and csky don't work
>> because the linker is unable to handle a pcrel relocation generated from
>> PIE objects.  The microblaze compiler is currently failing with an ICE.
>> GNU hurd tries to enable static-pie, which does not work and hence
>> fails.  It could be made to work, but I've left the enabling for the
>> Hurd maintainer.  build-many-glibcs runs clean for all targets now;
>> following are the failures before disabling PIE for these targets.  I
>> also tested x86_64 on Fedora and Ubuntu, to verify that the default
>> build as well as --disable-default-pie work as expected with both system
>> toolchains.
> 
> I see a “make check” failure on alpha:
> 
> /home/bmg/build/glibcs/alpha-linux-gnu/glibc/math/test-misc.o: in function `do_test':
> /home/bmg/src/glibc/math/test-misc.c:391:(.text+0x780): relocation truncated to fit: GPREL16 against `.rodata.cst16'
> /home/bmg/src/glibc/math/test-misc.c:400:(.text+0x87c): relocation truncated to fit: GPREL16 against `.rodata.cst16'
> /home/bmg/src/glibc/math/test-misc.c:705:(.text+0xda0): relocation truncated to fit: GPREL16 against `.rodata.cst16'
> /home/bmg/src/glibc/math/test-misc.c:714:(.text+0xe90): relocation truncated to fit: GPREL16 against `.rodata.cst16'
> collect2: error: ld returned 1 exit status
> make[3]: *** [../Rules:230: /home/bmg/build/glibcs/alpha-linux-gnu/glibc/math/test-misc] Error 1
> 
> This is with default build-many-glibcs.py.

My alpha `compilers` build had failed despite manually rebasing the 
binutils and gcc release branches.  That's similar to the hppa failure 
where the linker isn't able to handle a relative relocation.  I'll 
disable PIE for alpha too.

> The NEWS entry should mention that --enable-static-pie is now ignored
> (and no longer necessary).

I did mention it...

>  Deprecated and removed features, and other changes affecting compatibility:
>  
>  * The r_version update in the debugger interface makes the glibc binary
> @@ -80,6 +88,10 @@ Deprecated and removed features, and other changes affecting compatibility:
>  
>  * Intel MPX support (lazy PLT, ld.so profile, and LD_AUDIT) has been removed.
>  
> +* The --enable-static-pie option is no longer available.  The glibc build
> +  configuration script now automatically detects static-pie support in the
> +  toolchain and architecture and enables it if available.
> +
>  Changes to build and runtime requirements:
>  
>    [Add changes to build and runtime requirements here]

... but I just noticed the "Changes to build and runtime requirements" 
section.  Should I just consolidate the NEWS note into this section instead?

Thanks,
Siddhesh

  reply	other threads:[~2021-12-07 16:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07  8:26 Siddhesh Poyarekar
2021-12-07 16:06 ` Florian Weimer
2021-12-07 16:21   ` Siddhesh Poyarekar [this message]
2021-12-07 16:30     ` Florian Weimer
2021-12-07 18:52 ` Joseph Myers
2021-12-07 20:13 ` Adhemerval Zanella
2021-12-08  4:34   ` Siddhesh Poyarekar
2021-12-08  6:39 ` [PATCH v2] " Siddhesh Poyarekar
2021-12-10 17:35   ` Siddhesh Poyarekar
2021-12-10 19:28   ` Adhemerval Zanella
2021-12-13  3:02 ` [COMMITTED] " Siddhesh Poyarekar
2021-12-13 13:22   ` H.J. Lu
2021-12-13 13:41     ` Siddhesh Poyarekar
2021-12-13 13:43       ` H.J. Lu
2021-12-13 14:28   ` Siddhesh Poyarekar
2021-12-13 15:29     ` Siddhesh Poyarekar
2021-12-16 19:26   ` Florian Weimer

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=8b091d31-fff1-db57-1928-be9d2605d79d@sourceware.org \
    --to=siddhesh@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@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).