diff options
author | jperkin <jperkin@pkgsrc.org> | 2022-11-23 15:44:11 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2022-11-23 15:44:11 +0000 |
commit | e21bef00301ec3e8ee3e3373d8a34602524b0d59 (patch) | |
tree | cac567d86af588a28351cadb33969a1f46b70a68 /mk/compiler | |
parent | 6d4059f5ae25a0b46f83ebe2ce3276238103c31d (diff) | |
download | pkgsrc-e21bef00301ec3e8ee3e3373d8a34602524b0d59.tar.gz |
mk: Only add obsolete GCC_REQD if required.
Each GCC_REQD entry has an associated cost as it invokes pkg_admin to see
if it's suitable, so only add 2.8.0 and 3.0 when absolutely necessary.
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/gcc.mk | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index bd1f43d5fc9..04b38c609fa 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.246 2022/08/01 07:58:21 wiz Exp $ +# $NetBSD: gcc.mk,v 1.247 2022/11/23 15:44:11 jperkin Exp $ # # This is the compiler definition for the GNU Compiler Collection. # @@ -137,11 +137,17 @@ USE_NATIVE_GCC?= no USE_PKGSRC_GCC?= no USE_PKGSRC_GCC_RUNTIME?=no -GCC_REQD+= 2.8.0 - -# gcc2 doesn't support c99 and amd64 -.if !empty(USE_LANGUAGES:Mc99) || ${MACHINE_ARCH} == "x86_64" +# +# Each successive GCC_REQD has an associated cost below when executing +# pkg_admin to determine if it's suitable, so only add these incredibly +# old versions if we haven't already set one. +# +.if !defined(GCC_REQD) +. if !empty(USE_LANGUAGES:Mc99) || ${MACHINE_ARCH} == "x86_64" GCC_REQD+= 3.0 +. else +GCC_REQD+= 2.8.0 +. endif .endif # Only one compiler defined here supports Ada: lang/gcc6-aux |