diff options
author | maya <maya@pkgsrc.org> | 2016-09-13 07:59:15 +0000 |
---|---|---|
committer | maya <maya@pkgsrc.org> | 2016-09-13 07:59:15 +0000 |
commit | f31816d563a1da75cc1c06030bc07554e2ebe293 (patch) | |
tree | 50dc20f4667bb6a75bf55a92ee5b3ae960ce0180 /mk | |
parent | 7fe79cc8077175ddd439044ac7c68fb39c848597 (diff) | |
download | pkgsrc-f31816d563a1da75cc1c06030bc07554e2ebe293.tar.gz |
Add logic so GCC_REQD+=6.x works
ok jperkin@
Diffstat (limited to 'mk')
-rw-r--r-- | mk/compiler/gcc.mk | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index c92441b0a1e..2792285f5be 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.168 2016/06/13 13:26:42 jperkin Exp $ +# $NetBSD: gcc.mk,v 1.169 2016/09/13 07:59:15 maya Exp $ # # This is the compiler definition for the GNU Compiler Collection. # @@ -105,7 +105,7 @@ GCC_REQD+= 20120614 # _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc # without the PKGREVISIONs. -_GCC_DIST_NAME:= gcc5 +_GCC_DIST_NAME:= gcc6 .include "../../lang/${_GCC_DIST_NAME}/version.mk" _GCC_DIST_VERSION:= ${${_GCC_DIST_NAME:tu}_DIST_VERSION} @@ -141,6 +141,9 @@ _GCC49_PATTERNS= 4.9 4.9.* # _GCC5_PATTERNS matches N s.t. 5.0 <= N < 6. _GCC5_PATTERNS= 5.* +# _GCC6_PATTERNS matches N s.t. 6.0 <= N < 7. +_GCC6_PATTERNS= 6.* + # _GCC_AUX_PATTERNS matches 8-digit date YYYYMMDD* _GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]* @@ -287,6 +290,12 @@ _NEED_GCC5?= no _NEED_GCC5= yes . endif .endfor +_NEED_GCC6?= no +.for _pattern_ in ${_GCC6_PATTERNS} +. if !empty(_GCC_REQD:M${_pattern_}) +_NEED_GCC6= yes +. endif +.endfor _NEED_GCC_AUX?= no .for _pattern_ in ${_GCC_AUX_PATTERNS} . if !empty(_GCC_REQD:M${_pattern_}) @@ -299,8 +308,8 @@ _NEED_NEWER_GCC=NO !empty(_NEED_GCC45:M[nN][oO]) && !empty(_NEED_GCC46:M[nN][oO]) && \ !empty(_NEED_GCC47:M[nN][oO]) && !empty(_NEED_GCC48:M[nN][oO]) && \ !empty(_NEED_GCC49:M[nN][oO]) && !empty(_NEED_GCC5:M[nN][oO]) && \ - !empty(_NEED_GCC_AUX:M[nN][oO]) -_NEED_GCC5= yes + !empty(_NEED_GCC6:M[nN][oO]) && !empty(_NEED_GCC_AUX:M[nN][oO]) +_NEED_GCC6= yes .endif # Assume by default that GCC will only provide a C compiler. @@ -325,6 +334,8 @@ LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC5:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ +.elif !empty(_NEED_GCC6:M[yY][eE][sS]) +LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ .elif !empty(_NEED_GCC_AUX:M[yY][eE][sS]) LANGUAGES.gcc= c c++ fortran fortran77 objc ada .endif @@ -589,6 +600,27 @@ _GCC_DEPENDENCY= gcc5>=${_GCC_REQD}:../../lang/gcc5 _USE_GCC_SHLIB?= yes . endif . endif +.elif !empty(_NEED_GCC6:M[yY][eE][sS]) +# +# We require gcc-6.x in the lang/gcc6-* directory. +# +_GCC_PKGBASE= gcc6 +. if !empty(PKGPATH:Mlang/gcc6) +_IGNORE_GCC= yes +MAKEFLAGS+= _IGNORE_GCC=yes +. endif +. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) +_GCC_PKGSRCDIR= ../../lang/gcc6 +_GCC_DEPENDENCY= gcc6>=${_GCC_REQD}:../../lang/gcc6 +. 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 .elif !empty(_NEED_GCC_AUX:M[yY][eE][sS]) # # We require Ada-capable compiler in the lang/gcc-aux directory. @@ -931,6 +963,8 @@ PREPEND_PATH+= ${_GCC_DIR}/bin . include "../../lang/gcc49-libs/buildlink3.mk" . elif !empty(CC_VERSION:Mgcc-5.*) . include "../../lang/gcc5-libs/buildlink3.mk" +. elif !empty(CC_VERSION:Mgcc-6.*) +. include "../../lang/gcc6-libs/buildlink3.mk" . else PKG_FAIL_REASON+= "No USE_PKGSRC_GCC_RUNTIME support for ${CC_VERSION}" . endif |