From patchwork Sun May 24 11:17:52 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 135518 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B9634BAD175 for ; Sun, 24 May 2026 11:18:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B9634BAD175 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=Ua9aQ7/k X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 5E49F4BA9009 for ; Sun, 24 May 2026 11:17:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E49F4BA9009 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5E49F4BA9009 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779621477; cv=none; b=iuSDIzmep/UvHxtj3ITMIqm9Hm3qjj4QFLfQOhjx5WFdF0YoXZfSCQQ3Jd6N2xFlzZw9y1Z9EdEHnZPZ8ZfUTB53/VviHkFUJ/5Pfq9XUIwVIOh5DlZSnsreXkJdg4Tp17jRLnK40KbYF+qxBsNNgwgHJHarzZyiFxA1f7fa+b0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779621477; c=relaxed/simple; bh=EVW3WqJ294qD4h7mVsqrVb1SG4OgnEKuB+VYXYTUhsM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=P8FoOglcONJ0ZrqmCN9F7aluf2VoyHWHdJTBDhezkEqduslTvH3fMuQhwqx1zfKYCjT/+neh3lc5pQboNJXeLjbfdIQbl5JTKrqOSRzo4n7pP8L+FK7yNmWRvwcRw3AE2CcDfDvGDLatyNckoNFaVkegobtlMdOMjSO9bIlJyBI= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=Ua9aQ7/k DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E49F4BA9009 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-835386ff122so8971813b3a.3 for ; Sun, 24 May 2026 04:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779621476; x=1780226276; darn=sourceware.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=HCpTDRBP8DMug2JO9oXv3uYO3OxADa2A9XG8hYLZrr4=; b=Ua9aQ7/kal2eBKkHKLtE8zfdjkv8DySt9hcNn//5ArI1FwCyuwZLXsSHaaCcfQZSub fSb5YJnXsG6lm1L2LtKQqK/fyZT34FHjUU9kTUMpD0Q0H5QsD1ayAfSZu3WKrPjNYqAr 3DkPwbkEY5xhPPcmAP11saFLL0oco0iIuz6fHpftk4y385FX8E3OOBrEGH42+q4OEFT/ oJ9lKgkw1a1eUjyfXIUpsnN3SsvZnP7NElpwNya1JshM0pZIudejN2YLNodM6Q4X2qRj E9+3R6QObkIDlABI2hSKmoJf7f32tvVDNhQppAmUNUihLnyex+WcgKcgu9Rx7LS7+sdf HAlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779621476; x=1780226276; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HCpTDRBP8DMug2JO9oXv3uYO3OxADa2A9XG8hYLZrr4=; b=aJYw19VASpNWIqTqB9MzlBI9N8R+YR5gg+Lj7wpEzv3ZuYLo1b6vBUBljIsnrdaw36 HjtNwXL/wujk7EjNrjBEFt/EdaSGc3a96G9BHT4IFP3YFv4ICpM+IRakjb7ak5/Xqr/G 0he6X3VP+HE7BclSHgHTzu8XdVlpF3kzVhsqO2xZYzHbYPXi4aOrbWYvkg71XNeq9FDr usrTvEM84S61ImwD41WZvqZG00I2V86fJWto39dOx01BuInaS1mzYmWn3G+yajqbpkfH H2hq6kpMNQ/c8YqsljbIV3yntUdTPPt5DHeQ0FfS5LpIV7AoH131m0NT5VRAoVDSN8N3 Dw9A== X-Gm-Message-State: AOJu0Yz2boYavm5DXaeZ7ah7meId3Xx7wj13vqGIDD4ol41WjgUeD8VA 1GiYmDcIaPVDNMRsbbE5dZ0CA172wN3nhKAHU3NbjgLVtNuczCNJUqR0Tmha0A== X-Gm-Gg: Acq92OF9sMGnf0f5i+R+UIf44NRBwa9u2yV/AcuMKXJ51Npl1OUxskKYexy/9p1JC4Y uvqHfdSZVd00c9sZuD3kY4qyHHSeHTFsb/qu9sLAd9R1iP28MDTyR/Cqq/AtOAsPJE7AWMMlers JDUdVvazsZW+OZJkp8t87ZCtQV2JyZquAuebozgRnvL/PnGpGC0As+/3efaxf/XfnSfYKG4LWO5 xrAdnhCQ51sfpHuKy+F784p+FAIdhB3rNTYHV/4or9gGW5ACUSLizAO/SJqLCxfJBEginEqteW8 D+M1ON1FhSCTQzpnQOBd5q+C41+alXZQzMsXWP83fRtXaHEfwzXzoBSmsCJRDXoMcaWt02h8IDt VWxHS1+MhKw9Gz+ZDqfU9z/JEIgvwqAfJBORc1kYYyjgjGKFb1Fj2HrDT764PJRn/x0ZNXbvmWK q5bQLffOx1liXPP7u7mO/+4SCyQszvGve9 X-Received: by 2002:aa7:9a85:0:b0:82d:603f:f3a with SMTP id d2e1a72fcca58-8415f5dcd16mr9513306b3a.24.1779621476157; Sun, 24 May 2026 04:17:56 -0700 (PDT) Received: from squeak.grove.modra.org ([58.96.106.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84164ff71c4sm7653363b3a.55.2026.05.24.04.17.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2026 04:17:55 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 7A7EE1140BC1; Sun, 24 May 2026 20:47:52 +0930 (ACST) Date: Sun, 24 May 2026 20:47:52 +0930 From: Alan Modra To: binutils@sourceware.org Subject: binutils test_build_id_debuglink Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3029.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_GMAIL_RCVD, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on 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 I saw build-id-debuglink test failures on a number of targets due to deleting the glibc source I'd used when building the cross toolchains. The tests failed with timeouts. $ objdump -Sl tmpdir/testprog.strip tmpdir/testprog.strip: file format elf64-ia64-little Disassembly of section .init: 40000000000003b0 <_init>: _init(): /home/alan/src/glibc-2.38/csu/../sysdeps/ia64/crti.S:137 ^C I don't know where debuginfod was looking to try to find that crti.S source, but wherever it was took too long, and we aren't trying to test debuginfod here. So remove the extraneous source dependencies by building with -shared -nostdlib. When making this change I also removed the code passing extra options to target_compile via CFLAGS_FOR_TARGET. Instead, pass extra options with additional_flags. * testsuite/binutils-all/objdump.exp (test_build_id_debuglink): Don't use CFLAGS_FOR_TARGET to pass extra options to target_compile. Instead use additional_flags. Build test with -fPIC -shared -nostdlib. diff --git a/binutils/testsuite/binutils-all/objdump.exp b/binutils/testsuite/binutils-all/objdump.exp index 1bb8f55d109..734f93298ed 100644 --- a/binutils/testsuite/binutils-all/objdump.exp +++ b/binutils/testsuite/binutils-all/objdump.exp @@ -622,28 +622,21 @@ proc test_build_id_debuglink {option} { global STRIP global OBJCOPY global OBJDUMP - global CFLAGS_FOR_TARGET global exe set test "build-id-debuglink ($option)" # Use a fixed build-id. - if { [info exists CFLAGS_FOR_TARGET] } { - set save_CFLAGS_FOR_TARGET $CFLAGS_FOR_TARGET + set xflags debug + foreach i "-Wl,--build-id=0x12345678abcdef01,--compress-debug-sections=$option -fPIC -shared -nostdlib" { + append xflags " additional_flags=$i" } - set CFLAGS_FOR_TARGET "-g -Wl,--build-id=0x12345678abcdef01,--compress-debug-sections=$option" - if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog${exe} executable debug] != "" } { + if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog${exe} executable $xflags] != "" } { unsupported "$test (build)" return } - if { [info exists save_CFLAGS_FOR_TARGET] } { - set CFLAGS_FOR_TARGET $save_CFLAGS_FOR_TARGET - } else { - unset CFLAGS_FOR_TARGET - } - if { [binutils_run $STRIP "--strip-debug --remove-section=.comment tmpdir/testprog${exe} -o tmpdir/testprog.strip"] != "" } { fail "$test (strip debug info)" return