pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lang/gcc46 as pkgsrc compiler?



On Fri, Jun 10, 2011 at 10:17:25AM +0200, Jörn Clausen wrote:
> I just had to do a fresh bootstrap of my pkgsrc tree (on Solaris,
> using Sun Studio), and decided to switch from lang/gcc34 to a more
> recent version. lang/gcc46 compiled and installed fine. But now
> every other package fails with
> 
> ERROR: This package has set PKG_FAIL_REASON:
> ERROR: Unable to satisfy dependency: gcc44>=4.6.0
> 
> Is gcc44 the latest version that is allowed per mk/compiler/gcc.mk?

Yes. I have made an (untested) patch allowing gcc 4.5 and 4.6.
Let me know how it goes...
 Thomas
Index: gcc.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/compiler/gcc.mk,v
retrieving revision 1.108
diff -u -r1.108 gcc.mk
--- gcc.mk      25 Feb 2011 13:34:56 -0000      1.108
+++ gcc.mk      7 Jun 2011 21:26:26 -0000
@@ -73,7 +73,7 @@
 # _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 @@
 # _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=   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 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 @@
 _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}
 


Home | Main Index | Thread Index | Old Index