Add support for gcc-4.7
This commit is contained in:
parent
e3fd6d777e
commit
20dc1bb8fe
1 changed files with 39 additions and 6 deletions
|
@ -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}
|
||||
|
||||
|
|
Loading…
Reference in a new issue