tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
possible gfortran.mk changes
I have found gfortran.mk confusing, and just committed updates to
comments that better explain what's going on. There are two code
changes I think that make sense:
1) Setting POSSIBLE_GFORTRAN_VERSION on Darwin to match the structure
of everything else, rather than GFORTRAN_VERSION.
2) Changing the fallback version from 7 to 10.
* Point 1
However, the Darwin case raises the issue that clang rather than gcc is
likely in use, and thus the "if we are using gcc and the POSSIBLE
version exists" won't pass. That would result in GFORTRAN_VERSION set
to 10.
Therefore, I see two approaches:
- Keep the code as it is, and add comments explaining why. Move it
below the settings of POSSIBLE because it is different.
- Change the logic that says "only if gcc" to not say that. Clearly
we don't mean it.
I lean to the second option.
* Point 2
I think this is uncontroversial. I'll commit it separately if there
are no objections.
--- gfortran.mk.~1.25.~ 2023-10-31 09:47:56.000000000 -0400
+++ gfortran.mk 2023-10-31 09:53:51.087573351 -0400
@@ -41,8 +41,7 @@ COMPILER_GFORTRAN_MK= defined
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
+POSSIBLE_GFORTRAN_VERSION?= 12
.endif
# pkgsrc gcc9 is missing NetBSD patches for aarch64, so if 9 is
@@ -59,12 +58,12 @@ 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.
+# Otherwise, pick gcc 10 as a mainstream default.
.if !empty(PKGSRC_COMPILER:Mgcc) && \
exists(${PKGSRCDIR}/lang/gcc${POSSIBLE_GFORTRAN_VERSION}/buildlink3.mk)
GFORTRAN_VERSION?= ${POSSIBLE_GFORTRAN_VERSION}
.else
-GFORTRAN_VERSION?= 7
+GFORTRAN_VERSION?= 10
.endif
.if !empty(PKGPATH:Mlang/gcc${GFORTRAN_VERSION}) || !empty(PKGPATH:Mdevel/patch) || \
Home |
Main Index |
Thread Index |
Old Index