Received: by mail.netbsd.org (Postfix, from userid 605) id DD03A84D62; Mon, 25 May 2020 07:33:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 6540984D45 for ; Mon, 25 May 2020 07:33:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 0yXa0iVvccdC for ; Mon, 25 May 2020 07:32:59 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id CEA5884CEF for ; Mon, 25 May 2020 07:32:59 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id C38A8FB27; Mon, 25 May 2020 07:32:59 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1590391979123520" MIME-Version: 1.0 Date: Mon, 25 May 2020 07:32:59 +0000 From: "Jonathan Perkin" Subject: CVS commit: pkgsrc/bootstrap To: pkgsrc-changes@NetBSD.org Reply-To: jperkin@netbsd.org X-Mailer: log_accum Message-Id: <20200525073259.C38A8FB27@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1590391979123520 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: jperkin Date: Mon May 25 07:32:59 UTC 2020 Modified Files: pkgsrc/bootstrap: bootstrap Log Message: bootstrap: Consolidate setting of CC if unset. Should fix issue seen on IRIX where --compiler was specified but CC was not passed to bootstrap, resulting in "gcc" being picked as the default. To generate a diff of this commit: cvs rdiff -u -r1.279 -r1.280 pkgsrc/bootstrap/bootstrap Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1590391979123520 Content-Disposition: inline Content-Length: 2327 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/bootstrap/bootstrap diff -u pkgsrc/bootstrap/bootstrap:1.279 pkgsrc/bootstrap/bootstrap:1.280 --- pkgsrc/bootstrap/bootstrap:1.279 Wed May 6 15:34:31 2020 +++ pkgsrc/bootstrap/bootstrap Mon May 25 07:32:59 2020 @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.279 2020/05/06 15:34:31 jperkin Exp $ +# $NetBSD: bootstrap,v 1.280 2020/05/25 07:32:59 jperkin Exp $ # # Copyright (c) 2001-2011 Alistair Crooks # All rights reserved. @@ -1003,10 +1003,8 @@ if [ "$compiler" = "" ] && [ x"$check_co # Clang pretends to be GCC, so we have to check it first. if [ $compiler_is_clang -gt 0 ]; then compiler="clang" - test -n "$CC" || CC=clang elif [ $compiler_is_gnu -gt 0 ]; then compiler="gcc" - test -n "$CC" || CC=gcc else case "$opsys" in IRIX) @@ -1015,15 +1013,22 @@ if [ "$compiler" = "" ] && [ x"$check_co else compiler="ido" fi - test -n "$CC" || CC=cc ;; SunOS) compiler="sunpro" - test -n "$CC" || CC=cc ;; esac fi fi +case "$compiler" in +clang|gcc) + test -n "$CC" || CC=$compiler + ;; +*) + test -n "$CC" || CC=cc + ;; +esac + has_ssp_support() { mkdir_p_early ${wrkdir}/tmp echo 'int main(void){return 0;}' > ${wrkdir}/tmp/ssp.c @@ -1237,7 +1242,6 @@ run_cmd "(cd $wrkdir/libnbcompat; $shpro case "$need_ksh" in yes) echo_msg "Bootstrapping ksh" copy_src $pkgsrcdir/shells/pdksh/files ksh - test -n "$CC" || CC=gcc # default to gcc if no compiler is specified run_cmd "(cd $wrkdir/ksh && env $BSTRAP_ENV $shprog ./configure $configure_quiet_flags --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir && $bmake $make_quiet_flags -j$make_jobs)" run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/ksh/ksh $wrkdir/bin/pdksh" echo "TOOLS_PLATFORM.sh?= $prefix/bin/pdksh" >> ${TARGET_MKCONF} @@ -1255,7 +1259,6 @@ esac case "$need_awk" in yes) echo_msg "Bootstrapping awk" copy_src $pkgsrcdir/lang/nawk/files awk - test -n "$CC" || CC=gcc # default to gcc if no compiler is specified run_cmd "(cd $wrkdir/awk && $bmake $make_quiet_flags -j$make_jobs -f Makefile CC=\"${CC}\" CFLAGS=\"${CFLAGS}\")" run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/awk/a.out $wrkdir/bin/nawk" echo "TOOLS_PLATFORM.awk?= $prefix/bin/nawk" >> ${TARGET_MKCONF} --_----------=_1590391979123520--