Sat May 28 02:31:48 2022 UTC ()
gcc.mk: restore GCC 6 handling

This is partly intended as a workaround to fix behaviour on NetBSD 8.x
where GCC 7 was being pulled in universally after the prior commits
here. Now it behaves as expected. There is an unaddressed issue in this
code that needs to be examined further. (This has been discussed in
more than one recent thread on teck-pkg@, including John Klos's report
of this issue.)

In any case, GCC 6 has also seen build improvements by nia@, who noted
it's safe to simply revert part of the original change set, in one of
those discussions on tech-pkg. (We can't use the hack introduced in the
prior revisions for GCC 6, though, or this same broken dependency
pattern occurs and will universally force GCC 6 instead of 7 on NetBSD
8.x.)

Tested on NetBSD 8.2_STABLE and 9.2_STABLE with various packages,
including tcsh, the original reported issue.


(gutteridge)
diff -r1.241 -r1.242 pkgsrc/mk/compiler/gcc.mk

cvs diff -r1.241 -r1.242 pkgsrc/mk/compiler/gcc.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/gcc.mk 2022/05/21 09:26:50 1.241
+++ pkgsrc/mk/compiler/gcc.mk 2022/05/28 02:31:47 1.242
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: gcc.mk,v 1.241 2022/05/21 09:26:50 nia Exp $ 1# $NetBSD: gcc.mk,v 1.242 2022/05/28 02:31:47 gutteridge Exp $
2# 2#
3# This is the compiler definition for the GNU Compiler Collection. 3# This is the compiler definition for the GNU Compiler Collection.
4# 4#
5# User-settable variables: 5# User-settable variables:
6# 6#
7# GCCBASE 7# GCCBASE
8# If using a native GCC and the compiler is not in $PATH then 8# If using a native GCC and the compiler is not in $PATH then
9# this should be set to the base installation directory. 9# this should be set to the base installation directory.
10# 10#
11# USE_NATIVE_GCC 11# USE_NATIVE_GCC
12# When set to "yes", the native gcc is used, no matter which 12# When set to "yes", the native gcc is used, no matter which
13# compiler version a package requires. 13# compiler version a package requires.
14# 14#
@@ -84,27 +84,27 @@ _DEF_VARS.gcc= \ @@ -84,27 +84,27 @@ _DEF_VARS.gcc= \
84 _GCCBINDIR _GCC_ARCHDIR _GCC_BIN_PREFIX _GCC_CFLAGS \ 84 _GCCBINDIR _GCC_ARCHDIR _GCC_BIN_PREFIX _GCC_CFLAGS \
85 _GCC_CC _GCC_CPP _GCC_CXX _GCC_DEPENDENCY _GCC_DEPENDS \ 85 _GCC_CC _GCC_CPP _GCC_CXX _GCC_DEPENDENCY _GCC_DEPENDS \
86 _GCC_DIST_NAME _GCC_DIST_VERSION \ 86 _GCC_DIST_NAME _GCC_DIST_VERSION \
87 _GCC_FC _GCC_LDFLAGS _GCC_LIBDIRS _GCC_PKG \ 87 _GCC_FC _GCC_LDFLAGS _GCC_LIBDIRS _GCC_PKG \
88 _GCC_PKGBASE _GCC_PKGSRCDIR _GCC_PKG_SATISFIES_DEP \ 88 _GCC_PKGBASE _GCC_PKGSRCDIR _GCC_PKG_SATISFIES_DEP \
89 _GCC_PREFIX _GCC_REQD _GCC_STRICTEST_REQD _GCC_SUBPREFIX \ 89 _GCC_PREFIX _GCC_REQD _GCC_STRICTEST_REQD _GCC_SUBPREFIX \
90 _GCC_TEST_DEPENDS _GCC_NEEDS_A_FORTRAN _GCC_VARS _GCC_VERSION \ 90 _GCC_TEST_DEPENDS _GCC_NEEDS_A_FORTRAN _GCC_VARS _GCC_VERSION \
91 _GCC_VERSION_STRING \ 91 _GCC_VERSION_STRING \
92 _GCC_ADA _GCC_GMK _GCC_GLK _GCC_GBD _GCC_CHP _GCC_GLS _GCC_GNT _GCC_PRP \ 92 _GCC_ADA _GCC_GMK _GCC_GLK _GCC_GBD _GCC_CHP _GCC_GLS _GCC_GNT _GCC_PRP \
93 _IGNORE_GCC \ 93 _IGNORE_GCC \
94 _IS_BUILTIN_GCC \ 94 _IS_BUILTIN_GCC \
95 _LANGUAGES.gcc \ 95 _LANGUAGES.gcc \
96 _LINKER_RPATH_FLAG \ 96 _LINKER_RPATH_FLAG \
97 _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 \ 97 _NEED_GCC6 _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 \
98 _NEED_GCC10 \ 98 _NEED_GCC10 \
99 _NEED_GCC_AUX _NEED_NEWER_GCC \ 99 _NEED_GCC_AUX _NEED_NEWER_GCC \
100 _PKGSRC_GCC_VERSION \ 100 _PKGSRC_GCC_VERSION \
101 _USE_GCC_SHLIB _USE_PKGSRC_GCC \ 101 _USE_GCC_SHLIB _USE_PKGSRC_GCC \
102 _WRAP_EXTRA_ARGS.CC \ 102 _WRAP_EXTRA_ARGS.CC \
103 _EXTRA_CC_DIRS \ 103 _EXTRA_CC_DIRS \
104 _CXX_STD_VERSIONS \ 104 _CXX_STD_VERSIONS \
105 ${_CXX_STD_VERSIONS:@std@_CXX_STD_FLAG.${std}@} \ 105 ${_CXX_STD_VERSIONS:@std@_CXX_STD_FLAG.${std}@} \
106 _MKPIE_CFLAGS.gcc _MKPIE_LDFLAGS \ 106 _MKPIE_CFLAGS.gcc _MKPIE_LDFLAGS \
107 _FORTIFY_CFLAGS _RELRO_LDFLAGS _STACK_CHECK_CFLAGS \ 107 _FORTIFY_CFLAGS _RELRO_LDFLAGS _STACK_CHECK_CFLAGS \
108 _CTF_CFLAGS \ 108 _CTF_CFLAGS \
109 _GCC_DIR \ 109 _GCC_DIR \
110 _ALIASES.CC _ALIASES.CPP _ALIASES.CXX _ALIASES.FC \ 110 _ALIASES.CC _ALIASES.CPP _ALIASES.CXX _ALIASES.FC \
@@ -115,27 +115,27 @@ _DEF_VARS.gcc= \ @@ -115,27 +115,27 @@ _DEF_VARS.gcc= \
115 _SSP_CFLAGS \ 115 _SSP_CFLAGS \
116 _CXX_STD_FLAG.c++03 _CXX_STD_FLAG.gnu++03 116 _CXX_STD_FLAG.c++03 _CXX_STD_FLAG.gnu++03
117_USE_VARS.gcc= \ 117_USE_VARS.gcc= \
118 MACHINE_ARCH PATH DRAGONFLY_CCVER OPSYS LOCALBASE \ 118 MACHINE_ARCH PATH DRAGONFLY_CCVER OPSYS LOCALBASE \
119 USE_LIBTOOL \ 119 USE_LIBTOOL \
120 LIBABISUFFIX \ 120 LIBABISUFFIX \
121 COMPILER_RPATH_FLAG \ 121 COMPILER_RPATH_FLAG \
122 MACHINE_GNU_PLATFORM \ 122 MACHINE_GNU_PLATFORM \
123 WRKDIR MACHINE_PLATFORM PKGPATH \ 123 WRKDIR MACHINE_PLATFORM PKGPATH \
124 _PKGSRC_MKPIE _PKGSRC_MKREPRO _MKREPRO_CFLAGS.gcc \ 124 _PKGSRC_MKPIE _PKGSRC_MKREPRO _MKREPRO_CFLAGS.gcc \
125 _PKGSRC_USE_FORTIFY _PKGSRC_USE_RELRO _PKGSRC_USE_STACK_CHECK \ 125 _PKGSRC_USE_FORTIFY _PKGSRC_USE_RELRO _PKGSRC_USE_STACK_CHECK \
126 _OPSYS_INCLUDE_DIRS _OPSYS_LIB_DIRS 126 _OPSYS_INCLUDE_DIRS _OPSYS_LIB_DIRS
127_IGN_VARS.gcc= \ 127_IGN_VARS.gcc= \
128 _GCC7_PATTERNS _GCC8_PATTERNS _GCC9_PATTERNS \ 128 _GCC6_PATTERNS _GCC7_PATTERNS _GCC8_PATTERNS _GCC9_PATTERNS \
129 _GCC10_PATTERNS _GCC_AUX_PATTERNS 129 _GCC10_PATTERNS _GCC_AUX_PATTERNS
130_LISTED_VARS.gcc= \ 130_LISTED_VARS.gcc= \
131 MAKEFLAGS IMAKEOPTS LDFLAGS PREPEND_PATH 131 MAKEFLAGS IMAKEOPTS LDFLAGS PREPEND_PATH
132.include "../../mk/bsd.prefs.mk" 132.include "../../mk/bsd.prefs.mk"
133 133
134USE_NATIVE_GCC?= no 134USE_NATIVE_GCC?= no
135USE_PKGSRC_GCC?= no 135USE_PKGSRC_GCC?= no
136USE_PKGSRC_GCC_RUNTIME?=no 136USE_PKGSRC_GCC_RUNTIME?=no
137 137
138GCC_REQD+= 2.8.0 138GCC_REQD+= 2.8.0
139 139
140# gcc2 doesn't support c99 and amd64 140# gcc2 doesn't support c99 and amd64
141.if !empty(USE_LANGUAGES:Mc99) || ${MACHINE_ARCH} == "x86_64" 141.if !empty(USE_LANGUAGES:Mc99) || ${MACHINE_ARCH} == "x86_64"
@@ -144,28 +144,31 @@ GCC_REQD+= 3.0 @@ -144,28 +144,31 @@ GCC_REQD+= 3.0
144 144
145# Only one compiler defined here supports Ada: lang/gcc6-aux 145# Only one compiler defined here supports Ada: lang/gcc6-aux
146# If the Ada language is requested, force lang/gcc6-aux to be selected 146# If the Ada language is requested, force lang/gcc6-aux to be selected
147.if !empty(USE_LANGUAGES:Mada) 147.if !empty(USE_LANGUAGES:Mada)
148GCC_REQD+= 20160822 148GCC_REQD+= 20160822
149.endif 149.endif
150 150
151# _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc 151# _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc
152# without the PKGREVISIONs. 152# without the PKGREVISIONs.
153_GCC_DIST_NAME:= gcc10 153_GCC_DIST_NAME:= gcc10
154.include "../../lang/${_GCC_DIST_NAME}/version.mk" 154.include "../../lang/${_GCC_DIST_NAME}/version.mk"
155_GCC_DIST_VERSION:= ${${_GCC_DIST_NAME:tu}_DIST_VERSION} 155_GCC_DIST_VERSION:= ${${_GCC_DIST_NAME:tu}_DIST_VERSION}
156 156
 157# _GCC6_PATTERNS matches N s.t. N < 7.
 158_GCC6_PATTERNS= 5 6 [0-6].*
 159
157# _GCC7_PATTERNS matches N s.t. 7.0 <= N < 8. 160# _GCC7_PATTERNS matches N s.t. 7.0 <= N < 8.
158_GCC7_PATTERNS= 5 6 [0-6].* 7 7.* 161_GCC7_PATTERNS= 7 7.*
159 162
160# _GCC8_PATTERNS matches N s.t. 8.0 <= N < 9. 163# _GCC8_PATTERNS matches N s.t. 8.0 <= N < 9.
161_GCC8_PATTERNS= 8 8.* 164_GCC8_PATTERNS= 8 8.*
162 165
163# _GCC9_PATTERNS matches N s.t. 9.0 <= N < 10. 166# _GCC9_PATTERNS matches N s.t. 9.0 <= N < 10.
164_GCC9_PATTERNS= 9 9.* 167_GCC9_PATTERNS= 9 9.*
165 168
166# _GCC10_PATTERNS matches N s.t. 10.0 <= N < 11. 169# _GCC10_PATTERNS matches N s.t. 10.0 <= N < 11.
167_GCC10_PATTERNS= 10 10.* 170_GCC10_PATTERNS= 10 10.*
168 171
169# _GCC_AUX_PATTERNS matches 8-digit date YYYYMMDD* 172# _GCC_AUX_PATTERNS matches 8-digit date YYYYMMDD*
170_GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]* 173_GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]*
171 174
@@ -259,26 +262,38 @@ _GCC_PKG_SATISFIES_DEP!= \ @@ -259,26 +262,38 @@ _GCC_PKG_SATISFIES_DEP!= \
259 ${ECHO} "NO"; \ 262 ${ECHO} "NO"; \
260 fi 263 fi
261. endif 264. endif
262. endfor 265. endfor
263. if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS]) 266. if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS])
264_GCC_STRICTEST_REQD= ${_version_} 267_GCC_STRICTEST_REQD= ${_version_}
265. endif 268. endif
266. endif 269. endif
267. endfor 270. endfor
268.endfor 271.endfor
269_GCC_REQD= ${_GCC_STRICTEST_REQD} 272_GCC_REQD= ${_GCC_STRICTEST_REQD}
270 273
271# Determine which GCC version is required by examining _GCC_REQD. 274# Determine which GCC version is required by examining _GCC_REQD.
 275_NEED_GCC6?= no
 276.for _pattern_ in ${_GCC6_PATTERNS}
 277. if !empty(_GCC_REQD:M${_pattern_})
 278# XXX this won't work without adjustments elsewhere because of how
 279# _GCC_REQD is processed.
 280#. if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 089937
 281#USE_PKGSRC_GCC= yes
 282#USE_PKGSRC_GCC_RUNTIME= yes
 283#. endif
 284_NEED_GCC6= yes
 285. endif
 286.endfor
272_NEED_GCC7?= no 287_NEED_GCC7?= no
273.for _pattern_ in ${_GCC7_PATTERNS} 288.for _pattern_ in ${_GCC7_PATTERNS}
274. if !empty(_GCC_REQD:M${_pattern_}) 289. if !empty(_GCC_REQD:M${_pattern_})
275. if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 089937 290. if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 089937
276USE_PKGSRC_GCC= yes 291USE_PKGSRC_GCC= yes
277USE_PKGSRC_GCC_RUNTIME= yes 292USE_PKGSRC_GCC_RUNTIME= yes
278. endif 293. endif
279_NEED_GCC7= yes 294_NEED_GCC7= yes
280. endif 295. endif
281.endfor 296.endfor
282_NEED_GCC8?= no 297_NEED_GCC8?= no
283.for _pattern_ in ${_GCC8_PATTERNS} 298.for _pattern_ in ${_GCC8_PATTERNS}
284. if !empty(_GCC_REQD:M${_pattern_}) 299. if !empty(_GCC_REQD:M${_pattern_})
@@ -306,46 +321,49 @@ _NEED_GCC10?= no @@ -306,46 +321,49 @@ _NEED_GCC10?= no
306USE_PKGSRC_GCC= yes 321USE_PKGSRC_GCC= yes
307USE_PKGSRC_GCC_RUNTIME= yes 322USE_PKGSRC_GCC_RUNTIME= yes
308. endif 323. endif
309_NEED_GCC10= yes 324_NEED_GCC10= yes
310. endif 325. endif
311.endfor 326.endfor
312_NEED_GCC_AUX?= no 327_NEED_GCC_AUX?= no
313.for _pattern_ in ${_GCC_AUX_PATTERNS} 328.for _pattern_ in ${_GCC_AUX_PATTERNS}
314. if !empty(_GCC_REQD:M${_pattern_}) 329. if !empty(_GCC_REQD:M${_pattern_})
315_NEED_GCC_AUX= yes 330_NEED_GCC_AUX= yes
316_NEED_NEWER_GCC=NO 331_NEED_NEWER_GCC=NO
317. endif 332. endif
318.endfor 333.endfor
319.if !empty(_NEED_GCC7:M[nN][oO]) && \ 334.if !empty(_NEED_GCC6:M[nN][oO]) && !empty(_NEED_GCC7:M[nN][oO]) && \
320 !empty(_NEED_GCC8:M[nN][oO]) && !empty(_NEED_GCC9:M[nN][oO]) && \ 335 !empty(_NEED_GCC8:M[nN][oO]) && !empty(_NEED_GCC9:M[nN][oO]) && \
321 !empty(_NEED_GCC10:M[nN][oO]) && \ 336 !empty(_NEED_GCC10:M[nN][oO]) && \
322 !empty(_NEED_GCC_AUX:M[nN][oO]) 337 !empty(_NEED_GCC_AUX:M[nN][oO])
323_NEED_GCC8= yes 338_NEED_GCC8= yes
324.endif 339.endif
325 340
326# April 2022: GCC below 10 from pkgsrc is broken on 32-bit arm NetBSD. 341# April 2022: GCC below 10 from pkgsrc is broken on 32-bit arm NetBSD.
327.if !empty(MACHINE_PLATFORM:MNetBSD-*-earm*) && \ 342.if !empty(MACHINE_PLATFORM:MNetBSD-*-earm*) && \
328 ${OPSYS_VERSION} < 099900 && \ 343 ${OPSYS_VERSION} < 099900 && \
329 (${_NEED_GCC8:tl} == "yes" || ${_NEED_GCC9:tl} == "yes") 344 (${_NEED_GCC8:tl} == "yes" || ${_NEED_GCC9:tl} == "yes")
 345_NEED_GCC6= no
330_NEED_GCC7= no 346_NEED_GCC7= no
331_NEED_GCC8= no 347_NEED_GCC8= no
332_NEED_GCC9= no 348_NEED_GCC9= no
333_NEED_GCC10= yes 349_NEED_GCC10= yes
334.endif 350.endif
335 351
336# Assume by default that GCC will only provide a C compiler. 352# Assume by default that GCC will only provide a C compiler.
337LANGUAGES.gcc?= c 353LANGUAGES.gcc?= c
338.if !empty(_NEED_GCC7:M[yY][eE][sS]) 354.if !empty(_NEED_GCC6:M[yY][eE][sS])
 355LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
 356.elif !empty(_NEED_GCC7:M[yY][eE][sS])
339LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ 357LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
340.elif !empty(_NEED_GCC8:M[yY][eE][sS]) 358.elif !empty(_NEED_GCC8:M[yY][eE][sS])
341LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ 359LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
342.elif !empty(_NEED_GCC9:M[yY][eE][sS]) 360.elif !empty(_NEED_GCC9:M[yY][eE][sS])
343LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ 361LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
344.elif !empty(_NEED_GCC10:M[yY][eE][sS]) 362.elif !empty(_NEED_GCC10:M[yY][eE][sS])
345LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ 363LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
346.elif !empty(_NEED_GCC_AUX:M[yY][eE][sS]) 364.elif !empty(_NEED_GCC_AUX:M[yY][eE][sS])
347LANGUAGES.gcc= c c++ fortran fortran77 objc ada 365LANGUAGES.gcc= c c++ fortran fortran77 objc ada
348.endif 366.endif
349_LANGUAGES.gcc= # empty 367_LANGUAGES.gcc= # empty
350.for _lang_ in ${USE_LANGUAGES} 368.for _lang_ in ${USE_LANGUAGES}
351_LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} 369_LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}}
@@ -420,27 +438,48 @@ _CTF_CFLAGS= -gdwarf-2 @@ -420,27 +438,48 @@ _CTF_CFLAGS= -gdwarf-2
420# GCC has this annoying behaviour where it advocates in a multi-line 438# GCC has this annoying behaviour where it advocates in a multi-line
421# banner the use of "#include" over "#import" when including headers. 439# banner the use of "#include" over "#import" when including headers.
422# This generates a huge number of warnings when building practically all 440# This generates a huge number of warnings when building practically all
423# Objective-C code where it is convention to use "#import". Suppress 441# Objective-C code where it is convention to use "#import". Suppress
424# the warning if we're building Objective-C code using GCC. 442# the warning if we're building Objective-C code using GCC.
425# 443#
426.if !empty(_LANGUAGES.gcc:Mobjc) 444.if !empty(_LANGUAGES.gcc:Mobjc)
427CFLAGS+= -Wno-import 445CFLAGS+= -Wno-import
428.endif 446.endif
429 447
430CFLAGS+= ${_GCC_CFLAGS} 448CFLAGS+= ${_GCC_CFLAGS}
431FCFLAGS+= ${_GCC_FCFLAGS} 449FCFLAGS+= ${_GCC_FCFLAGS}
432 450
433.if !empty(_NEED_GCC7:M[yY][eE][sS]) 451.if !empty(_NEED_GCC6:M[yY][eE][sS])
 452#
 453# We require gcc-6.x in the lang/gcc6-* directory.
 454#
 455_GCC_PKGBASE= gcc6
 456. if ${PKGPATH} == lang/gcc6
 457_IGNORE_GCC= yes
 458MAKEFLAGS+= _IGNORE_GCC=yes
 459. endif
 460. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
 461_GCC_PKGSRCDIR= ../../lang/gcc6
 462_GCC_DEPENDENCY= gcc6>=${_GCC_REQD}:../../lang/gcc6
 463. if !empty(_LANGUAGES.gcc:Mc++) || \
 464 !empty(_LANGUAGES.gcc:Mfortran) || \
 465 !empty(_LANGUAGES.gcc:Mfortran77) || \
 466 !empty(_LANGUAGES.gcc:Mgo) || \
 467 !empty(_LANGUAGES.gcc:Mobjc) || \
 468 !empty(_LANGUAGES.gcc:Mobj-c++)
 469_USE_GCC_SHLIB?= yes
 470. endif
 471. endif
 472.elif !empty(_NEED_GCC7:M[yY][eE][sS])
434# 473#
435# We require gcc-7.x in the lang/gcc7-* directory. 474# We require gcc-7.x in the lang/gcc7-* directory.
436# 475#
437_GCC_PKGBASE= gcc7 476_GCC_PKGBASE= gcc7
438. if ${PKGPATH} == lang/gcc7 477. if ${PKGPATH} == lang/gcc7
439_IGNORE_GCC= yes 478_IGNORE_GCC= yes
440MAKEFLAGS+= _IGNORE_GCC=yes 479MAKEFLAGS+= _IGNORE_GCC=yes
441. endif 480. endif
442. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) 481. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
443_GCC_PKGSRCDIR= ../../lang/gcc7 482_GCC_PKGSRCDIR= ../../lang/gcc7
444_GCC_DEPENDENCY= gcc7>=${_GCC_REQD}:../../lang/gcc7 483_GCC_DEPENDENCY= gcc7>=${_GCC_REQD}:../../lang/gcc7
445. if !empty(_LANGUAGES.gcc:Mc++) || \ 484. if !empty(_LANGUAGES.gcc:Mc++) || \
446 !empty(_LANGUAGES.gcc:Mfortran) || \ 485 !empty(_LANGUAGES.gcc:Mfortran) || \
@@ -819,27 +858,29 @@ PREPEND_PATH+= ${_GCC_DIR}/bin @@ -819,27 +858,29 @@ PREPEND_PATH+= ${_GCC_DIR}/bin
819# Add the dependency on GCC. 858# Add the dependency on GCC.
820.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) 859.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS])
821. for _dir_ in ${_GCC_PKGSRCDIR} 860. for _dir_ in ${_GCC_PKGSRCDIR}
822. include "${_dir_}/buildlink3.mk" 861. include "${_dir_}/buildlink3.mk"
823. endfor 862. endfor
824.endif 863.endif
825 864
826# Add dependency on GCC libraries if requested. 865# Add dependency on GCC libraries if requested.
827.if (defined(_USE_GCC_SHLIB) && !empty(_USE_GCC_SHLIB:M[Yy][Ee][Ss])) && !empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss]) 866.if (defined(_USE_GCC_SHLIB) && !empty(_USE_GCC_SHLIB:M[Yy][Ee][Ss])) && !empty(USE_PKGSRC_GCC_RUNTIME:M[Yy][Ee][Ss])
828# Special case packages which are themselves a dependency of gcc runtime. 867# Special case packages which are themselves a dependency of gcc runtime.
829. if ${PKGPATH} != devel/libtool-base && ${PKGPATH} != devel/binutils && \ 868. if ${PKGPATH} != devel/libtool-base && ${PKGPATH} != devel/binutils && \
830 empty(PKGPATH:Mlang/gcc4?) && empty(PKGPATH:Mlang/gcc[5-9]) && \ 869 empty(PKGPATH:Mlang/gcc4?) && empty(PKGPATH:Mlang/gcc[5-9]) && \
831 empty(PKGPATH:Mlang/gcc10) 870 empty(PKGPATH:Mlang/gcc10)
832. if !empty(_GCC_PKGBASE:Mgcc7) 871. if !empty(_GCC_PKGBASE:Mgcc6)
 872. include "../../lang/gcc6-libs/buildlink3.mk"
 873. elif !empty(_GCC_PKGBASE:Mgcc7)
833. include "../../lang/gcc7-libs/buildlink3.mk" 874. include "../../lang/gcc7-libs/buildlink3.mk"
834. elif !empty(_GCC_PKGBASE:Mgcc8) 875. elif !empty(_GCC_PKGBASE:Mgcc8)
835. include "../../lang/gcc8-libs/buildlink3.mk" 876. include "../../lang/gcc8-libs/buildlink3.mk"
836. elif !empty(_GCC_PKGBASE:Mgcc9) 877. elif !empty(_GCC_PKGBASE:Mgcc9)
837. include "../../lang/gcc9-libs/buildlink3.mk" 878. include "../../lang/gcc9-libs/buildlink3.mk"
838. elif !empty(_GCC_PKGBASE:Mgcc10) 879. elif !empty(_GCC_PKGBASE:Mgcc10)
839. include "../../lang/gcc10-libs/buildlink3.mk" 880. include "../../lang/gcc10-libs/buildlink3.mk"
840. else 881. else
841PKG_FAIL_REASON+= "No USE_PKGSRC_GCC_RUNTIME support for ${CC_VERSION}" 882PKG_FAIL_REASON+= "No USE_PKGSRC_GCC_RUNTIME support for ${CC_VERSION}"
842. endif 883. endif
843. endif 884. endif
844.endif 885.endif
845 886