pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/compiler mk: Only add obsolete GCC_REQD if required.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/96295cdd8197
branches:  trunk
changeset: 388620:96295cdd8197
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Nov 23 15:44:11 2022 +0000

description:
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:

 mk/compiler/gcc.mk |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r c109bbdfa323 -r 96295cdd8197 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Wed Nov 23 15:31:43 2022 +0000
+++ b/mk/compiler/gcc.mk        Wed Nov 23 15:44:11 2022 +0000
@@ -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_PKGSRC_GCC?=       no
 USE_PKGSRC_GCC_RUNTIME?=no
 
+#
+# 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
-
-# gcc2 doesn't support c99 and amd64
-.if !empty(USE_LANGUAGES:Mc99) || ${MACHINE_ARCH} == "x86_64"
-GCC_REQD+=     3.0
+.  endif
 .endif
 
 # Only one compiler defined here supports Ada: lang/gcc6-aux



Home | Main Index | Thread Index | Old Index