tech-pkg archive

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

Re: Supporting GCC_REQ+=7 as well as GCC_REQ+=7.0



The following patch tweaks _GCC*_PATTERNS to match 4, 5 6 and 7, and the USE_PKGSRC_GCC_RUNTIME block to use _GCC_PKGBASE

Does this look reasonable to people?

(I have another set of patches to add initial GCC_REQ+=8 support, but wanted to get this covered first :-p)

Thanks

David

On Sat, 6 Oct 2018 at 15:55, Greg Troxel <gdt%lexort.com@localhost> wrote:

David Brownlee <abs%absd.org@localhost> writes:

> At the moment specifying GCC_REQ+=7 will fail with the rather cryptic "No
> USE_PKGSRC_GCC_RUNTIME support for gcc-7" if the package needs shared
> libraries (but work if shared libraries are not needed).
>
> What do people think about making GCC_REQ+=7 a synonym for GCC_REQ+=7.0.
> Otherwise it probably makes sense to tweak gcc.mk to explicitly error out
> with a more helpful message in this case :)

I think it's a bug that we use 5.0, 6.0, and 7.0 in GCC_REQ, instead of
5/6/7.  We have had gcc 4.1.x, 4.5.x, and 4.8.x in netbsd-5/6/7, and
used 4.8 as the value for all micro/minor releases on that major
release.  With the change to 5.x, 6,x, 7.x, there are now version
numbers for minor and micro, and it's not really 5.0 that's required,
but 5.x (e.g. netbsd-8 has 5.5.0).

And it would be good to have an error if the variable is set to
something that's not explicitly supported, regardless.
Index: mk/compiler/gcc.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/compiler/gcc.mk,v
retrieving revision 1.194
diff -u -r1.194 gcc.mk
--- mk/compiler/gcc.mk	8 Oct 2018 20:02:17 -0000	1.194
+++ mk/compiler/gcc.mk	9 Oct 2018 10:17:26 -0000
@@ -125,7 +125,7 @@
 _GCC34_PATTERNS= 3.[4-9] 3.[4-9].* 3.[1-9][0-9]*
 
 # _GCC44_PATTERNS matches N s.t. 4.0 <= N < 4.5.
-_GCC44_PATTERNS= 4.[0-4] 4.[0-4].*
+_GCC44_PATTERNS= 4 4.[0-4] 4.[0-4].*
 
 # _GCC48_PATTERNS matches N s.t. 4.5 <= N < 4.9.
 _GCC48_PATTERNS= 4.[5-8] 4.[5-8].*
@@ -134,13 +134,13 @@
 _GCC49_PATTERNS= 4.9 4.9.*
 
 # _GCC5_PATTERNS matches N s.t. 5.0 <= N < 6.
-_GCC5_PATTERNS= 5.*
+_GCC5_PATTERNS= 5 5.*
 
 # _GCC6_PATTERNS matches N s.t. 6.0 <= N < 7.
-_GCC6_PATTERNS= 6.*
+_GCC6_PATTERNS= 6 6.*
 
 # _GCC7_PATTERNS matches N s.t. 7.0 <= N < 8.
-_GCC7_PATTERNS= 7.*
+_GCC7_PATTERNS= 7 7.*
 
 # _GCC_AUX_PATTERNS matches 8-digit date YYYYMMDD*
 _GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]*
@@ -907,15 +907,15 @@
 #  Special case packages which are themselves a dependency of gcc runtime.
 .  if empty(PKGPATH:Mdevel/libtool-base) && empty(PKGPATH:Mdevel/binutils) && \
       empty(PKGPATH:Mlang/gcc4?) && empty(PKGPATH:Mlang/gcc[5-9])
-.    if !empty(CC_VERSION:Mgcc-4.8*)
+.    if !empty(_GCC_PKGBASE:Mgcc48)
 .      include "../../lang/gcc48-libs/buildlink3.mk"
-.    elif !empty(CC_VERSION:Mgcc-4.9*)
+.    elif !empty(_GCC_PKGBASE:Mgcc49)
 .      include "../../lang/gcc49-libs/buildlink3.mk"
-.    elif !empty(CC_VERSION:Mgcc-5.*)
+.    elif !empty(_GCC_PKGBASE:Mgcc5)
 .      include "../../lang/gcc5-libs/buildlink3.mk"
-.    elif !empty(CC_VERSION:Mgcc-6.*)
+.    elif !empty(_GCC_PKGBASE:Mgcc6)
 .      include "../../lang/gcc6-libs/buildlink3.mk"
-.    elif !empty(CC_VERSION:Mgcc-7.*)
+.    elif !empty(_GCC_PKGBASE:Mgcc7)
 .      include "../../lang/gcc7-libs/buildlink3.mk"
 .    else
 PKG_FAIL_REASON+=	"No USE_PKGSRC_GCC_RUNTIME support for ${CC_VERSION}"


Home | Main Index | Thread Index | Old Index