Date: Sun, 7 Oct 2012 19:33:19 +0000 (UTC) From: Mark Linimon <linimon@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r305504 - head/Mk Message-ID: <201210071933.q97JXJmb057483@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: linimon Date: Sun Oct 7 19:33:19 2012 New Revision: 305504 URL: http://svn.freebsd.org/changeset/ports/305504 Log: Introduce the new semantic USE_GCC=any, which can be set in any port Makefile. For systems where CC is gcc, this has no effect. For systems where CC is clang, this forces the use of the base GCC suite. (Some forward compatibility is also covered in the patch.) Confirmed to have no ill-effects via multiple runs with gcc as CC: http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.8-exp-bcm.20121006012556.pointyhat-west/ and clang as CC: http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp-clang.20121005165436.pointyhat-west/ This change is necessary (but insufficient) for the upcoming switch to clang as CC for the tier-1 architectures. Finally, accept FORCE_BASE_CC_FOR_TESTING as an override for USE_GCC, for those who wish to help debug ports with clang. It is an absolute override; it overrides not only the value "any" but also any value such as "4.4+". Reviewed by: brooks, gerald Approved by: maintainer (gerald) Modified: head/Mk/bsd.gcc.mk Modified: head/Mk/bsd.gcc.mk ============================================================================== --- head/Mk/bsd.gcc.mk Sun Oct 7 19:31:17 2012 (r305503) +++ head/Mk/bsd.gcc.mk Sun Oct 7 19:33:19 2012 (r305504) @@ -100,7 +100,16 @@ MAKE_ENV+= F77="${F77}" FC="${FC}" FFLA .endif -.if defined(USE_GCC) +.if defined(USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING) + +. if ${USE_GCC} == any + +# enable the clang-is-cc workaround. default to the last gcc imported +# into base. +_USE_GCC:= 4.2 +_GCC_ORLATER:= true + +. else # ${USE_GCC} == any # See if we can use a later version or exclusively the one specified. _USE_GCC:= ${USE_GCC:S/+//} @@ -108,6 +117,8 @@ _USE_GCC:= ${USE_GCC:S/+//} _GCC_ORLATER:= true .endif +. endif # ${USE_GCC} == any + # Check if USE_GCC points to a valid version. .for v in ${GCCVERSIONS} . for j in ${GCCVERSION_${v}} @@ -200,9 +211,17 @@ FFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} # The following is for the sakes of some ports which use this without # 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} +CC:= gcc +CXX:= g++ +. if exists(/usr/bin/gcpp) +CPP:= gcpp +. else +CPP:= cpp . endif -. endif -. endif +. endif # ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R} +. endif # ${_USE_GCC} == ${_GCCVERSION_${v}_V} .endfor .undef V @@ -217,7 +236,7 @@ USE_BINUTILS= yes . endif . endif .endif -.endif # defined(_USE_GCC) +.endif # defined(_USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING) test-gcc:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210071933.q97JXJmb057483>