Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/compiler mk/compiler: Support GCC_REQD=9 or 10



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0f8cd310c5bc
branches:  trunk
changeset: 437891:0f8cd310c5bc
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Wed Sep 02 16:16:43 2020 +0000

description:
mk/compiler: Support GCC_REQD=9 or 10

A pert of PR pkg/55637.

diffstat:

 mk/compiler/gcc.mk |  75 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 71 insertions(+), 4 deletions(-)

diffs (138 lines):

diff -r 7b627b43b4c0 -r 0f8cd310c5bc mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Wed Sep 02 16:15:05 2020 +0000
+++ b/mk/compiler/gcc.mk        Wed Sep 02 16:16:43 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.213 2020/06/02 06:58:13 rillig Exp $
+# $NetBSD: gcc.mk,v 1.214 2020/09/02 16:16:43 ryoon Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -96,7 +96,8 @@
        _LINKER_RPATH_FLAG \
        _NEED_GCC2 _NEED_GCC3 _NEED_GCC34 _NEED_GCC44 \
        _NEED_GCC48 _NEED_GCC49 _NEED_GCC5 _NEED_GCC6 \
-       _NEED_GCC7 _NEED_GCC8 _NEED_GCC_AUX _NEED_NEWER_GCC \
+       _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 _NEED_GCC9 \
+       _NEED_GCC_AUX _NEED_NEWER_GCC \
        _PKGSRC_GCC_VERSION \
        _USE_GCC_SHLIB _USE_PKGSRC_GCC \
        _WRAP_EXTRA_ARGS.CC \
@@ -127,7 +128,8 @@
 _IGN_VARS.gcc= \
        _GCC2_PATTERNS _GCC3_PATTERNS _GCC34_PATTERNS _GCC44_PATTERNS \
        _GCC48_PATTERNS _GCC49_PATTERNS _GCC5_PATTERNS _GCC6_PATTERNS \
-       _GCC7_PATTERNS _GCC8_PATTERNS _GCC_AUX_PATTERNS
+       _GCC7_PATTERNS _GCC8_PATTERNS _GCC9_PATTERNS _GCC10_PATTERNS \
+       _GCC_AUX_PATTERNS
 _LISTED_VARS.gcc= \
        MAKEFLAGS IMAKEOPTS LDFLAGS PREPEND_PATH
 .include "../../mk/bsd.prefs.mk"
@@ -151,7 +153,7 @@
 
 # _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc
 # without the PKGREVISIONs.
-_GCC_DIST_NAME:=       gcc8
+_GCC_DIST_NAME:=       gcc10
 .include "../../lang/${_GCC_DIST_NAME}/version.mk"
 _GCC_DIST_VERSION:=    ${${_GCC_DIST_NAME:tu}_DIST_VERSION}
 
@@ -187,6 +189,12 @@
 # _GCC8_PATTERNS matches N s.t. 8.0 <= N < 9.
 _GCC8_PATTERNS= 8 8.*
 
+# _GCC9_PATTERNS matches N s.t. 9.0 <= N < 10.
+_GCC9_PATTERNS= 9 9.*
+
+# _GCC10_PATTERNS matches N s.t. 10.0 <= N < 11.
+_GCC10_PATTERNS= 10 10.*
+
 # _GCC_AUX_PATTERNS matches 8-digit date YYYYMMDD*
 _GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]*
 
@@ -350,6 +358,18 @@
 _NEED_GCC8=    yes
 .  endif
 .endfor
+_NEED_GCC9?=   no
+.for _pattern_ in ${_GCC9_PATTERNS}
+.  if !empty(_GCC_REQD:M${_pattern_})
+_NEED_GCC9=    yes
+.  endif
+.endfor
+_NEED_GCC10?=  no
+.for _pattern_ in ${_GCC10_PATTERNS}
+.  if !empty(_GCC_REQD:M${_pattern_})
+_NEED_GCC10=   yes
+.  endif
+.endfor
 _NEED_GCC_AUX?=        no
 .for _pattern_ in ${_GCC_AUX_PATTERNS}
 .  if !empty(_GCC_REQD:M${_pattern_})
@@ -362,6 +382,7 @@
     !empty(_NEED_GCC48:M[nN][oO]) && !empty(_NEED_GCC49:M[nN][oO]) && \
     !empty(_NEED_GCC5:M[nN][oO]) && !empty(_NEED_GCC6:M[nN][oO]) && \
     !empty(_NEED_GCC7:M[nN][oO]) && !empty(_NEED_GCC8:M[nN][oO]) && \
+    !empty(_NEED_GCC9:M[nN][oO]) && !empty(_NEED_GCC10:M[nN][oO]) && \
     !empty(_NEED_GCC_AUX:M[nN][oO])
 _NEED_GCC8=    yes
 .endif
@@ -388,6 +409,10 @@
 LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
 .elif !empty(_NEED_GCC8:M[yY][eE][sS])
 LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
+.elif !empty(_NEED_GCC9:M[yY][eE][sS])
+LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
+.elif !empty(_NEED_GCC10: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
@@ -665,6 +690,48 @@
 _USE_GCC_SHLIB?=       yes
 .    endif
 .  endif
+.elif !empty(_NEED_GCC9:M[yY][eE][sS])
+#
+# We require gcc-9.x in the lang/gcc9-* directory.
+#
+_GCC_PKGBASE=          gcc9
+.  if ${PKGPATH} == lang/gcc9
+_IGNORE_GCC=           yes
+MAKEFLAGS+=            _IGNORE_GCC=yes
+.  endif
+.  if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
+_GCC_PKGSRCDIR=                ../../lang/gcc9
+_GCC_DEPENDENCY=       gcc9>=${_GCC_REQD}:../../lang/gcc9
+.    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_GCC10:M[yY][eE][sS])
+#
+# We require gcc-10.x in the lang/gcc10-* directory.
+#
+_GCC_PKGBASE=          gcc10
+.  if ${PKGPATH} == lang/gcc10
+_IGNORE_GCC=           yes
+MAKEFLAGS+=            _IGNORE_GCC=yes
+.  endif
+.  if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
+_GCC_PKGSRCDIR=                ../../lang/gcc10
+_GCC_DEPENDENCY=       gcc10>=${_GCC_REQD}:../../lang/gcc10
+.    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/gcc5-aux directory.



Home | Main Index | Thread Index | Old Index