diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2012-10-07 19:33:19 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2012-10-07 19:33:19 +0000 |
commit | c220f202a95c2e8d58fe4f9f32ebac98240b89b4 (patch) | |
tree | f95395c102a0b3870cb9ebe07e5d79174622a8e9 /Mk/bsd.gcc.mk | |
parent | d5a5903a44dbafffa29ebfdd67ea06c4e66efa9c (diff) | |
download | ports-c220f202a95c2e8d58fe4f9f32ebac98240b89b4.tar.gz ports-c220f202a95c2e8d58fe4f9f32ebac98240b89b4.zip |
Notes
Diffstat (limited to 'Mk/bsd.gcc.mk')
-rw-r--r-- | Mk/bsd.gcc.mk | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk index 72fe92ea9a60..25883ae3aa5e 100644 --- a/Mk/bsd.gcc.mk +++ b/Mk/bsd.gcc.mk @@ -100,7 +100,16 @@ MAKE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" .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: |