You are not logged in.
Will adding
export LDFLAGS="-Wl,-O1 -Wl,--sort-common -s
to /etc/makepkg.conf, enable compilation with those flags when makepkg is executed?
Offline
-s? That might not be wise.
Offline
Will adding
export LDFLAGS="-Wl,-O1 -Wl,--sort-common -s
to /etc/makepkg.conf, enable compilation with those flags when makepkg is executed?
not all the time... it will in most though...
however, some Makefiles don't pickup external CFLAGS/LDFLAGS, so you will see some sed usage to insert the CFLAGS... you'd have to do the same for LDFLAGS there too...
I'd also add the --as-needed flag to those if you're recompiling something like KDE/gnome
Offline
The --as-needed flag should be default for all apps, though it has a bigger impact on the bigger bloated apps with buggy buildsystems.
Offline
Thanks for the replies. I don't fully understand every LDFLAG-option, but I've heard that prelink (which I used to run) should be avoided and LDFLAGS used instead. These particular flags were posted somewhere and claimed to be conservative and safe. You guys seem to disagree, no? I'm not interested in a flaky system, but I want some LDFLAGS-optimizations that are.. well... safe
What's your take on prelink vs. LDFLAGS?
Offline
Use something like -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -s and avoid prelink. -s just strips the library, which is done one way or the other anyway. No one is disagreeing, with ld flags instead of prelink here I hope, it's just that not every makefile/buildsystem honours the LDFLAGS environment variable.
Offline
Use something like -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -s and avoid prelink. -s just strips the library, which is done one way or the other anyway. No one is disagreeing, with ld flags instead of prelink here I hope, it's just that not every makefile/buildsystem honours the LDFLAGS environment variable.
I have no clue what --sort-common does (but I can speculate)... -O1 is for link optimization, and --as-needed is for ELF header shared library listings/loading...
Offline
me neither, but I copied his and added the more important --as-needed. It won't hurt I guess.
Offline
it appears the original LDFLAGS are taken from here:
http://forums.gentoo.org/viewtopic.php?t=67777
check there for what they do...
Offline
Thanks alot for your replies
Phrakture, the thread you linked to looks familiar. That is most probably where I got the LDFLAGS from.
Offline