pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/compiler

Module Name:    pkgsrc
Committed By:   bacon
Date:           Wed Feb 26 15:58:20 UTC 2020

Modified Files:

Log Message:
mk/compiler/gfortran: Default to same major version as base GCC

GFORTRAN_VERSION should match CC_VERSION as closely as possible for
ABI compatibility.  This update tries to match GFORTRAN_VERSION
to CC_VERSION if the base compiler is GCC.  If base compiler is not
GCC, default to a mainstream version likely to work with base clang/llvm.

To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/mk/compiler/

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/compiler/
diff -u pkgsrc/mk/compiler/ pkgsrc/mk/compiler/
--- pkgsrc/mk/compiler/ Wed Aug 22 20:48:37 2018
+++ pkgsrc/mk/compiler/      Wed Feb 26 15:58:20 2020
@@ -1,4 +1,4 @@
-# $NetBSD:,v 1.10 2018/08/22 20:48:37 maya Exp $
+# $NetBSD:,v 1.11 2020/02/26 15:58:20 bacon Exp $
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -33,7 +33,14 @@ COMPILER_GFORTRAN_MK=        defined
 .include "../../mk/"
+# If pkgsrc base compiler is GCC, match the gfortran requirement as closely as
+# possible.  Otherwise, default to a mainstream version and hope for the best.
+# If base compiler is clang, we really should use flang rather than gfortran.
+.if ${PKGSRC_COMPILER} == gcc
+GFORTRAN_VERSION?=     ${CC_VERSION:C/.[0-9].[0-9]$//:S/gcc-//}
 .if !empty(PKGPATH:Mlang/gcc${GFORTRAN_VERSION}) || !empty(PKGPATH:Mdevel/patch) || \

Home | Main Index | Thread Index | Old Index