summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2020-10-20 19:35:07 +0000
committertnn <tnn@pkgsrc.org>2020-10-20 19:35:07 +0000
commit9bc02915773b9f005668cae88cd48315af1b669e (patch)
tree325c707ce617347efff5de8160a4d84cf6d80f8b /mk/compiler
parent6ccd80e7ede272e36518efd162c7f9bc1ad6577b (diff)
downloadpkgsrc-9bc02915773b9f005668cae88cd48315af1b669e.tar.gz
mk/compiler/gfortran.mk: bump default from gcc9 to gcc10 on current aarch64
lang/gcc8 has patches for NetBSD/aarch64 and lang/gcc10 has support mostly upstreamed. Nobody seems interested in fixing gcc9, but the pkgsrc logic defaults to it when the system compiler is GCC 9 which leads to broken fortran packages. Let's just skip forward to gcc10.
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/gfortran.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/mk/compiler/gfortran.mk b/mk/compiler/gfortran.mk
index 2c11f70219f..f54e7d87170 100644
--- a/mk/compiler/gfortran.mk
+++ b/mk/compiler/gfortran.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gfortran.mk,v 1.15 2020/03/26 12:44:46 gdt Exp $
+# $NetBSD: gfortran.mk,v 1.16 2020/10/20 19:35:07 tnn Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -41,6 +41,11 @@ COMPILER_GFORTRAN_MK= defined
# in that case.
POSSIBLE_GFORTRAN_VERSION?= ${CC_VERSION:S/gcc-//:C/.[0-9].[0-9]$//}
+# gcc9 doesn't work on NetBSD/aarch64, but gcc10 does.
+.if !empty(POSSIBLE_GFORTRAN_VERSION:M9) && !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64)
+POSSIBLE_GFORTRAN_VERSION= 10
+.endif
+
.if !empty(PKGSRC_COMPILER:Mgcc) && \
exists(${PKGSRCDIR}/lang/gcc${POSSIBLE_GFORTRAN_VERSION}/buildlink3.mk)
GFORTRAN_VERSION?= ${POSSIBLE_GFORTRAN_VERSION}