Hi,
It seems that pkgsrc/mk/compiler/gcc.mk is too simplified.
I thin that the following patch should be readded.
Index: gcc.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/compiler/gcc.mk,v
retrieving revision 1.307
diff -u -r1.307 gcc.mk
--- gcc.mk 18 Jan 2026 21:08:07 -0000 1.307
+++ gcc.mk 21 Jan 2026 14:12:51 -0000
@@ -1351,7 +1351,19 @@
# On systems without a Fortran compiler, pull one in if needed.
PKGSRC_FORTRAN?=gfortran
-.include "../../mk/compiler/${PKGSRC_FORTRAN}.mk"
+_GCC_NEEDS_A_FORTRAN= no
+.if empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && !(defined(FCPATH) && exists(${FCPATH}))
+_GCC_NEEDS_A_FORTRAN= yes
+.else
+. for _pattern_ in 0.* 1.[0-4] 1.[0-4].*
+. if !empty(MACHINE_PLATFORM:MNetBSD-${_pattern_}-*)
+_GCC_NEEDS_A_FORTRAN= yes
+. endif
+. endfor
+.endif
+.if !empty(_GCC_NEEDS_A_FORTRAN:M[yY][eE][sS])
+. include "../../mk/compiler/${PKGSRC_FORTRAN}.mk"
+.endif
#.READONLY: GCC_REQD
_GCC_REQD_EFFECTIVE:= ${GCC_REQD}
Thank you.
Mark Davies <mark%some.addr.nz@localhost> writes:
> On 21/01/2026 14:02, Mark Davies wrote:
>> On 21/01/2026 13:48, Mark Davies wrote:
>>> How am I supposed to specify using the native compiler now?
>>
>> I presume a similar issue will strike with the recently introduced
>> gfortran in NetBSD-current.
>
> OK, a quick hack to restore the old functionality is to also set
>
> _USE_GFORTRAN=NO
>
> in /etc/mk.conf
>
> cheers
> mark
>
--
Ryo ONODERA // ryo%tetera.org@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3