From c0cbcbcea89264b3d16a2598637162584689c6a1 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 26 Sep 2007 22:14:17 +0000 Subject: [PATCH] Fix a bootstrapping issue with the change of the default gcc to 4.1. If the host does not have gcc-4.1 installed use gcc-3.4 for HOST_CCVER (that is, the compiler used in the bootstrap portion of the build). --- share/mk/bsd.cpu.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 578538252f..e7aa9a2f3b 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.2.2.5 2002/07/19 08:09:32 ru Exp $ -# $DragonFly: src/share/mk/bsd.cpu.mk,v 1.15 2007/09/09 15:43:38 swildner Exp $ +# $DragonFly: src/share/mk/bsd.cpu.mk,v 1.16 2007/09/26 22:14:17 dillon Exp $ # include compiler-specific bsd.cpu.mk. Note that CCVER may or may not # be passed as an environment variable. If not set we make it consistent @@ -11,10 +11,17 @@ # HOST_CCVER is used by the native system compiler and defaults to CCVER. # It is not subject to local CCVER overrides in Makefiles and it is inherited # by all sub-makes. +# +# If the host system does not have the desired compiler for HOST_CCVER +# we back off to something it probably does have. CCVER ?= gcc41 _CCVER := ${CCVER} +.if exists(/usr/libexec/${_CCVER}/cc) HOST_CCVER?= ${_CCVER} +.else +HOST_CCVER?= gcc34 +.endif .if ${CCVER} == "gcc34" . include -- 2.41.0