aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.gcc.mk
diff options
context:
space:
mode:
authorgerald <gerald@FreeBSD.org>2013-03-03 11:21:29 +0800
committergerald <gerald@FreeBSD.org>2013-03-03 11:21:29 +0800
commit90b75fcdd1f7495abf6a17dbb9bfd4fa2adae0a3 (patch)
tree1753b5ba3ab354c28257a36b7c6a34ab802e8fb0 /Mk/bsd.gcc.mk
parent3d133b9749653c4513796bab9ac5d815062a1792 (diff)
downloadfreebsd-ports-gnome-90b75fcdd1f7495abf6a17dbb9bfd4fa2adae0a3.tar.gz
freebsd-ports-gnome-90b75fcdd1f7495abf6a17dbb9bfd4fa2adae0a3.tar.zst
freebsd-ports-gnome-90b75fcdd1f7495abf6a17dbb9bfd4fa2adae0a3.zip
Do not just rely on the version number of FreeBSD in deciding whether
a certain version of GCC is in the base, but also check the existence of /usr/bin/gcc. This unbreaks systems where GCC is not built as part of the world, and instead relies on versions of GCC in the Ports Collection there. PR: 175252 Submitted by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>
Diffstat (limited to 'Mk/bsd.gcc.mk')
-rw-r--r--Mk/bsd.gcc.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk
index 6bf8a1713683..c4f494f8d6ea 100644
--- a/Mk/bsd.gcc.mk
+++ b/Mk/bsd.gcc.mk
@@ -150,7 +150,9 @@ IGNORE= Unknown version of GCC specified (USE_GCC=${USE_GCC})
_GCC_FOUND${v}= port
. endif
. if ${OSVERSION} >= ${_GCCVERSION_${v}_L} && ${OSVERSION} < ${_GCCVERSION_${v}_R}
+. if exists(/usr/bin/gcc)
_GCC_FOUND${v}:= base
+. endif
. endif
.endfor
@@ -194,7 +196,7 @@ _USE_GCC:= ${GCC_DEFAULT_VERSION}
# dependencies, CC, CXX, CPP, and flags.
.for v in ${GCCVERSIONS}
. if ${_USE_GCC} == ${_GCCVERSION_${v}_V}
-. if ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R}
+. if ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R} || !exists(/usr/bin/gcc)
V:= ${_GCCVERSION_${v}_V:S/.//}
_GCC_PORT_DEPENDS:= gcc${V}
. if ${_USE_GCC} == ${GCC_DEFAULT_VERSION}
@@ -219,7 +221,7 @@ FFLAGS+= -Wl,-rpath=${_GCC_RUNTIME}
# ever telling us; to be fixed.
_GCC_BUILD_DEPENDS:= ${_GCC_PORT_DEPENDS}
. endif # ${_USE_GCC} != 3.4
-. else # ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R}
+. else # Use GCC in base.
CC:= gcc
CXX:= g++
. if exists(/usr/bin/gcpp)
@@ -227,7 +229,7 @@ CPP:= gcpp
. else
CPP:= cpp
. endif
-. endif # ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R}
+. endif # Use GCC in base.
. endif # ${_USE_GCC} == ${_GCCVERSION_${v}_V}
.endfor
.undef V