From patchwork Sat Jun 29 16:18:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam James X-Patchwork-Id: 93065 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 84EA8381577D for ; Sat, 29 Jun 2024 16:19:46 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id AA44D38185E4 for ; Sat, 29 Jun 2024 16:19:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AA44D38185E4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AA44D38185E4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719677961; cv=none; b=nCHu7dE0Ly1++Cvt6SDnx4URx6VaCMe4nvjq/DOh16n5FHUE3Gnl+n1RDtua744Iq7KrLUggH0qTaoqGOYpOJaN2zizBY+NnBpJItgoMaKknyzF24RJOYUa+32Eo90OXCPZRcFHxVOTbx6rTUxWG5I3/8Gh5mKT+UnY9dgBaVm4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719677961; c=relaxed/simple; bh=h00Ef4KKEYrSrpXy2sttnz6Od2gphQ25yGv82sMzWoo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=X2LaW413wfaq8mYxiRVitmu3foxckPjHnVNKknqJ51Ep4XwWMJi6XicaYwbaoS1I4oUo6PKPSivprrZIxPO9sMrI9k4wMflwFejtXEGChEgClbCPMgw7PyhCZJZ64r2vN32TF+lDE0jnQTm755Qg2b+CiUYwEgVvaJZ7ibcF0qg= ARC-Authentication-Results: i=1; server2.sourceware.org From: Sam James To: binutils@sourceware.org Cc: nickc@redhat.com, Alan Modra , Sam James Subject: [COMMITTED] ld: pass -g for ld-elf tests Date: Sat, 29 Jun 2024 17:18:38 +0100 Message-ID: <20240629161907.678880-1-sam@gentoo.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org The "DWARF parse during linker error" and "Build warn libbar.so" tests require debug information. configure defaults to "-O2 -g" but if overriding *FLAGS when building tests, this might be lost. Explicitly pass -g given these tests require it. Originally reported downstream in Gentoo at https://bugs.gentoo.org/934149. ld/ * testsuite/ld-elf/dwarf.exp: Pass -g for "DWARF parse during linker error". * testsuite/ld-elf/shared.exp: Ditto for "Build warn libbar.so". --- v2: Fix typo in ChangeLog and fix list syntax for arg passing. Pushed after OK from Alan - thanks! ld/testsuite/ld-elf/dwarf.exp | 2 +- ld/testsuite/ld-elf/shared.exp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ld/testsuite/ld-elf/dwarf.exp b/ld/testsuite/ld-elf/dwarf.exp index a4748a47c98..1ca1ec54763 100644 --- a/ld/testsuite/ld-elf/dwarf.exp +++ b/ld/testsuite/ld-elf/dwarf.exp @@ -50,7 +50,7 @@ set build_tests { "-s -shared" "-fPIC -g -feliminate-dwarf2-dups" {dwarf1.c} {} "libdwarf1.so"} {"DWARF parse during linker error" - "" "-fno-toplevel-reorder" + "" "-g -fno-toplevel-reorder" {dwarf2a.c dwarf2b.c} {{error_output "dwarf2.err"}} "dwarf2.x"} } diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 9e89077af89..97ca778bc8e 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -552,7 +552,7 @@ set build_tests { "-shared" "-fPIC" {begin.c end.c} {} "libbar.so"} {"Build warn libbar.so" - "-shared" "-fPIC" + "-shared" "-fPIC -g" {beginwarn.c end.c} {{readelf {-S --wide} libbarw.rd} {warning {^.*beginwarn.c:7:\(.*\): warning: function foo is deprecated\n?$}}}