summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-06-10 08:59:58 +0000
committerwiz <wiz@pkgsrc.org>2011-06-10 08:59:58 +0000
commitea6c37c01ad10d4c3211b5ce5c7386e5b5c024ff (patch)
tree3f12f515e97eb61ea16a34d54762e8b2feb79c89 /mk
parent22a82209d74695bd11cdd73984eff341511f0283 (diff)
downloadpkgsrc-ea6c37c01ad10d4c3211b5ce5c7386e5b5c024ff.tar.gz
Support gcc-4.5 and gcc-4.6. Some testing by Jörn Clausen.
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler/gcc.mk73
1 files changed, 67 insertions, 6 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 2b98b28d8e2..e09c14c4bf1 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.108 2011/02/25 13:34:56 hans Exp $
+# $NetBSD: gcc.mk,v 1.109 2011/06/10 08:59:58 wiz Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -73,7 +73,7 @@ GCC_REQD+= 3.0
# _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc
# without the PKGREVISIONs.
#
-_GCC_DIST_VERSION= 4.4.5
+_GCC_DIST_VERSION= 4.6.0
# _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].* \
@@ -86,8 +86,14 @@ _GCC3_PATTERNS= 2.95.[4-9]* 2.95.[1-9][0-9]* 2.9[6-9] 2.9[6-9].* \
# _GCC34_PATTERNS matches N s.t. 3.4 <= N < 4.
_GCC34_PATTERNS= 3.[4-9] 3.[4-9].* 3.[1-9][0-9]*
-# _GCC44_PATTERNS matches N s.t. 4.4 <= N.
-_GCC44_PATTERNS= 4.[4-9] 4.[4-9].* 4.[1-9][0-9]* [4-9]*
+# _GCC44_PATTERNS matches N s.t. 4.4 <= N < 4.5.
+_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]*
# _CC is the full path to the compiler named by ${CC} if it can be found.
.if !defined(_CC)
@@ -189,9 +195,22 @@ _NEED_GCC44?= no
_NEED_GCC44= yes
. endif
.endfor
+_NEED_GCC45?= no
+.for _pattern_ in ${_GCC45_PATTERNS}
+. if !empty(_GCC_REQD:M${_pattern_})
+_NEED_GCC45= yes
+. endif
+.endfor
+_NEED_GCC46?= no
+.for _pattern_ in ${_GCC46_PATTERNS}
+. if !empty(_GCC_REQD:M${_pattern_})
+_NEED_GCC46= 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])
-_NEED_GCC44= yes
+ !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
.endif
# Assume by default that GCC will only provide a C compiler.
@@ -204,6 +223,10 @@ LANGUAGES.gcc= c c++ fortran fortran77 java objc
LANGUAGES.gcc= c c++ fortran fortran77 objc
.elif !empty(_NEED_GCC44:M[yY][eE][sS])
LANGUAGES.gcc= c c++ fortran fortran77 java objc
+.elif !empty(_NEED_GCC45:M[yY][eE][sS])
+LANGUAGES.gcc= c c++ fortran fortran77 java objc
+.elif !empty(_NEED_GCC46:M[yY][eE][sS])
+LANGUAGES.gcc= c c++ fortran fortran77 java objc
.endif
_LANGUAGES.gcc= # empty
.for _lang_ in ${USE_LANGUAGES}
@@ -294,6 +317,44 @@ _GCC_DEPENDENCY= gcc44>=${_GCC_REQD}:../../lang/gcc44
_USE_GCC_SHLIB?= yes
. endif
. endif
+.elif !empty(_NEED_GCC45:M[yY][eE][sS])
+#
+# We require gcc-4.5.x in the lang/gcc45 directory.
+#
+_GCC_PKGBASE= gcc45
+. if !empty(PKGPATH:Mlang/gcc45)
+_IGNORE_GCC= yes
+MAKEFLAGS+= _IGNORE_GCC=yes
+. endif
+. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
+_GCC_PKGSRCDIR= ../../lang/gcc45
+_GCC_DEPENDENCY= gcc45>=${_GCC_REQD}:../../lang/gcc45
+. if !empty(_LANGUAGES.gcc:Mc++) || \
+ !empty(_LANGUAGES.gcc:Mfortran) || \
+ !empty(_LANGUAGES.gcc:Mfortran77) || \
+ !empty(_LANGUAGES.gcc:Mobjc)
+_USE_GCC_SHLIB?= yes
+. endif
+. endif
+.elif !empty(_NEED_GCC46:M[yY][eE][sS])
+#
+# We require gcc-4.6.x in the lang/gcc46 directory.
+#
+_GCC_PKGBASE= gcc46
+. if !empty(PKGPATH:Mlang/gcc46)
+_IGNORE_GCC= yes
+MAKEFLAGS+= _IGNORE_GCC=yes
+. endif
+. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
+_GCC_PKGSRCDIR= ../../lang/gcc46
+_GCC_DEPENDENCY= gcc46>=${_GCC_REQD}:../../lang/gcc46
+. if !empty(_LANGUAGES.gcc:Mc++) || \
+ !empty(_LANGUAGES.gcc:Mfortran) || \
+ !empty(_LANGUAGES.gcc:Mfortran77) || \
+ !empty(_LANGUAGES.gcc:Mobjc)
+_USE_GCC_SHLIB?= yes
+. endif
+. endif
.endif
_GCC_DEPENDS= ${_GCC_PKGBASE}>=${_GCC_REQD}