Hi I'd like to be able to use update-world with some different LDFLAGS for some specific packages.
For instance openoffice fails wilt my standard LDFLAGS="-Wl,-O1 -Wl,--as-needed" (from /etc/make.conf) but succeeds with LDLFAGS=""
Then i found an interesting post (
http://forums.gentoo.org/viewtopic-t-67 ... rt-25.html ):
Mine are currently
Code:
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} )
I'm not a script-expert but it some logic from this could be translated to be of use in the update-script.
Would you be willing to include this feature ( per-package-LDFLAGS ) ?
In theory it would even be possible for update-world to first try the standard LDLAGS for each package and if package fails try again with a simpeler LDFLAGS.... this seems much more complex though. Maybe in some far future version?
keep up the good work, love your script !