When I put fortran sources in a binary that also contains C sources,
the compiler optimization flags get messed up.

Observe:

bin_PROGRAMS = xx
xx_SOURCES = a.c a.f95

yields:

gcc ... -g -O2 ...
gfortran ... -g -O2 ...

Cool.

Now changing it like this:

bin_PROGRAMS = xx
xx_SOURCES = a.c a.f95
xx_CFLAGS = -O3

yields:

gcc ... -O3 -g -O2 ...
gfortran ... -g -O2 ...

Likewise:

bin_PROGRAMS = xx
xx_SOURCES = a.c a.f95
xx_FCFLAGS = -O3

yields:

gcc ... -g -O2 ...
gfortran ... -O3 -g -O2 ...


Basically, -O2 is omnipresent.  This shouldn't be, if I understand the
manual correctly.


Reply via email to