From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 0CCF23858C2C for ; Tue, 7 Dec 2021 16:30:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0CCF23858C2C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-449-GE7cG5H6Nr2DKtCvPAo8iA-1; Tue, 07 Dec 2021 11:30:40 -0500 X-MC-Unique: GE7cG5H6Nr2DKtCvPAo8iA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3A05781EE61; Tue, 7 Dec 2021 16:30:39 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.123]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 43F995D6CF; Tue, 7 Dec 2021 16:30:37 +0000 (UTC) From: Florian Weimer To: Siddhesh Poyarekar Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Replace --enable-static-pie with --disable-default-pie References: <20211207082638.1960585-1-siddhesh@sourceware.org> <87pmq8pffr.fsf@oldenburg.str.redhat.com> <8b091d31-fff1-db57-1928-be9d2605d79d@sourceware.org> Date: Tue, 07 Dec 2021 17:30:35 +0100 In-Reply-To: <8b091d31-fff1-db57-1928-be9d2605d79d@sourceware.org> (Siddhesh Poyarekar's message of "Tue, 7 Dec 2021 21:51:49 +0530") Message-ID: <87k0ggpec4.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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:30:49 -0000 * Siddhesh Poyarekar: > On 12/7/21 21:36, Florian Weimer wrote: >> * Siddhesh Poyarekar: >>=20 >>> 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 fro= m >>> 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 syste= m >>> toolchains. >> I see a =E2=80=9Cmake check=E2=80=9D 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 trunc= ated to fit: GPREL16 against `.rodata.cst16' >> /home/bmg/src/glibc/math/test-misc.c:400:(.text+0x87c): relocation trunc= ated to fit: GPREL16 against `.rodata.cst16' >> /home/bmg/src/glibc/math/test-misc.c:705:(.text+0xda0): relocation trunc= ated to fit: GPREL16 against `.rodata.cst16' >> /home/bmg/src/glibc/math/test-misc.c:714:(.text+0xe90): relocation trunc= ated 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=20 > where the linker isn't able to handle a relative relocation. I'll > disable PIE for alpha too. Thanks. >> The NEWS entry should mention that --enable-static-pie is now ignored >> (and no longer necessary). > > I did mention it... Ah, okay, sorry. Florian