OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000438OMNeT++command line toolspublic2011-11-14 10:132012-01-09 18:01
michael 
 
normalfeaturehave not tried
postponedsuspended 
4.2rc1 
 
0000438: GCC standard link-time optimizer support
It would be nice if it where possible to support the standard link-time optimizer.

Currently we got error messages about multiple definitions at linking if flto is enabled in configure.user:

CFLAGS_RELEASE='-O2 -DNDEBUG=1 -flto'
LDFLAGS="-O2 -flto -fuse-linker-plugin"

it is possible to extend the LDFLAGS by

 -Wl,--allow-multiple-definition

the the linkinging will be done.

The flto feature has also some benefits for the entire OMNeT++ comile/link stage, it would be possible to compile the files for release/debug only once and optimize it at link stage.
I have tested it on Windows with 4.2rc2 release.
No tags attached.
Issue History
2011-11-14 10:13michaelNew Issue
2011-11-18 17:07michaelNote Added: 0000603
2011-11-23 10:27michaelNote Added: 0000636
2012-01-09 18:01rhornigNote Added: 0000675
2012-01-09 18:01rhornigStatusnew => postponed
2012-01-09 18:01rhornigResolutionopen => suspended

Notes
(0000603)
michael   
2011-11-18 17:07   
On linux (64bit) following settings are OK:

CFLAGS_RELEASE='-O2 -DNDEBUG=1 -flto'
LDFLAGS="-flto"

testet with 4.2 release.
(0000636)
michael   
2011-11-23 10:27   
It is a MINGW bug: http://sourceware.org/bugzilla/show_bug.cgi?id=12762 [^]
(0000675)
rhornig   
2012-01-09 18:01   
Let's wait 'till there is a mingw version that correctly handles this and we can bundle it.