diff options
author | sbd <sbd@pkgsrc.org> | 2012-04-16 05:03:03 +0000 |
---|---|---|
committer | sbd <sbd@pkgsrc.org> | 2012-04-16 05:03:03 +0000 |
commit | 16542e9a3baca1a246d74650244fd475b4ae60ca (patch) | |
tree | db8349eb9e85cac473c2f9ccab6c03b623becad7 /mk/compiler/gcc.mk | |
parent | e1a1da00f64cd21f15ea890c5bd104a52ca0f8e7 (diff) | |
download | pkgsrc-16542e9a3baca1a246d74650244fd475b4ae60ca.tar.gz |
Add support for gcc-4.7
Diffstat (limited to 'mk/compiler/gcc.mk')
-rw-r--r-- | mk/compiler/gcc.mk | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index bbd26d87ade..8e7c9e5f5d0 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.117 2012/04/16 05:00:44 sbd Exp $ +# $NetBSD: gcc.mk,v 1.118 2012/04/16 05:03:03 sbd Exp $ # # This is the compiler definition for the GNU Compiler Collection. # @@ -85,7 +85,8 @@ GCC_REQD+= 3.0 # _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc # without the PKGREVISIONs. # -_GCC_DIST_VERSION= 4.6.3 +.include "../../lang/gcc47/version.mk" +_GCC_DIST_VERSION:= ${GCC_DIST_VERSION} # _GCC2_PATTERNS matches N s.t. N <= 2.95.3. _GCC2_PATTERNS= [0-1].* 2.[0-9] 2.[0-9].* 2.[1-8][0-9] 2.[1-8][0-9].* \ @@ -104,8 +105,11 @@ _GCC44_PATTERNS= 4.4 4.4.* # _GCC45_PATTERNS matches N s.t. 4.5 <= N < 4.6. _GCC45_PATTERNS= 4.5 4.5.* -# _GCC46_PATTERNS matches N s.t. 4.6 <= N. -_GCC46_PATTERNS= 4.[6-9] 4.[6-9].* 4.[1-9][0-9]* [4-9]* +# _GCC46_PATTERNS matches N s.t. 4.6 <= N < 4.7. +_GCC46_PATTERNS= 4.6 4.6.* + +# _GCC46_PATTERNS matches N s.t. 4.7 <= N. +_GCC47_PATTERNS= 4.[7-9] 4.[7-9].* 4.[1-9][0-9]* [4-9]* # _CC is the full path to the compiler named by ${CC} if it can be found. .if !defined(_CC) @@ -224,10 +228,16 @@ _NEED_GCC46?= no _NEED_GCC46= yes . endif .endfor +.for _pattern_ in ${_GCC47_PATTERNS} +. if !empty(_GCC_REQD:M${_pattern_}) +_NEED_GCC47= yes +. endif +.endfor .if !empty(_NEED_GCC2:M[nN][oO]) && !empty(_NEED_GCC3:M[nN][oO]) && \ !empty(_NEED_GCC34:M[nN][oO]) && !empty(_NEED_GCC44:M[nN][oO]) && \ - !empty(_NEED_GCC45:M[nN][oO]) && !empty(_NEED_GCC46:M[nN][oO]) -_NEED_GCC46= yes + !empty(_NEED_GCC45:M[nN][oO]) && !empty(_NEED_GCC46:M[nN][oO]) && \ + !empty(_NEED_GCC47:M[nN][oO]) +_NEED_GCC47= yes .endif # Assume by default that GCC will only provide a C compiler. @@ -244,6 +254,8 @@ LANGUAGES.gcc= c c++ fortran fortran77 java objc LANGUAGES.gcc= c c++ fortran fortran77 java objc .elif !empty(_NEED_GCC46:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 java objc +.elif !empty(_NEED_GCC47:M[yY][eE][sS]) +LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .endif _LANGUAGES.gcc= # empty .for _lang_ in ${USE_LANGUAGES} @@ -372,6 +384,27 @@ _GCC_DEPENDENCY= gcc46>=${_GCC_REQD}:../../lang/gcc46 _USE_GCC_SHLIB?= yes . endif . endif +.elif !empty(_NEED_GCC47:M[yY][eE][sS]) +# +# We require gcc-4.7.x in the lang/gcc47 directory. +# +_GCC_PKGBASE= gcc47 +. if !empty(PKGPATH:Mlang/gcc47) +_IGNORE_GCC= yes +MAKEFLAGS+= _IGNORE_GCC=yes +. endif +. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) +_GCC_PKGSRCDIR= ../../lang/gcc47 +_GCC_DEPENDENCY= gcc47>=${_GCC_REQD}:../../lang/gcc47 +. if !empty(_LANGUAGES.gcc:Mc++) || \ + !empty(_LANGUAGES.gcc:Mfortran) || \ + !empty(_LANGUAGES.gcc:Mfortran77) || \ + !empty(_LANGUAGES.gcc:Mgo) || \ + !empty(_LANGUAGES.gcc:Mobjc) || \ + !empty(_LANGUAGES.gcc:Mobj-c++) +_USE_GCC_SHLIB?= yes +. endif +. endif .endif _GCC_DEPENDS= ${_GCC_PKGBASE}>=${_GCC_REQD} |