From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 704053858C31 for ; Thu, 16 Feb 2023 00:28:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 704053858C31 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1676507328; x=1708043328; h=from:to:subject:mime-version:content-transfer-encoding: message-id:date; bh=17pA0lKP4ul+MGf2kX94dTLKLzSOZ66YxTFvB09RmdM=; b=O7or4vz+2+bdkjVHjXU+UeJXjgP6gGlTqRGBXbj4gParXe1pW7bUGCGB iXcdY9UMzWz0GQ0GTbbJ7IcJSx6KrKB+X/hHRAm8oBIsL2HrHNN77bAsR JwzTIVjZVtfrS7JYENQ6t6xYrgTxE61L1lwqhuD4TdHoM4MGUyue+BmUI 1kv9z9+CBFd0HSJy2vdAPzr1R29CzYtB+wStLzj3ODaqkBpc0wC4vg8hQ 3FYONZBgYD/QCX/b7rzKP3Sv6QKNQPcx/kRe/qJoPqDh3+soMCVoNug/J 4wl9sfd35mSHNi/Q4ur3LVyAqJtUvN/9AImksgI+v3LVhGjtPqrwwSmBg g==; From: Hans-Peter Nilsson To: Subject: [PATCH] objs-gcc.sh: Only bootstrap if source-directory contains gcc MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Message-ID: <20230216002846.E1B6A20441@pchp3.se.axis.com> Date: Thu, 16 Feb 2023 01:28:46 +0100 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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 List-Id: TL;DR: committed as obvious. -- >8 -- I use objs-gcc.sh as a preparatory step before calling btest-gcc.sh in my scripts, for example my cris-elf autotester. I thought, why not use it for native builds too. Except that use, with binutils release-style tarballs and a x86_64-pc-linux-gnu host, was broken. Now that I look at it, the script seems to have aged poorly... Still, there's a need for such a script to install stuff needed for btest-gcc.sh (and to fix up stuff if needed), and this can still be that script. So, I prefer to fix show-stoppers for common uses, while taking care to retain compatibility for use that could possibly still work, with current sources. A long time ago (before 2011, but after this script was created in 2002, and used for a few years), the binutils (and gdb and gcc) toplevel Makefile may have had a bootstrap target that worked with binutils but didn't require gcc sources to be present. Now, you'll get an error (see configure.ac line 1366 and on). Let's just build the default make-target when "bootstrap" is known to fail. An alternative would be to fold this native non-i686-pc-linux-gnu clause into the native i686-pc-linux-gnu clause, as that seems to have been originally intended as *the* single native clause, but that'd require further edits (e.g. to remove install-dejagnu and make gdb build conditional on gdb sources presence, to work with binutils tarballs, and I'd also then prefer to build not just ld, but also gas and binutils). As it's a minimal obvious change required for current native use with release-tarballs and git-checkout use(*), I'm installing this as obvious. *) Native i686-pc-linux-gnu remains broken for other use than specially constructed combined trees where dejagnu is included at the toplevel (i.e. historic Cygnus devo-type). contrib/regression: * objs-gcc.sh: Only bootstrap if source-directory contains gcc. --- contrib/regression/objs-gcc.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh index ea7820f33fac..d205bab17368 100755 --- a/contrib/regression/objs-gcc.sh +++ b/contrib/regression/objs-gcc.sh @@ -106,7 +106,9 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ] make all-gdb all-dejagnu all-ld || exit 1 make install-gdb install-dejagnu install-ld || exit 1 elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 + H_MAKE_TARGET= + test -f $SOURCE/gcc/configure && H_MAKE_TARGET=bootstrap + make $H_MAKE_TARGET || exit 1 make install || exit 1 else make || exit 1 -- 2.30.2