[toolchain] Removing default build of gcc
Gerald Pfeifer
gerald at pfeifer.com
Sun Mar 3 20:00:16 UTC 2013
On Sat, 26 Jan 2013, Konstantin Belousov wrote:
> Ports should use port-provided compiler, and be untangled from the base
> toolchain. I believe that forcing ports committers to port 20K+ packages
> to clang is a waste of the FreeBSD resources and is is destined to fail
> despite the efforts.
I agree that using a ports-provided compiler sounds like a good
idea. (I am not sure that porting everything to clang will fail,
though.)
Anyway, I'll do what I can to support flexibility on the ports
side, and with the patch below we should now able to support a
world without GCC in the base.
Please let me know if there is more you need or problems still
in place.
Gerald
Author: gerald
Date: Sun Mar 3 03:21:29 2013
New Revision: 313323
URL: http://svnweb.freebsd.org/changeset/ports/313323
Log:
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 at kbh.biglobe.ne.jp>
Modified:
head/Mk/bsd.gcc.mk
Modified: head/Mk/bsd.gcc.mk
==============================================================================
--- head/Mk/bsd.gcc.mk Sun Mar 3 02:51:25 2013 (r313322)
+++ head/Mk/bsd.gcc.mk Sun Mar 3 03:21:29 2013 (r313323)
@@ -150,7 +150,9 @@ IGNORE= Unknown version of GCC specified
_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
More information about the freebsd-toolchain
mailing list