Received: by mail.netbsd.org (Postfix, from userid 605) id 8B36084D99; Wed, 18 Sep 2019 06:35:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 11C4384D82 for ; Wed, 18 Sep 2019 06:35:14 +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 w-6ExAnNKVBb for ; Wed, 18 Sep 2019 06:35:13 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id EA6C184CD4 for ; Wed, 18 Sep 2019 06:35:12 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id DB15EFBF4; Wed, 18 Sep 2019 06:35:12 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1568788512233720" MIME-Version: 1.0 Date: Wed, 18 Sep 2019 06:35:12 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/mk/compiler To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20190918063512.DB15EFBF4@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. --_----------=_1568788512233720 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Wed Sep 18 06:35:12 UTC 2019 Modified Files: pkgsrc/mk/compiler: gcc.mk Log Message: mk/compiler/gcc.mk: search for GCCBASE/bin/gcc as well A default installation of GCC doesn't install bin/cc but only bin/gcc. Adding bin/cc is only done by the pgksrc packages, not by the upstream package. The previous strategy of just checking whether ${GCCBASE}/bin/${CC:[1]} exists did not work in such a situation. Therefore, if CC still has its default value from sys.mk, that is changed to the intended gcc, which then detects the base GCC properly. See https://mail-index.netbsd.org/pkgsrc-users/2019/09/07/msg029329.html. See https://mail-index.netbsd.org/tech-pkg/2019/09/18/msg021976.html. To generate a diff of this commit: cvs rdiff -u -r1.205 -r1.206 pkgsrc/mk/compiler/gcc.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1568788512233720 Content-Disposition: inline Content-Length: 876 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/mk/compiler/gcc.mk diff -u pkgsrc/mk/compiler/gcc.mk:1.205 pkgsrc/mk/compiler/gcc.mk:1.206 --- pkgsrc/mk/compiler/gcc.mk:1.205 Wed Sep 18 06:15:13 2019 +++ pkgsrc/mk/compiler/gcc.mk Wed Sep 18 06:35:12 2019 @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.205 2019/09/18 06:15:13 rillig Exp $ +# $NetBSD: gcc.mk,v 1.206 2019/09/18 06:35:12 rillig Exp $ # # This is the compiler definition for the GNU Compiler Collection. # @@ -185,6 +185,11 @@ _GCC8_PATTERNS= 8 8.* # _GCC_AUX_PATTERNS matches 8-digit date YYYYMMDD* _GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]* +# Override the default from sys.mk if necessary. +.if ${CC} == cc && ${GCCBASE:U} && !exists(${GCCBASE}/bin/${CC}) && exists(${GCCBASE}/bin/gcc) +CC= gcc +.endif + # _CC is the full path to the compiler named by ${CC} if it can be found. .if !defined(_CC) _CC:= ${CC:[1]} --_----------=_1568788512233720--