From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 3F4A83858C5E for ; Fri, 14 Apr 2023 20:03:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3F4A83858C5E 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,197,1677571200"; d="scan'208,223";a="2774330" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 14 Apr 2023 12:03:46 -0800 IronPort-SDR: DhrDxAjDwJECueiIg79L/xewoO8EF+CtMRpeltNfzOFVfe/HdUbh4uZ9/QQv6urGxGnpDc8nh9 fLhaS/wbYzbHdTp5RNriK/RdgActVBLHKTk0Br7dtHEmejO5u2d10Q6Q4NLru6MUOmYsa7FGGD GtQB+kiRzcowz4A2fI5OUspWxy+qvuL+a+Vz1a8Yt7j30insvxr66DjKoZoHEtoo7ydOZc6G0B pBVSoMS36S7sPe5YTO8iRezO/YTalaMUoXHn/tGAp+WgzcaCjuAFNzkyq7OliX0X0Yo6zFZLZF 5n4= From: Thomas Schwinge To: CC: , Subject: For GCC, newlib combined tree, newlib build-tree testing, use standard search paths User-Agent: Notmuch/0.29.1+93~g67ed7df (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Fri, 14 Apr 2023 22:03:28 +0200 Message-ID: <874jpixmcv.fsf@dem-tschwing-1.ger.mentorg.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) 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,RCVD_IN_MSPIKE_H2,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! OK to push to newlib main branch the attached "For GCC, newlib combined tree, newlib build-tree testing, use standard sea= rch 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 --=-=-=--