Message ID | AS1PR01MB94658A4252306B4F0877344DE49E2@AS1PR01MB9465.eurprd01.prod.exchangelabs.com |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> 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 BB44D384A80B for <patchwork@sourceware.org>; Fri, 6 Sep 2024 07:14:09 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazolkn190100000.outbound.protection.outlook.com [IPv6:2a01:111:f403:d201::]) by sourceware.org (Postfix) with ESMTPS id A4A0F3858D28 for <gdb-patches@sourceware.org>; Fri, 6 Sep 2024 07:13:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A4A0F3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hotmail.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A4A0F3858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:d201:: ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1725606826; cv=pass; b=K1rBiEFTtNQb7tKXVIY0TFXetdWyhZLU/CLmnT9+rlRjZ7iVOl+Z4REV3WGTXzzfLm3baRxQQzkw6MrNGpuprcvw9JGyWgjfXqw9l3bpvonf2lLjNKV16CJIVez3spHLUIzvW52+XSP3Lh2Pro1EvwO+m2sBli7sjmY7bUtqdis= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1725606826; c=relaxed/simple; bh=Y744TVVlPLcjxZdivZx3Nz23eT5Uox6o8RoRe9GWcMs=; h=DKIM-Signature:Message-ID:Date:To:From:Subject:MIME-Version; b=d/u78V5INxSdaX5alNvFCN6VQF5Onp+KR60ltPRQqLFMSd+85qSCQ+rRVna888IVOsulEB5VyJ9QmcUzd01CjRnS97GWzjOT9I5UzjtzNDeagE834AhhHJLKW7IfsirhPS/MsIBY1AQuqlRGgc4gj1pYh75JYSrql3BldiMUui8= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tKXLcIjCKb/jRYfAsRoclaVXtPU6njM9wJZT7I238TAKh22GAgUCUZtkcM82p3FfHJBYs30ozMos+1rx6fHz4BlcnzyejbovkcmSgZCpFRMoatipACgnnVcy7bMy3reYnzzA/XLtm+w72VcNxHWw19CpsfB54wm2zKFLsuj9giChLwtI77Zn/Rbet+XiIPOf5p7R9vBzgHvQe8jY3qW8RLW/IN/4FJMsRJje4m2j+T7Yf94SK9qRx37ktl1ue3mjvFJLuB1/oLrOAeR84+QSoKddGdMxqfmZotF6UR+8kC1u1PhjA0ND3bVHh0eiu9Vt+5f6kxhcBGFG2zFq02umBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QkJj7696ePPkrcQL0RNTpDdWB6UDm33ODT9vzuZ/9ec=; b=EY/EcfpIwNuDZrPsS1MN1AEMJqr4mpb5NL/qp7Zl8KLvrSgdyhZVTQ/GCUfEDq38duQHbH2mfLFHgm92AGW0/mK2xqm0SNbVgHdNVQKHpyMKBmY3mWPDHLZBi+hoipYGWYwK7W5Jl92vkhgLTgHl2q8x3xJjJFpO3bDLXCoHB/iE8j7V6ZPNtAFj5Kh18ZynM1wWKN/xcA4TvAPJuEPfytH9EVX+DOmBGVi7ZyCQuT498039A522M49+FG0trQDNANv/Dyb5ygZHmkqRC1f40SYVJwPRN1vqoXJpBO9lJTGQSgqmcznsDmNa3G5m3IW1R1NuylBdtcI8hNHd8jM6QQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=HOTMAIL.DE; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QkJj7696ePPkrcQL0RNTpDdWB6UDm33ODT9vzuZ/9ec=; b=EgJTm568R81ul9DJoKQvUmqDWPCI1/0LSEkX3stfEue4zdUfwr5M36HEEXwgtd3tNQMR++jZKrkOfO6yicO3fe3DGNC6GOsgQc1cbn4Rbospl4khoFh2bRaHdwHd8NmwNferOKniDHQUJAT6Q2q/pZLiEcz28RXXRJKkXdb/bon0Xi7uEDqDwNKOeUABqu6afxEXgP24kgZyEqKwFYpfCH3F4vDDJHHH0Fdl+g2ONi3ELvmBVDjt2RxRZMbxj7j1t7IUlVLcDr9F/GNG5XOtQ3vzeaQkBOAgS0YzUKcmDromQ5a4U99nNBdFoYhgJ+uogpcmUyrzxmuPluQKXkeypg== Received: from AS1PR01MB9465.eurprd01.prod.exchangelabs.com (2603:10a6:20b:4d3::20) by GVXPR01MB11016.eurprd01.prod.exchangelabs.com (2603:10a6:150:219::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.28; Fri, 6 Sep 2024 07:13:42 +0000 Received: from AS1PR01MB9465.eurprd01.prod.exchangelabs.com ([fe80::ea10:4661:33e:18c]) by AS1PR01MB9465.eurprd01.prod.exchangelabs.com ([fe80::ea10:4661:33e:18c%7]) with mapi id 15.20.7918.024; Fri, 6 Sep 2024 07:13:42 +0000 Message-ID: <AS1PR01MB94658A4252306B4F0877344DE49E2@AS1PR01MB9465.eurprd01.prod.exchangelabs.com> Date: Fri, 6 Sep 2024 09:13:52 +0200 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org> Cc: Andrew Burgess <aburgess@redhat.com> From: Bernd Edlinger <bernd.edlinger@hotmail.de> Subject: [PATCH] Fix the build-id option for GCC default configuration Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TMN: [GwTCGbhCjv+szh4XHm8IDxwlG/7uyJX/] X-ClientProxiedBy: FR4P281CA0334.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ea::10) To AS1PR01MB9465.eurprd01.prod.exchangelabs.com (2603:10a6:20b:4d3::20) X-Microsoft-Original-Message-ID: <238b13c2-0449-410e-8f29-724b9516c319@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS1PR01MB9465:EE_|GVXPR01MB11016:EE_ X-MS-Office365-Filtering-Correlation-Id: c684edb2-bdd9-4bb7-d6b3-08dcce436f92 X-Microsoft-Antispam: BCL:0; ARA:14566002|15080799006|8060799006|19110799003|6090799003|461199028|5072599009|1602099012|3412199025|440099028|4302099013; X-Microsoft-Antispam-Message-Info: OaYShDpNYoosIdxo3QWQF0JVqQpduIuKOMndH5nMfMiPTtYWH32PsckAwDHmB8eD2c8Tbr3LZMErwQdEUtEuLjHipoMAv007QN0UDGM6xCHK11k5TaNj/Oq1MTjwAawlBkzDNHnnEvnVZ/inM7yd7Jdxx+GuA6j9R3mGHZpjAAorwUVVmd7YIlPj7ttRStku93eajELPznzivSQihRJgeDrwWD9ctUwnxdyLYoJDnWRzkUlP7RUWTJ5xRDkgbxhU3On2ZiqqhcX/GtDDohcICcD2HTDS+UZYnnIBwS8FUQqdnKobSMcDP2PBYQAw3faIfTboYgn7XPOfW1Viz0zeoNIXQn7yNDe0B4E+07FT2EKsOqENQ8S8x1yixi9q+c6bKYI1/fiPJlyAHiSiCfL+jvvLH8TpZJDMWJhtGmwfKM7hHoMbl16Q8U8oPuC2wjAAYrzOzOBknRf/ZZmHd+3RsI61N98EfmPGGrFQWNd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d6iXLe3ImYVtaLIHOrfRWyVlO54?= =?utf-8?q?mC3b97alc13fGcTxYum89iOkF8pe/W8ZkGT6vVZF17KKHufcnYJtHdQyo0YhUXrz1?= =?utf-8?q?Hv/qJW6t+fJ5jRqEmx9Lm1wNQR3C/qqqW6g6dqaJAjpBFx6LWWSs9XP+ccxjzX6Yk?= =?utf-8?q?f/2a8+tAx1NRlwY/sWEA6axtNrRS1WLPhGwLdTCn50Uz2Y9CYUasi+QyYzhTOuj9W?= =?utf-8?q?IczApcNXRhaX+EG0Qg4a5+4PpihuZjGDrBl+eYzfY0IHtZk0OIp83F5Ql7Xiwirp3?= =?utf-8?q?8up3XeacYyDZu/7ARW7wBEQyaF5FwgRdfEtJw3OWh1sC9WCBK1MkADPy9IjsGwjfT?= =?utf-8?q?CTFq5aeVnF9R+xbPdtYsxtK6bk3ooEXr+KRsXWLK/d6wsLC0VET5+H4FxPP7S7+Fl?= =?utf-8?q?oAYwFFJIS41JruscB2aRExBvwPFwXAw49xoYLOzdssI3Wdibol+Ocf8ZHLj4rw3mL?= =?utf-8?q?AgTa0kDxBLjW9krqkRz4RROLOPiIhlN9+LTW4Jt7ECXeFn91LfvsXMJlQzJjNBdQ4?= =?utf-8?q?G0gjPKGyGYuuB76uVJdzsOrgJmXLV06LINKyMXXEPPv50ENF0SbzvX/4RxMXaL7w/?= =?utf-8?q?K2SNaTjc+Eapdpqisy8FwiZegyQn4TB9AAA3LtIwOpDTw7Hnf+peoPQr7miI4e5jl?= =?utf-8?q?cfkX1vQ4PpYI4y9jMwSAStqP/esRxO6CLsp30wENKwIFzfR/mBaboFaaqQlqCEFD+?= =?utf-8?q?nQxbi77F1pxjfLYFb?= X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-ba98d.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: c684edb2-bdd9-4bb7-d6b3-08dcce436f92 X-MS-Exchange-CrossTenant-AuthSource: AS1PR01MB9465.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2024 07:13:42.0206 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR01MB11016 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
Fix the build-id option for GCC default configuration
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gdb_build--master-arm | success | Build passed |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 | warning | Patch is already merged |
linaro-tcwg-bot/tcwg_gdb_check--master-arm | warning | Patch is already merged |
Commit Message
Bernd Edlinger
Sept. 6, 2024, 7:13 a.m. UTC
It is possible that the compiler is configured to do so automatically, but at least for GCC the configure option --enable-linker-build-id is not enabled by default. So the option -Wl,--build-id should be used regardless of which compiler is used. --- This prevents the following test failures when GCC is used in default configuration: FAIL: gdb.base/build-id-seqno.exp: find debuginfo with a single build-id file: debuginfo was read via build-id FAIL: gdb.base/build-id-seqno.exp: find debuginfo with 4 build-id files: debuginfo was read via build-id FAIL: gdb.base/build-id-seqno.exp: find debuginfo, first build-id file is bad: debuginfo was read via build-id FAIL: gdb.base/build-id-seqno.exp: find debuginfo, first 2 build-id files are bad: debuginfo was read via build-id FAIL: gdb.base/build-id-seqno.exp: find debuginfo, last build-id file is good: debuginfo was read via build-id FAIL: gdb.base/index-cache.exp: test_cache_enabled_miss: at least one file was created FAIL: gdb.base/index-cache.exp: test_cache_enabled_miss: couldn't get executable build id FAIL: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache stats FAIL: gdb.base/index-cache.exp: couldn't remove files in temporary cache dir FAIL: gdb.base/sysroot-debug-lookup.exp: lookup_via_build_id: sysroot_prefix=: ensure debug information was found FAIL: gdb.base/sysroot-debug-lookup.exp: lookup_via_build_id: sysroot_prefix=: debug symbols read from correct file FAIL: gdb.base/sysroot-debug-lookup.exp: lookup_via_build_id: sysroot_prefix=target:: ensure debug information was found FAIL: gdb.base/sysroot-debug-lookup.exp: lookup_via_build_id: sysroot_prefix=ta FAIL: gdb.dwarf2/per-bfd-sharing.exp: couldn't remove files in temporary cache dir gdb/testsuite/lib/gdb.exp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
Comments
On 9/6/24 09:13, Bernd Edlinger wrote: > It is possible that the compiler is configured to do > so automatically, but at least for GCC the configure option > --enable-linker-build-id is not enabled by default. > So the option -Wl,--build-id should be used regardless > of which compiler is used. > --- > > This prevents the following test failures when > GCC is used in default configuration: > > FAIL: gdb.base/build-id-seqno.exp: find debuginfo with a single build-id file: debuginfo was read via build-id > FAIL: gdb.base/build-id-seqno.exp: find debuginfo with 4 build-id files: debuginfo was read via build-id > FAIL: gdb.base/build-id-seqno.exp: find debuginfo, first build-id file is bad: debuginfo was read via build-id > FAIL: gdb.base/build-id-seqno.exp: find debuginfo, first 2 build-id files are bad: debuginfo was read via build-id > FAIL: gdb.base/build-id-seqno.exp: find debuginfo, last build-id file is good: debuginfo was read via build-id > FAIL: gdb.base/index-cache.exp: test_cache_enabled_miss: at least one file was created > FAIL: gdb.base/index-cache.exp: test_cache_enabled_miss: couldn't get executable build id > FAIL: gdb.base/index-cache.exp: test_cache_enabled_hit: check index-cache stats > FAIL: gdb.base/index-cache.exp: couldn't remove files in temporary cache dir > FAIL: gdb.base/sysroot-debug-lookup.exp: lookup_via_build_id: sysroot_prefix=: ensure debug information was found > FAIL: gdb.base/sysroot-debug-lookup.exp: lookup_via_build_id: sysroot_prefix=: debug symbols read from correct file > FAIL: gdb.base/sysroot-debug-lookup.exp: lookup_via_build_id: sysroot_prefix=target:: ensure debug information was found > FAIL: gdb.base/sysroot-debug-lookup.exp: lookup_via_build_id: sysroot_prefix=ta > FAIL: gdb.dwarf2/per-bfd-sharing.exp: couldn't remove files in temporary cache dir > Hi Bernd, thanks for the patch. I think this is OK. Approved-By: Tom de Vries <tdevries@suse.de> Thanks, - Tom > gdb/testsuite/lib/gdb.exp | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index d4d4acb2313..f58174de843 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -5633,10 +5633,11 @@ proc gdb_compile {source dest type options} { > } > > # If the 'build-id' option is used, then ensure that we generate a > - # build-id. GCC does this by default, but Clang does not, so > - # enable it now. > - if {[lsearch -exact $options build-id] > 0 > - && [test_compiler_info "clang-*"]} { > + # build-id. It is possible that the compiler is configured to do > + # so automatically, but at least for GCC the configure option > + # --enable-linker-build-id is not enabled by default. > + # So to be sure, enable it explicitly. > + if {[lsearch -exact $options build-id] > 0} { > lappend new_options "ldflags=-Wl,--build-id" > } >
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index d4d4acb2313..f58174de843 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5633,10 +5633,11 @@ proc gdb_compile {source dest type options} { } # If the 'build-id' option is used, then ensure that we generate a - # build-id. GCC does this by default, but Clang does not, so - # enable it now. - if {[lsearch -exact $options build-id] > 0 - && [test_compiler_info "clang-*"]} { + # build-id. It is possible that the compiler is configured to do + # so automatically, but at least for GCC the configure option + # --enable-linker-build-id is not enabled by default. + # So to be sure, enable it explicitly. + if {[lsearch -exact $options build-id] > 0} { lappend new_options "ldflags=-Wl,--build-id" }