From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Yle/MG/nTWFiOwAAWB0awg (envelope-from ) for ; Fri, 24 Sep 2021 10:57:51 -0400 Received: by simark.ca (Postfix, from userid 112) id BE22A1EE25; Fri, 24 Sep 2021 10:57:51 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 18E3B1EDDB for ; Fri, 24 Sep 2021 10:57:51 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 741F8385802B for ; Fri, 24 Sep 2021 14:57:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 741F8385802B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632495470; bh=huUsctmDEZAQLwKhKViLwBoNKEBsL2EmSxzbn0rbhtQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=SxO9u2x5u776C0dzRMHw6LGoCn370PSdUoMyCuisrfbEEOryWGlRUOKMkfzT0oPtT COXvlOQBOfnWqB4/2EmsyJFjfPjXcfJ9bM/XAGsZNvlpKAkqpB0hd+kxoF8Dz2IVRf 27wOEG0/N0ZP35bPUCRQM2oZ0MSmAwEf/N7W1L/I= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 91EBF3858402 for ; Fri, 24 Sep 2021 14:57:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 91EBF3858402 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6ADEB20318 for ; Fri, 24 Sep 2021 14:57:30 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 58D3313C0A for ; Fri, 24 Sep 2021 14:57:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id skeGFFrnTWFrWAAAMHmgww (envelope-from ) for ; Fri, 24 Sep 2021 14:57:30 +0000 Date: Fri, 24 Sep 2021 16:57:28 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Use pie instead of -fpie/-pie Message-ID: <20210924145727.GA27853@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, I noticed two test-cases where -fpie is used. Using the canonical pie option will usually get one -fPIE instead. That choice is justified here in gdb_compile: ... # For safety, use fPIE rather than fpie. On AArch64, m68k, PowerPC # and SPARC, fpie can cause compile errors due to the GOT exceeding # a maximum size. On other architectures the two flags are # identical (see the GCC manual). Note Debian9 and Ubuntu16.10 # onwards default GCC to using fPIE. If you do require fpie, then # it can be set using the pie_flag. set flag "additional_flags=-fPIE" ... There is no indication that using -fpie rather than -fPIE is on purpose, so use pie instead. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Use pie instead of -fpie/-pie --- gdb/testsuite/gdb.base/gcore-relro-pie.exp | 3 ++- gdb/testsuite/gdb.base/gcore-tls-pie.exp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/gcore-relro-pie.exp b/gdb/testsuite/gdb.base/gcore-relro-pie.exp index 5b25721ad61..39142fe4254 100644 --- a/gdb/testsuite/gdb.base/gcore-relro-pie.exp +++ b/gdb/testsuite/gdb.base/gcore-relro-pie.exp @@ -19,7 +19,8 @@ standard_testfile -if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-fpie "ldflags=-pie -Wl,-z,relro"}]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ + {debug pie "ldflags=-Wl,-z,relro"}]} { return -1 } diff --git a/gdb/testsuite/gdb.base/gcore-tls-pie.exp b/gdb/testsuite/gdb.base/gcore-tls-pie.exp index 3f42cb4fe67..e514c42d498 100644 --- a/gdb/testsuite/gdb.base/gcore-tls-pie.exp +++ b/gdb/testsuite/gdb.base/gcore-tls-pie.exp @@ -23,7 +23,8 @@ if { [have_fuse_ld_gold] == 0} { return -1 } -if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-fpie "ldflags=-pie -fuse-ld=gold"}]} { +if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ + {debug pie "ldflags=-fuse-ld=gold"}]} { return -1 }