On 2013-04-04 10:22, Roland Kaufmann wrote:
>> Debug builds are the default when building from source.
On 2013-04-04 14:37, Markus Blatt wrote:
What is the preferred way to override this with custom flags?
There is no option at the moment to customize the optimization flags;
selecting the Release profile with -DCMAKE_BUILD_TYPE=Release will
enable optimizations. For the next release, we'll define some variables
that can be modified to select individual optimization flags.
Digging through configure I found the --disable-debug flag that
results in CXXFLAGS="-O3 -DNDEBUG".
This is the same as setting the variable above, but in autotools
compatibility mode.
I have no idea what is wrong here. Suspects are these options: -mtune
and -flto .
I don't think it is -mtune because that only selects the host
architecture as the one o optimize for. I rather suspect that it is
-flto. If you have a version of GCC < 4.7 it may be too eager to discard
segments.
If you have a custom version of GCC, see:
<http://stackoverflow.com/questions/1239730/help-with-linker-failer-gnu-linkonce-t>
Try comment out line 23 in cmake/Modules/UseOptimization.cmake and
report whether that works.
--
Roland.
_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm