octave-maintainers
[Top][All Lists]
Advanced

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

Re: I think I "broke" mkoctfile for 3.4.1


From: John W. Eaton
Subject: Re: I think I "broke" mkoctfile for 3.4.1
Date: Sun, 19 Jun 2011 12:12:00 -0400

On 18-Jun-2011, Jordi Gutiérrez Hermoso wrote:

| But I'm confused as to what the purpose of those lines that I
| unpatched are. It seems to me that all they're for is for passing
| warning flags to gcc through mkoctfile, not any other flag, and it's a
| complete fluke that it worked for Octave-Forge packages. This seems
| like a bug that we have to keep around now for backwards
| compatibility. I guess I'm missing something obvious.

I think they were there for passing things like -Wl,linker-option, but
it also happened that the -W* case allowed things like -W, -Wall,
-Wother-warning-option to be passed on to the compilers.

It seems to me that maybe we should just allow all unrecognized
options to be passed to the compilers (that would allow us to remove
the special case for -g as well) and then also accept

  CFLAGS="..."
  CXXFLAGS="..."
  FFLAGS="..."
  LDFLAGS="..."

to allow passing options to the C, C++, and Fortran compilers and
linker separately.  If we do this, should setting CFLAGS="" on the
command line append or replace the default CFLAGS?  Maybe we should
have CFLAGS="..." replace and CFLAGS+="..." append?

BTW, did you modify the mkocfile.cc.in program when you modified
mkoctfile.in?  It is probably not good if the script and program
diverge, because then we see different problems on Windows systems...
Should we unify these and only distribute one to avoid the maintenance
problem of having two programs that do the same thing?  I think the
script is easier to maintain.  In the past, there was some argument
about needing the compiled version so that the Windows version of
Octave would not have to have a Bourne shell interpreter.  But looking
at the Octave 3.2.4 distribution for Windows, it looks like we have
been distributing enough of MSYS to do the job, so why not just
require that?  Otherwise, I think we should just abandon the shell
scripts for mkoctfile and octave-config and use only the C++
versions.  That way at least we won't have to modify both the shell
script and C++ versions when we want to make a change, and Unix-hating
Windows zealots won't be freaked out that Octave has corrupted their
system by installing a Unix shell interpreter.

jwe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]