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:   gdt
Date:           Tue Oct 31 13:45:30 UTC 2023

Modified Files:
        pkgsrc/mk/compiler: gfortran.mk

Log Message:
mk/compiler/gfortran.mk: Update comments (NFCI)

  - Drop comment about gcc 4.8 being mishandled because the answer is
    "don't use gcc 4.8 for anything" now.
  - Add note that the Darwin stanza is probably setting the wrong
    variable (without causing trouble).
  - Fix/add comments about aarch64 and earm based on commit messages.
  - Explain the final selection logic

(This is a comment change only.)


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 pkgsrc/mk/compiler/gfortran.mk

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/gfortran.mk
diff -u pkgsrc/mk/compiler/gfortran.mk:1.23 pkgsrc/mk/compiler/gfortran.mk:1.24
--- pkgsrc/mk/compiler/gfortran.mk:1.23 Tue Jun 27 10:27:21 2023
+++ pkgsrc/mk/compiler/gfortran.mk      Tue Oct 31 13:45:30 2023
@@ -1,4 +1,4 @@
-# $NetBSD: gfortran.mk,v 1.23 2023/06/27 10:27:21 riastradh Exp $
+# $NetBSD: gfortran.mk,v 1.24 2023/10/31 13:45:30 gdt Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -33,29 +33,34 @@ COMPILER_GFORTRAN_MK=       defined
 
 .include "../../mk/bsd.prefs.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.
-# \todo Perhaps adjust this so that gcc-4.8.3 maps to 48, or document that 4.8
-# is so old that we intend what seems like a bug to choose the modern version
-# in that case.
+# If the pkgsrc base compiler is GCC, define POSSIBLE_GORTRAN_VERSION
+# (meaning a candidate we would like) to match, and try to use that if
+# possible, unless known to be problematic.  Otherwise, pick a
+# mainstream version and hope for the best.
+# \todo If the base compiler is clang, we probably should use flang
+# rather than gfortran, but this is gfortran.mk.
 POSSIBLE_GFORTRAN_VERSION?=    ${CC_VERSION:S/gcc-//:C/.[0-9].[0-9]$//}
 
 .if ${MACHINE_PLATFORM:MDarwin-*-*}
+# \todo For parallel structure this should set POSSIBLE_GFORTRAN_VERSION instead.
 GFORTRAN_VERSION?=     12
 .endif
 
-# gcc9 doesn't work on NetBSD/arm, but gcc10 does.
+# pkgsrc gcc9 is missing NetBSD patches for aarch64, so if 9 is
+# selected (historical current only?), advance to 10.
 .if !empty(POSSIBLE_GFORTRAN_VERSION:M9) && \
     !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64*)
 POSSIBLE_GFORTRAN_VERSION=     10
 .endif
 
+# All pkgsrc gcc < 10 versions are not ok on 32-bit arm; advance to 10.
 .if !empty(POSSIBLE_GFORTRAN_VERSION:M[0-9]) && \
     !empty(MACHINE_PLATFORM:MNetBSD-*-earm*)
 POSSIBLE_GFORTRAN_VERSION=     10
 .endif
 
+# If we are using gcc, and the POSSIBLE version exists in pkgsrc, use it.
+# Otherwise, pick gcc 7.  \todo Revisit this choice.
 .if !empty(PKGSRC_COMPILER:Mgcc) && \
     exists(${PKGSRCDIR}/lang/gcc${POSSIBLE_GFORTRAN_VERSION}/buildlink3.mk)
 GFORTRAN_VERSION?=             ${POSSIBLE_GFORTRAN_VERSION}



Home | Main Index | Thread Index | Old Index