TIP Safe LDFLAGS

From Gentoo Linux Wiki

Jump to: navigation, search
This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

Contents

[edit] Safe LDFLAGS ?

LDFLAGS="-Wl,-O1"

This tells ld to optimize the hash table. As a side effect the hash table gets larger. This optimization is usually safe. For more information see this article

[edit] Remove unneeded symbol references during linking

LDFLAGS="-Wl,--as-needed"

The case for and against --as-needed

[edit] Other LDFLAGS, not necessarily safe

LDFLAGS="-Wl,--sort-common"
LDFLAGS="-Wl,--relax"
  • -Wl,--relax will break glibc
  • -Wl,--export-dynamic will also break glibc (or possibly its combination with -Wl,-O1)

[edit] Package specific LDFLAGS

Package LDFLAGS
x11-drivers/xf86-input-mouse
- Incompatible with --as-needed

[edit] See Also

Personal tools