Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 70367

Summary: LDFLAGS="-Wl,-O1" breaks mol
Product: Gentoo Linux Reporter: Stefan Bruda <bruda>
Component: Current packagesAssignee: PPC Porters <ppc>
Status: RESOLVED INVALID    
Severity: normal CC: askwar, taviso
Priority: High    
Version: unspecified   
Hardware: PPC64   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 65002    

Description Stefan Bruda 2004-11-07 11:33:57 UTC
Yet aanother MOL build problem, this one probably unrelated to the kernel version.  If LDFLAGS are set to "-Wl,-O1" the build fails and we get:

+ Entering Linux
  AS [x]   /var/tmp/portage/mol-0.9.70/work/mol-0.9.70/src/kmod/Linux/../build/_traps.o
  AS [x]   /var/tmp/portage/mol-0.9.70/work/mol-0.9.70/src/kmod/Linux/../build/_actions.o
ld: unrecognized option '-Wl,-O1'
ld: use the --help option for usage information
make[5]: *** [/var/tmp/portage/mol-0.9.70/work/mol-0.9.70/src/kmod/Linux/../build/mol.o] Error 1
make[4]: *** [_module_/var/tmp/portage/mol-0.9.70/work/mol-0.9.70/src/kmod/Linux/../build] Error 2
nm: '../build/mol.ko': No such file
nm: '../build/mol.ko': No such file
checker.pl failed
rm: cannot remove `../build/mol.ko': No such file or directory

Of course the LDFLAGS are not pertinent to kernel modules (as noted), but they would be nice in the application itself and should be in any case suppressed when building the modules.
Comment 1 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2004-11-13 10:12:34 UTC
I looked into this one and I'll try to fix it as soon as I talked with vapier about a possible bug in flag-o-matic.eclass.
Comment 2 SpanKY gentoo-dev 2004-11-15 11:31:55 UTC
CFLAGS="-Wl,-O1"
LDFLAGS="-O1"

these are correct forms

LDFLAGS="-Wl,-O1"

this is not correct
Comment 3 Stefan Bruda 2004-11-15 16:04:02 UTC
Sorry, but I will have to reopen this.  Reference for the way I use LDFLAGS: http://forums.gentoo.org/viewtopic.php?t=67777 (subsequent posts do explain various differences in syntax).  Also see: http://forums.gentoo.org/viewtopic.php?t=231170 and http://forums.gentoo.org/viewtopic.php?t=226909 (plus references therein).
Comment 4 SpanKY gentoo-dev 2004-11-15 18:21:52 UTC
it doesnt matter how many forums you read, it's still wrong
Comment 5 Luca Barbato gentoo-dev 2004-11-16 02:18:02 UTC
Taviso could you update your guide at the forum with the correct syntax?
Comment 6 Alexander Skwar 2004-12-07 01:30:40 UTC
Hm, I'm a little confused. In this bug, it's written that

CFLAGS="-Wl,-O1"
LDFLAGS="-O1"

should be correct syntax. 

But when I set this, I cannot compile courier-authlib, which uses mysql_config.
I can only do so, when I don't add -Wl,-O1 to CFLAGS