Subject: RE: proposal: USE_FORTRAN
To: None <tech-pkg@netbsd.org>
From: Bernd Salbrechter <salb@hell.gud.siemens.at>
List: tech-pkg
Date: 11/18/1999 09:53:00
On Wed, 17 Nov 1999 11:39:39 -0500 (EST) mcmahill@mtl.mit.edu wrote:
> Problem:
> - The in tree fortran compiler (/usr/bin/f77) is buggy (see PR's 8574
> and 8663 for details).
>
> - Several of our packages use fortran and contain logic local to the
> package Makefile which adds the dependency on f2c for systems
> (pre-1.4) which don't ship f77.
>
> Proposal:
>
> I'd like to create a variable 'USE_FORTRAN' in bsd.pkg.mk which would be
> set in the package Makefile for those packages which use fortran. That
> way the logic pertaining to the fortran compiler, possible dependency on
> f2c, and selection of the fortran compiler are done in 1 central
> location.
...
> The remaining question I have is if we should make f2c be the default
> for now since f77 is buggy. Long term, the goal should be to not ship a
> buggy compiler. I could perhaps implement f2c being the default by
> something like:
>
> USE_F2C?= YES
> .if defined(USE_F2C)
> .if ${USE_F2C}=="NO"
> .undef USE_F2C
> .endif
> .endif
>
> Then users could put USE_F2C=NO in mk.conf to override the f2c default.
I know that it is current style to use several binary variables in
bsd.pkg.mk. But wouldn't it better to change USE_F2C to USE_F_CPL and
set it to "f2c" or "f77" to enforce a specific fortran complier. Yes it's
paranoid to assume we get more than two fortran complier, but who knows.
Or should we reserve USE_ for variable usable in mk.conf and reserve i.e
NEED_ for the package to request a tool class. In the case of fortran
this will change USE_FORTRAN to NEED_FORTRAN and USE_F2C to USE_FORTRAN.
BTW for MAKE and CONFIGURE this would also apply, but is it worth the
work to change that now?
Have a nice day
Bernd