[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fortran and flag ordering
From: |
NightStrike |
Subject: |
Fortran and flag ordering |
Date: |
Wed, 9 Sep 2009 19:18:38 -0400 |
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.
- Fortran and flag ordering,
NightStrike <=