From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bumble.maple.relay.mailchannels.net (bumble.maple.relay.mailchannels.net [23.83.214.25]) by sourceware.org (Postfix) with ESMTPS id 28ABA3858437 for ; Tue, 7 Dec 2021 16:22:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 28ABA3858437 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2281A721C9B; Tue, 7 Dec 2021 16:22:02 +0000 (UTC) Received: from pdx1-sub0-mail-a304.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 51FEF721C30; Tue, 7 Dec 2021 16:22:00 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a304.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.116.149.2 (trex/6.4.3); Tue, 07 Dec 2021 16:22:01 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Vacuous-Battle: 0f8acbf858373b1c_1638894121484_510469914 X-MC-Loop-Signature: 1638894121484:1628350839 X-MC-Ingress-Time: 1638894121484 Received: from [192.168.52.116] (unknown [223.185.2.127]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a304.dreamhost.com (Postfix) with ESMTPSA id 4J7ltV2Qndz1M5; Tue, 7 Dec 2021 08:21:53 -0800 (PST) Message-ID: <8b091d31-fff1-db57-1928-be9d2605d79d@sourceware.org> Date: Tue, 7 Dec 2021 21:51:49 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH] Replace --enable-static-pie with --disable-default-pie Content-Language: en-US To: Florian Weimer Cc: libc-alpha@sourceware.org References: <20211207082638.1960585-1-siddhesh@sourceware.org> <87pmq8pffr.fsf@oldenburg.str.redhat.com> From: Siddhesh Poyarekar In-Reply-To: <87pmq8pffr.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1165.2 required=5.0 tests=BAYES_00, CTE_8BIT_MISMATCH, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2021 16:22:07 -0000 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