pkgsrc-Users archive

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

Re: Using native gfortran on linux




To: Ryo ONODERA <ryo%tetera.org@localhost>, pkgsrc-users%netbsd.org@localhost, Thomas Klausner <wiz%NetBSD.org@localhost>

Subject: Re: Using native gfortran on linux

From: Mark Davies <mark%some.addr.nz@localhost>

Date: Thu, 22 Jan 2026 08:27:56 +1300




On 22/01/2026 03:14, Ryo ONODERA wrote:

It seems that pkgsrc/mk/compiler/gcc.mk is too simplified.
I thin that the following patch should be readded.



Yeah, Thomas pointed out the same in direct email.

Reversing it does fix my problem.

What I think this fragment is supposed to be saying is

On NetBSD systems (except the ve
ry old ones that had a fortran in base)  or if _USE_PKGSRC_GCC=YES then include compiler/${PKGSRC_FORTRAN}.mk

though I'm not total
ly convinced that's exactly what it is doing, and  as I mentioned earlier in this thread its going to need modifying to  deal with gfortran in recent NetBSD-current anyway.

cheers
mark


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.



Follow-Ups:

Re: Using native gfortran on linux
From: Thomas Klausner

Re: Using native gfortran on linux
From: Thomas Klausner


References:

Using native gfortran on linux
From: Mark Davies

Re: Using native gfortran on linux
From: Mark Davies

Re: Using native gfortran on linux
From: Mark Davies

Re: Using native gfortran on linux
From: Ryo ONODERA




Prev by Date: Re: bob v0.6.0

Next by Date: Re: Using native gfortran on linux

Previous by Thread: Re: Using native gfortran on linux

Next by Thread: Re: Using native gfortran on linux

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index