Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232618 - Compilation Optimization Guide contains outdated information about LDFLAGS
Summary: Compilation Optimization Guide contains outdated information about LDFLAGS
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: nm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-22 03:34 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2008-07-22 06:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-07-22 03:34:35 UTC
Compilation Optimization Guide contains outdated information about LDFLAGS. LDFLAGS are now officially supported.

Some suggestions:
1. Create a section which will describe some safe flags:
   -Wl,-O1
   -Wl,--as-needed
      Some information:
      http://www.gentoo.org/proj/en/qa/asneeded.xml
   -Wl,--hash-style=gnu
       Mention that -Wl,--hash-style=gnu can be used only in GLibC non-MIPS
       systems.
   -Wl,--sort-common

2. Create a section which will describe some safe flags, which rather should
   not be specified in LDFLAGS, because they are enabled by default in Gentoo
   (if sys-devel/binutils was built with USE="-vanilla"):
   -Wl,--enable-new-dtags
   -Wl,--hash-style=both
   -Wl,-z,relro
      Some information:
      http://www.gentoo.org/proj/en/hardened/hardened-toolchain.xml#RELRO

3. Consider splitting LDFLAGS documentation to "Linking Optimization Guide".
Comment 1 nm (RETIRED) gentoo-dev 2008-07-22 06:00:12 UTC
I updated the LDFLAGS section to account for the changed stance on LDFLAGS.

However, under no circumstances should any more information on individual LDFLAGS or separate guides on linking optimizations be created. We don't encourage users to set their own LDFLAGS; that's the whole point of the developer decision to set them in the base profiles. User-specified LDFLAGS are *still not* supported. Users should not be messing with LDFLAGS.

Also, as things like gnu hash style have yet to settle down, the guide will not discuss those nor any other specific LDFLAGS. As the discussion on the ML has indicated, soon enough the default LDFLAGS will take those into account, depending on environment.