From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 6B97F3858D32 for ; Mon, 15 May 2023 08:01:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6B97F3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.99,276,1677571200"; d="scan'208,223";a="5388585" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 15 May 2023 00:01:29 -0800 IronPort-SDR: v5rUpqSQbMONCNmV7O9K7E8YI3o7wc14UwsNd96LV8QyAObpO8TReAGIn9HnXBXqeVYflIzcZS 3n2YIxLTLfyLwkDWmGK8I6M3ilZkNn/nOyB2MuRt/Cum1h9r5PmqyaKGElMmrag2b90bF8UMxk jwxPFaGf3OOKj1Ry9oSDMCjHxc/J7btE3w18N1HyOrNaJvg8p3Zdn3mvL0mpEp0aIB11MOjXWb pRr1P0sBXwupQEqrgNGAwr29aP04S+twF3xJKnb+Qm2RgqKacRMjKr6p7MFQ1M3jUOcHbeeW9Q Jn8= From: Thomas Schwinge To: CC: , Subject: Re: For GCC, newlib combined tree, newlib build-tree testing, use standard search paths In-Reply-To: <878rdybo0v.fsf@euler.schwinge.homeip.net> References: <874jpixmcv.fsf@dem-tschwing-1.ger.mentorg.com> <878rdybo0v.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Mon, 15 May 2023 10:01:24 +0200 Message-ID: <875y8urpkb.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,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 List-Id: --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2023-05-08T21:50:56+0200, I wrote: > Ping: OK to push to newlib main branch the attached > "For GCC, newlib combined tree, newlib build-tree testing, use standard s= earch paths"? > Or, has anybody got adverse comments/insight into this? Given that nobody has any comments, I'll push this later this week. (..., and be available to address any issue this, unlikely, may cause.) Gr=C3=BC=C3=9Fe Thomas > On 2023-04-14T22:03:28+0200, I wrote: >> Hi! >> >> OK to push to newlib main branch the attached >> "For GCC, newlib combined tree, newlib build-tree testing, use standard = search paths" >> -- or is something else wrong here, or should this be done differently? >> (I mean, I'm confused why this doesn't just work; I'm certainly not the >> first person to be testing such a setup?) >> >> I'm not doing anything special here: just symlink 'newlib' into the GCC >> source directory, build the combined tree, and then run 'make check', as >> mentioned in the attached Git commit log. >> >> >> Gr=C3=BC=C3=9Fe >> Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-For-GCC-newlib-combined-tree-newlib-build-tree-testi.patch" >From e56b38625929c3cf62c71d3fbd9264aaeef39d0c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 14 Apr 2023 21:26:32 +0200 Subject: [PATCH] For GCC, newlib combined tree, newlib build-tree testing, use standard search paths For example, for GCC/GCN target (AMD GPUs), target libraries are built individually per supported hardware ISA ('-march=[...]'). Testing such a toolchain via, for example: $ make RUNTESTFLAGS='--target_board=[...]/-march=gfx90a' check[...] ... does work fine for all 'check-gcc-[...]' as well as GCC-provided target libraries, 'check-target-[...]'. Just for 'check-target-newlib', for the example above, not the '-march=gfx90a' newlib libraries are linked in, but instead always the default ones, which results in link FAILure. This is cured simply by skipping use of 'newlib/testsuite/lib/flags.exp', so that the standard search paths as determined by GCC, DejaGnu are used for newlib, too. --- newlib/testsuite/lib/flags.exp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/newlib/testsuite/lib/flags.exp b/newlib/testsuite/lib/flags.exp index e1e9acb18..697291e7a 100644 --- a/newlib/testsuite/lib/flags.exp +++ b/newlib/testsuite/lib/flags.exp @@ -4,6 +4,13 @@ # is freely granted, provided that this notice is preserved. # +if [info exists env(XGCC_FLAGS_FOR_TARGET)] { + verbose "GCC, newlib combined tree, build-tree testing; using standard search paths" + # ... instead of the search paths built here, based on 'objdir' as set in + # newlib's 'site.exp', which always points to the default multilib. + return +} + # flags.exp: overrides the dejagnu versions of libgloss_link_flags, # newlib_link_flags, and newlib_include_flags. -- 2.25.1 --=-=-=--