Fri Oct 8 16:35:57 2021 UTC ()
gcc.mk: Avoid matching gcc2, gcc3.


(nia)
diff -r1.228 -r1.229 pkgsrc/mk/compiler/gcc.mk

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

--- pkgsrc/mk/compiler/gcc.mk 2021/10/04 14:21:21 1.228
+++ pkgsrc/mk/compiler/gcc.mk 2021/10/08 16:35:57 1.229
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: gcc.mk,v 1.228 2021/10/04 14:21:21 nia Exp $ 1# $NetBSD: gcc.mk,v 1.229 2021/10/08 16:35:57 nia 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#
@@ -80,31 +80,30 @@ _DEF_VARS.gcc= \ @@ -80,31 +80,30 @@ _DEF_VARS.gcc= \
80 CWRAPPERS_APPEND.cc CWRAPPERS_APPEND.cxx CWRAPPERS_APPEND.ld \ 80 CWRAPPERS_APPEND.cc CWRAPPERS_APPEND.cxx CWRAPPERS_APPEND.ld \
81 PKG_ADA PKG_GMK PKG_GLK PKG_GBD PKG_CHP PKG_GNT PKG_GLS PKG_PRP \ 81 PKG_ADA PKG_GMK PKG_GLK PKG_GBD PKG_CHP PKG_GNT PKG_GLS PKG_PRP \
82 PKGSRC_ADA PKGSRC_GMK PKGSRC_GLK PKGSRC_GBD PKGSRC_CHP PKGSRC_GNT PKGSRC_GLS PKGSRC_PRP \ 82 PKGSRC_ADA PKGSRC_GMK PKGSRC_GLK PKGSRC_GBD PKGSRC_CHP PKGSRC_GNT PKGSRC_GLS PKGSRC_PRP \
83 _CC _COMPILER_RPATH_FLAG _COMPILER_STRIP_VARS \ 83 _CC _COMPILER_RPATH_FLAG _COMPILER_STRIP_VARS \
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 _IGNORE_GCC3CXX _IGNORE_GCC3F77 _IGNORE_GCC3OBJC \ 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_GCC2 _NEED_GCC3 \ 
98 _NEED_GCC6 _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 \ 97 _NEED_GCC6 _NEED_GCC7 _NEED_GCC8 _NEED_GCC9 \
99 _NEED_GCC10 \ 98 _NEED_GCC10 \
100 _NEED_GCC_AUX _NEED_NEWER_GCC \ 99 _NEED_GCC_AUX _NEED_NEWER_GCC \
101 _PKGSRC_GCC_VERSION \ 100 _PKGSRC_GCC_VERSION \
102 _USE_GCC_SHLIB _USE_PKGSRC_GCC \ 101 _USE_GCC_SHLIB _USE_PKGSRC_GCC \
103 _WRAP_EXTRA_ARGS.CC \ 102 _WRAP_EXTRA_ARGS.CC \
104 _EXTRA_CC_DIRS \ 103 _EXTRA_CC_DIRS \
105 _CXX_STD_VERSIONS \ 104 _CXX_STD_VERSIONS \
106 ${_CXX_STD_VERSIONS:@std@_CXX_STD_FLAG.${std}@} \ 105 ${_CXX_STD_VERSIONS:@std@_CXX_STD_FLAG.${std}@} \
107 _MKPIE_CFLAGS.gcc _MKPIE_LDFLAGS.gcc \ 106 _MKPIE_CFLAGS.gcc _MKPIE_LDFLAGS.gcc \
108 _FORTIFY_CFLAGS _RELRO_LDFLAGS _STACK_CHECK_CFLAGS \ 107 _FORTIFY_CFLAGS _RELRO_LDFLAGS _STACK_CHECK_CFLAGS \
109 _CTF_CFLAGS \ 108 _CTF_CFLAGS \
110 _GCC_DIR \ 109 _GCC_DIR \
@@ -116,27 +115,26 @@ _DEF_VARS.gcc= \ @@ -116,27 +115,26 @@ _DEF_VARS.gcc= \
116 _SSP_CFLAGS \ 115 _SSP_CFLAGS \
117 _CXX_STD_FLAG.c++03 _CXX_STD_FLAG.gnu++03 116 _CXX_STD_FLAG.c++03 _CXX_STD_FLAG.gnu++03
118_USE_VARS.gcc= \ 117_USE_VARS.gcc= \
119 MACHINE_ARCH PATH DRAGONFLY_CCVER OPSYS LOCALBASE \ 118 MACHINE_ARCH PATH DRAGONFLY_CCVER OPSYS LOCALBASE \
120 USE_LIBTOOL \ 119 USE_LIBTOOL \
121 LIBABISUFFIX \ 120 LIBABISUFFIX \
122 COMPILER_RPATH_FLAG \ 121 COMPILER_RPATH_FLAG \
123 MACHINE_GNU_PLATFORM \ 122 MACHINE_GNU_PLATFORM \
124 WRKDIR MACHINE_PLATFORM PKGPATH \ 123 WRKDIR MACHINE_PLATFORM PKGPATH \
125 _PKGSRC_MKPIE _PKGSRC_MKREPRO _MKREPRO_CFLAGS.gcc \ 124 _PKGSRC_MKPIE _PKGSRC_MKREPRO _MKREPRO_CFLAGS.gcc \
126 _PKGSRC_USE_FORTIFY _PKGSRC_USE_RELRO _PKGSRC_USE_STACK_CHECK \ 125 _PKGSRC_USE_FORTIFY _PKGSRC_USE_RELRO _PKGSRC_USE_STACK_CHECK \
127 _OPSYS_INCLUDE_DIRS _OPSYS_LIB_DIRS 126 _OPSYS_INCLUDE_DIRS _OPSYS_LIB_DIRS
128_IGN_VARS.gcc= \ 127_IGN_VARS.gcc= \
129 _GCC2_PATTERNS _GCC3_PATTERNS \ 
130 _GCC6_PATTERNS _GCC7_PATTERNS _GCC8_PATTERNS _GCC9_PATTERNS \ 128 _GCC6_PATTERNS _GCC7_PATTERNS _GCC8_PATTERNS _GCC9_PATTERNS \
131 _GCC10_PATTERNS _GCC_AUX_PATTERNS 129 _GCC10_PATTERNS _GCC_AUX_PATTERNS
132_LISTED_VARS.gcc= \ 130_LISTED_VARS.gcc= \
133 MAKEFLAGS IMAKEOPTS LDFLAGS PREPEND_PATH 131 MAKEFLAGS IMAKEOPTS LDFLAGS PREPEND_PATH
134.include "../../mk/bsd.prefs.mk" 132.include "../../mk/bsd.prefs.mk"
135 133
136USE_NATIVE_GCC?= no 134USE_NATIVE_GCC?= no
137USE_PKGSRC_GCC?= no 135USE_PKGSRC_GCC?= no
138USE_PKGSRC_GCC_RUNTIME?=no 136USE_PKGSRC_GCC_RUNTIME?=no
139 137
140GCC_REQD+= 2.8.0 138GCC_REQD+= 2.8.0
141 139
142# gcc2 doesn't support c99 and amd64 140# gcc2 doesn't support c99 and amd64
@@ -146,36 +144,28 @@ GCC_REQD+= 3.0 @@ -146,36 +144,28 @@ GCC_REQD+= 3.0
146 144
147# Only one compiler defined here supports Ada: lang/gcc6-aux 145# Only one compiler defined here supports Ada: lang/gcc6-aux
148# 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
149.if !empty(USE_LANGUAGES:Mada) 147.if !empty(USE_LANGUAGES:Mada)
150GCC_REQD+= 20160822 148GCC_REQD+= 20160822
151.endif 149.endif
152 150
153# _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
154# without the PKGREVISIONs. 152# without the PKGREVISIONs.
155_GCC_DIST_NAME:= gcc10 153_GCC_DIST_NAME:= gcc10
156.include "../../lang/${_GCC_DIST_NAME}/version.mk" 154.include "../../lang/${_GCC_DIST_NAME}/version.mk"
157_GCC_DIST_VERSION:= ${${_GCC_DIST_NAME:tu}_DIST_VERSION} 155_GCC_DIST_VERSION:= ${${_GCC_DIST_NAME:tu}_DIST_VERSION}
158 156
159# _GCC2_PATTERNS matches N s.t. N <= 2.95.3. 157# _GCC6_PATTERNS matches N s.t. N < 7.
160_GCC2_PATTERNS= [0-1].* 2.[0-9] 2.[0-9].* 2.[1-8][0-9] 2.[1-8][0-9].* \ 158_GCC6_PATTERNS= 5 6 [0-6].*
161 2.9[0-4] 2.9[0-4].* 2.95 2.95.[0-3] 
162 
163# _GCC3_PATTERNS matches N s.t. 2.95.3 < N < 4.  
164_GCC3_PATTERNS= 2.95.[4-9]* 2.95.[1-9][0-9]* 2.9[6-9] 2.9[6-9].* \ 
165 2.[1-9][0-9][0-9]* 3.[0-9] 3.[0-9].* 
166 
167# _GCC6_PATTERNS matches N s.t. 4.5 <= N < 7. 
168_GCC6_PATTERNS= 4.[0-9] 4.[0-9]* 5 5.* 6 6.* 
169 159
170# _GCC7_PATTERNS matches N s.t. 7.0 <= N < 8. 160# _GCC7_PATTERNS matches N s.t. 7.0 <= N < 8.
171_GCC7_PATTERNS= 7 7.* 161_GCC7_PATTERNS= 7 7.*
172 162
173# _GCC8_PATTERNS matches N s.t. 8.0 <= N < 9. 163# _GCC8_PATTERNS matches N s.t. 8.0 <= N < 9.
174_GCC8_PATTERNS= 8 8.* 164_GCC8_PATTERNS= 8 8.*
175 165
176# _GCC9_PATTERNS matches N s.t. 9.0 <= N < 10. 166# _GCC9_PATTERNS matches N s.t. 9.0 <= N < 10.
177_GCC9_PATTERNS= 9 9.* 167_GCC9_PATTERNS= 9 9.*
178 168
179# _GCC10_PATTERNS matches N s.t. 10.0 <= N < 11. 169# _GCC10_PATTERNS matches N s.t. 10.0 <= N < 11.
180_GCC10_PATTERNS= 10 10.* 170_GCC10_PATTERNS= 10 10.*
181 171
@@ -271,39 +261,27 @@ _GCC_PKG_SATISFIES_DEP!= \ @@ -271,39 +261,27 @@ _GCC_PKG_SATISFIES_DEP!= \
271 else \ 261 else \
272 ${ECHO} "NO"; \ 262 ${ECHO} "NO"; \
273 fi 263 fi
274. endif 264. endif
275. endfor 265. endfor
276. if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS]) 266. if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS])
277_GCC_STRICTEST_REQD= ${_version_} 267_GCC_STRICTEST_REQD= ${_version_}
278. endif 268. endif
279. endif 269. endif
280. endfor 270. endfor
281.endfor 271.endfor
282_GCC_REQD= ${_GCC_STRICTEST_REQD} 272_GCC_REQD= ${_GCC_STRICTEST_REQD}
283 273
284# Determine whether we require GCC-2.x or GCC-3.x by examining _GCC_REQD. 274# Determine which GCC version is required by examining _GCC_REQD.
285_NEED_GCC2?= no 
286.for _pattern_ in ${_GCC2_PATTERNS} 
287. if !empty(_GCC_REQD:M${_pattern_}) 
288_NEED_GCC2= yes 
289. endif 
290.endfor 
291_NEED_GCC3?= no 
292.for _pattern_ in ${_GCC3_PATTERNS} 
293. if !empty(_GCC_REQD:M${_pattern_}) 
294_NEED_GCC3= yes 
295. endif 
296.endfor 
297_NEED_GCC6?= no 275_NEED_GCC6?= no
298.for _pattern_ in ${_GCC6_PATTERNS} 276.for _pattern_ in ${_GCC6_PATTERNS}
299. if !empty(_GCC_REQD:M${_pattern_}) 277. if !empty(_GCC_REQD:M${_pattern_})
300_NEED_GCC6= yes 278_NEED_GCC6= yes
301. endif 279. endif
302.endfor 280.endfor
303_NEED_GCC7?= no 281_NEED_GCC7?= no
304.for _pattern_ in ${_GCC7_PATTERNS} 282.for _pattern_ in ${_GCC7_PATTERNS}
305. if !empty(_GCC_REQD:M${_pattern_}) 283. if !empty(_GCC_REQD:M${_pattern_})
306_NEED_GCC7= yes 284_NEED_GCC7= yes
307. endif 285. endif
308.endfor 286.endfor
309_NEED_GCC8?= no 287_NEED_GCC8?= no
@@ -321,41 +299,36 @@ _NEED_GCC9= yes @@ -321,41 +299,36 @@ _NEED_GCC9= yes
321_NEED_GCC10?= no 299_NEED_GCC10?= no
322.for _pattern_ in ${_GCC10_PATTERNS} 300.for _pattern_ in ${_GCC10_PATTERNS}
323. if !empty(_GCC_REQD:M${_pattern_}) 301. if !empty(_GCC_REQD:M${_pattern_})
324_NEED_GCC10= yes 302_NEED_GCC10= yes
325. endif 303. endif
326.endfor 304.endfor
327_NEED_GCC_AUX?= no 305_NEED_GCC_AUX?= no
328.for _pattern_ in ${_GCC_AUX_PATTERNS} 306.for _pattern_ in ${_GCC_AUX_PATTERNS}
329. if !empty(_GCC_REQD:M${_pattern_}) 307. if !empty(_GCC_REQD:M${_pattern_})
330_NEED_GCC_AUX= yes 308_NEED_GCC_AUX= yes
331_NEED_NEWER_GCC=NO 309_NEED_NEWER_GCC=NO
332. endif 310. endif
333.endfor 311.endfor
334.if !empty(_NEED_GCC2:M[nN][oO]) && !empty(_NEED_GCC3:M[nN][oO]) && \ 312.if !empty(_NEED_GCC6:M[nN][oO]) && !empty(_NEED_GCC7:M[nN][oO]) && \
335 !empty(_NEED_GCC6:M[nN][oO]) && !empty(_NEED_GCC7:M[nN][oO]) && \ 
336 !empty(_NEED_GCC8:M[nN][oO]) && !empty(_NEED_GCC9:M[nN][oO]) && \ 313 !empty(_NEED_GCC8:M[nN][oO]) && !empty(_NEED_GCC9:M[nN][oO]) && \
337 !empty(_NEED_GCC10:M[nN][oO]) && \ 314 !empty(_NEED_GCC10:M[nN][oO]) && \
338 !empty(_NEED_GCC_AUX:M[nN][oO]) 315 !empty(_NEED_GCC_AUX:M[nN][oO])
339_NEED_GCC8= yes 316_NEED_GCC8= yes
340.endif 317.endif
341 318
342# Assume by default that GCC will only provide a C compiler. 319# Assume by default that GCC will only provide a C compiler.
343LANGUAGES.gcc?= c 320LANGUAGES.gcc?= c
344.if !empty(_NEED_GCC2:M[yY][eE][sS]) 321.if !empty(_NEED_GCC6:M[yY][eE][sS])
345LANGUAGES.gcc= c c++ fortran77 objc 
346.elif !empty(_NEED_GCC3:M[yY][eE][sS]) 
347LANGUAGES.gcc= c c++ fortran77 java objc 
348.elif !empty(_NEED_GCC6:M[yY][eE][sS]) 
349LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ 322LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
350.elif !empty(_NEED_GCC7:M[yY][eE][sS]) 323.elif !empty(_NEED_GCC7:M[yY][eE][sS])
351LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ 324LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
352.elif !empty(_NEED_GCC8:M[yY][eE][sS]) 325.elif !empty(_NEED_GCC8:M[yY][eE][sS])
353LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ 326LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
354.elif !empty(_NEED_GCC9:M[yY][eE][sS]) 327.elif !empty(_NEED_GCC9:M[yY][eE][sS])
355LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ 328LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
356.elif !empty(_NEED_GCC10:M[yY][eE][sS]) 329.elif !empty(_NEED_GCC10:M[yY][eE][sS])
357LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++ 330LANGUAGES.gcc= c c++ fortran fortran77 go java objc obj-c++
358.elif !empty(_NEED_GCC_AUX:M[yY][eE][sS]) 331.elif !empty(_NEED_GCC_AUX:M[yY][eE][sS])
359LANGUAGES.gcc= c c++ fortran fortran77 objc ada 332LANGUAGES.gcc= c c++ fortran fortran77 objc ada
360.endif 333.endif
361_LANGUAGES.gcc= # empty 334_LANGUAGES.gcc= # empty
@@ -430,58 +403,27 @@ _CTF_CFLAGS= -gdwarf-2 @@ -430,58 +403,27 @@ _CTF_CFLAGS= -gdwarf-2
430# GCC has this annoying behaviour where it advocates in a multi-line 403# GCC has this annoying behaviour where it advocates in a multi-line
431# banner the use of "#include" over "#import" when including headers. 404# banner the use of "#include" over "#import" when including headers.
432# This generates a huge number of warnings when building practically all 405# This generates a huge number of warnings when building practically all
433# Objective-C code where it is convention to use "#import". Suppress 406# Objective-C code where it is convention to use "#import". Suppress
434# the warning if we're building Objective-C code using GCC. 407# the warning if we're building Objective-C code using GCC.
435# 408#
436.if !empty(_LANGUAGES.gcc:Mobjc) 409.if !empty(_LANGUAGES.gcc:Mobjc)
437CFLAGS+= -Wno-import 410CFLAGS+= -Wno-import
438.endif 411.endif
439 412
440CFLAGS+= ${_GCC_CFLAGS} 413CFLAGS+= ${_GCC_CFLAGS}
441FCFLAGS+= ${_GCC_FCFLAGS} 414FCFLAGS+= ${_GCC_FCFLAGS}
442 415
443.if !empty(_NEED_GCC2:M[yY][eE][sS]) 416.if !empty(_NEED_GCC6:M[yY][eE][sS])
444# 
445# We require gcc-2.x in the lang/gcc2 directory. 
446# 
447_GCC_PKGBASE= gcc2 
448. if ${PKGPATH} == lang/gcc2 
449_IGNORE_GCC= yes 
450MAKEFLAGS+= _IGNORE_GCC=yes 
451. endif 
452. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) 
453_GCC_PKGSRCDIR= ../../lang/gcc2 
454_GCC_DEPENDENCY= gcc2>=${_GCC_REQD}:../../lang/gcc2 
455. if !empty(_LANGUAGES.gcc:Mc++) || \ 
456 !empty(_LANGUAGES.gcc:Mfortran77) || \ 
457 !empty(_LANGUAGES.gcc:Mobjc) 
458_USE_GCC_SHLIB?= yes 
459. endif 
460. endif 
461.elif !empty(_NEED_GCC3:M[yY][eE][sS]) 
462# 
463# We require gcc-3.x in the lang/gcc3-* directories. 
464# 
465_GCC_PKGBASE= gcc3-c 
466. if ${PKGPATH} == lang/gcc3-c 
467_IGNORE_GCC= yes 
468MAKEFLAGS+= _IGNORE_GCC=yes 
469. endif 
470. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc:Mc) 
471_GCC_PKGSRCDIR= ../../lang/gcc3-c 
472_GCC_DEPENDENCY= gcc3-c>=${_GCC_REQD}:../../lang/gcc3-c 
473. endif 
474.elif !empty(_NEED_GCC6:M[yY][eE][sS]) 
475# 417#
476# We require gcc-6.x in the lang/gcc6-* directory. 418# We require gcc-6.x in the lang/gcc6-* directory.
477# 419#
478_GCC_PKGBASE= gcc6 420_GCC_PKGBASE= gcc6
479. if ${PKGPATH} == lang/gcc6 421. if ${PKGPATH} == lang/gcc6
480_IGNORE_GCC= yes 422_IGNORE_GCC= yes
481MAKEFLAGS+= _IGNORE_GCC=yes 423MAKEFLAGS+= _IGNORE_GCC=yes
482. endif 424. endif
483. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc) 425. if !defined(_IGNORE_GCC) && !empty(_LANGUAGES.gcc)
484_GCC_PKGSRCDIR= ../../lang/gcc6 426_GCC_PKGSRCDIR= ../../lang/gcc6
485_GCC_DEPENDENCY= gcc6>=${_GCC_REQD}:../../lang/gcc6 427_GCC_DEPENDENCY= gcc6>=${_GCC_REQD}:../../lang/gcc6
486. if !empty(_LANGUAGES.gcc:Mc++) || \ 428. if !empty(_LANGUAGES.gcc:Mc++) || \
487 !empty(_LANGUAGES.gcc:Mfortran) || \ 429 !empty(_LANGUAGES.gcc:Mfortran) || \
@@ -589,56 +531,26 @@ MAKEFLAGS+= _IGNORE_GCC=yes @@ -589,56 +531,26 @@ MAKEFLAGS+= _IGNORE_GCC=yes
589_GCC_PKGSRCDIR= ../../lang/gcc6-aux 531_GCC_PKGSRCDIR= ../../lang/gcc6-aux
590_GCC_DEPENDENCY= gcc6-aux>=${_GCC_REQD}:../../lang/gcc6-aux 532_GCC_DEPENDENCY= gcc6-aux>=${_GCC_REQD}:../../lang/gcc6-aux
591. if !empty(_LANGUAGES.gcc:Mc++) || \ 533. if !empty(_LANGUAGES.gcc:Mc++) || \
592 !empty(_LANGUAGES.gcc:Mfortran) || \ 534 !empty(_LANGUAGES.gcc:Mfortran) || \
593 !empty(_LANGUAGES.gcc:Mfortran77) || \ 535 !empty(_LANGUAGES.gcc:Mfortran77) || \
594 !empty(_LANGUAGES.gcc:Mada) || \ 536 !empty(_LANGUAGES.gcc:Mada) || \
595 !empty(_LANGUAGES.gcc:Mobjc) 537 !empty(_LANGUAGES.gcc:Mobjc)
596_USE_GCC_SHLIB?= yes 538_USE_GCC_SHLIB?= yes
597. endif 539. endif
598. endif 540. endif
599.endif 541.endif
600_GCC_DEPENDS= ${_GCC_PKGBASE}>=${_GCC_REQD} 542_GCC_DEPENDS= ${_GCC_PKGBASE}>=${_GCC_REQD}
601 543
602.if !empty(_NEED_GCC3:M[yY][eE][sS]) 
603. if ${PKGPATH} == "lang/gcc3-c++" 
604_IGNORE_GCC3CXX= yes 
605MAKEFLAGS+= _IGNORE_GCC3CXX=yes 
606. endif 
607. if !defined(_IGNORE_GCC3CXX) && !empty(_LANGUAGES.gcc:Mc++) 
608_GCC_PKGSRCDIR+= ../../lang/gcc3-c++ 
609_GCC_DEPENDENCY+= gcc3-c++>=${_GCC_REQD}:../../lang/gcc3-c++ 
610_USE_GCC_SHLIB?= yes 
611. endif 
612. if ${PKGPATH} == lang/gcc3-f77 
613_IGNORE_GCC3F77= yes 
614MAKEFLAGS+= _IGNORE_GCC3F77=yes 
615. endif 
616. if !defined(_IGNORE_GCC3F77) && !empty(_LANGUAGES.gcc:Mfortran77) 
617_GCC_PKGSRCDIR+= ../../lang/gcc3-f77 
618_GCC_DEPENDENCY+= gcc3-f77>=${_GCC_REQD}:../../lang/gcc3-f77 
619_USE_GCC_SHLIB?= yes 
620. endif 
621. if ${PKGPATH} == lang/gcc3-objc 
622_IGNORE_GCC3OBJC= yes 
623MAKEFLAGS+= _IGNORE_GCC3OBJC=yes 
624. endif 
625. if !defined(_IGNORE_GCC3OBJC) && !empty(_LANGUAGES.gcc:Mobjc) 
626_GCC_PKGSRCDIR+= ../../lang/gcc3-objc 
627_GCC_DEPENDENCY+= gcc3-objc>=${_GCC_REQD}:../../lang/gcc3-objc 
628_USE_GCC_SHLIB?= yes 
629. endif 
630.endif 
631 
632# When not using the GNU linker, gcc will always link shared libraries against 544# When not using the GNU linker, gcc will always link shared libraries against
633# the shared version of libgcc, and so _USE_GCC_SHLIB needs to be enabled on 545# the shared version of libgcc, and so _USE_GCC_SHLIB needs to be enabled on
634# platforms with non-GNU linkers, such as SunOS. 546# platforms with non-GNU linkers, such as SunOS.
635# 547#
636# However, we cannot simply do this by default as it will create circular 548# However, we cannot simply do this by default as it will create circular
637# dependencies in packages which are required to build gcc itself, and so we 549# dependencies in packages which are required to build gcc itself, and so we
638# enable it based on USE_LIBTOOL for the majority of packages, and support 550# enable it based on USE_LIBTOOL for the majority of packages, and support
639# USE_GCC_RUNTIME for packages which create shared libraries but do not use 551# USE_GCC_RUNTIME for packages which create shared libraries but do not use
640# libtool to do so. 552# libtool to do so.
641# 553#
642.if (${OPSYS} == "Darwin" || ${OPSYS} == "SunOS") && \ 554.if (${OPSYS} == "Darwin" || ${OPSYS} == "SunOS") && \
643 (defined(USE_LIBTOOL) || defined(USE_GCC_RUNTIME)) 555 (defined(USE_LIBTOOL) || defined(USE_GCC_RUNTIME))
644_USE_GCC_SHLIB= yes 556_USE_GCC_SHLIB= yes