pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/compiler Add GCC_REQD+=8 support to compiler/gcc.mk



details:   https://anonhg.NetBSD.org/pkgsrc/rev/87db6592b14e
branches:  trunk
changeset: 314468:87db6592b14e
user:      abs <abs%pkgsrc.org@localhost>
date:      Sun Oct 28 22:22:19 2018 +0000

description:
Add GCC_REQD+=8 support to compiler/gcc.mk

diffstat:

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

diffs (99 lines):

diff -r 538b27b75935 -r 87db6592b14e mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Sun Oct 28 22:21:25 2018 +0000
+++ b/mk/compiler/gcc.mk        Sun Oct 28 22:22:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.195 2018/10/09 15:02:48 abs Exp $
+# $NetBSD: gcc.mk,v 1.196 2018/10/28 22:22:19 abs Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -109,7 +109,7 @@
 
 # _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc
 # without the PKGREVISIONs.
-_GCC_DIST_NAME:=       gcc7
+_GCC_DIST_NAME:=       gcc8
 .include "../../lang/${_GCC_DIST_NAME}/version.mk"
 _GCC_DIST_VERSION:=    ${${_GCC_DIST_NAME:tu}_DIST_VERSION}
 
@@ -142,6 +142,9 @@
 # _GCC7_PATTERNS matches N s.t. 7.0 <= N < 8.
 _GCC7_PATTERNS= 7 7.*
 
+# _GCC8_PATTERNS matches N s.t. 8.0 <= N < 9.
+_GCC8_PATTERNS= 8.*
+
 # _GCC_AUX_PATTERNS matches 8-digit date YYYYMMDD*
 _GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]*
 
@@ -282,6 +285,12 @@
 _NEED_GCC7=    yes
 .  endif
 .endfor
+_NEED_GCC8?=   no
+.for _pattern_ in ${_GCC8_PATTERNS}
+.  if !empty(_GCC_REQD:M${_pattern_})
+_NEED_GCC8=    yes
+.  endif
+.endfor
 _NEED_GCC_AUX?=        no
 .for _pattern_ in ${_GCC_AUX_PATTERNS}
 .  if !empty(_GCC_REQD:M${_pattern_})
@@ -293,9 +302,9 @@
     !empty(_NEED_GCC34:M[nN][oO]) && !empty(_NEED_GCC44:M[nN][oO]) && \
     !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_GCC7:M[nN][oO]) && !empty(_NEED_GCC8:M[nN][oO]) && \
     !empty(_NEED_GCC_AUX:M[nN][oO])
-_NEED_GCC7=    yes
+_NEED_GCC8=    yes
 .endif
 
 # Assume by default that GCC will only provide a C compiler.
@@ -318,6 +327,8 @@
 LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
 .elif !empty(_NEED_GCC7:M[yY][eE][sS])
 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_GCC_AUX:M[yY][eE][sS])
 LANGUAGES.gcc= c c++ fortran fortran77 objc ada
 .endif
@@ -569,6 +580,27 @@
 _USE_GCC_SHLIB?=       yes
 .    endif
 .  endif
+.elif !empty(_NEED_GCC8:M[yY][eE][sS])
+#
+# We require gcc-8.x in the lang/gcc8-* directory.
+#
+_GCC_PKGBASE=          gcc8
+.  if !empty(PKGPATH:Mlang/gcc8)
+_IGNORE_GCC=           yes
+MAKEFLAGS+=            _IGNORE_GCC=yes
+.  endif
+.  if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
+_GCC_PKGSRCDIR=                ../../lang/gcc8
+_GCC_DEPENDENCY=       gcc8>=${_GCC_REQD}:../../lang/gcc8
+.    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.
@@ -917,6 +949,8 @@
 .      include "../../lang/gcc6-libs/buildlink3.mk"
 .    elif !empty(_GCC_PKGBASE:Mgcc7)
 .      include "../../lang/gcc7-libs/buildlink3.mk"
+.    elif !empty(_GCC_PKGBASE:Mgcc8)
+.      include "../../lang/gcc8-libs/buildlink3.mk"
 .    else
 PKG_FAIL_REASON+=      "No USE_PKGSRC_GCC_RUNTIME support for ${CC_VERSION}"
 .    endif



Home | Main Index | Thread Index | Old Index