Mine are currently
Code: Select all
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both -Wl,-znow"
on several boxes.
I've been using these with the advanced Gentoo install method and overlay by nesl247 (previously know as Evolution Mission). Works great for me, and the the few packages that have problems with --as-needed or -znow can be taken care of by entries in an /etc/portage/bashrc.nesl247 file, as shown below.
---------------------------------------------------------------------------------------------------
# Packages in this array remove --as-needed.
as_needed_packages=(
${as_needed_packages[*]}
media-video/mjpegtools
kde-base/kdemultimedia
kde-base/kdemultimedia-kioslaves
net-mail/courier-imap
media-sound/cdparanoia
mail-client/evolution
media-libs/imlib
)
LDFLAGS="${LDFLAGS:-$( grep ^LDFLAGS /etc/make.conf | sed 's/LDFLAGS="//' | sed 's/"//')}"
for i in ${as_needed_packages[*]}
do
case ${CATEGORY}/${PN} in
${i})
LDFLAGS="$( echo ${LDFLAGS} | sed 's/-Wl,--as-needed//')"
break
;;
esac
done
# Packages in this array remove -znow.
znow_packages=(
${znow_packages[*]}
dev-python/gst-python
x11-base/xorg-server
x11-drivers/ati-drivers
)
for i in ${znow_packages[*]}
do
case ${CATEGORY}/${PN} in
${i})
LDFLAGS="$( echo ${LDFLAGS} | sed 's/-Wl,-znow//')"
break
;;
esac
done
export LDFLAGS=$( echo ${LDFLAGS} )