xbps-src: only process broken_as_needed in one place.

This commit is contained in:
Juan RP 2011-07-04 10:56:35 +02:00
parent e9faa54033
commit 141c0ab3ba
3 changed files with 5 additions and 11 deletions

View file

@ -78,12 +78,6 @@ build_src_phase()
fi
fi
# Disable -Wl,--as-needed if requested!
if [ -n "$broken_as_needed" -a -n "$XBPS_LDFLAGS" ]; then
export XBPS_LDFLAGS="$(echo $XBPS_LDFLAGS|sed -e "s|-Wl,--as-needed||g")"
export LDFLAGS="$XBPS_LDFLAGS $LDFLAGS"
fi
if [ "$build_style" = "custom-install" ]; then
run_func do_build
else

View file

@ -105,11 +105,6 @@ configure_src_phase()
cd $build_wrksrc || return 1
fi
if [ -n "$broken_as_needed" -a -n "$XBPS_LDFLAGS" ]; then
export XBPS_LDFLAGS="$(echo $XBPS_LDFLAGS|sed -e "s|-Wl,--as-needed||g")"
export LDFLAGS="$XBPS_LDFLAGS $LDFLAGS"
fi
case "$build_style" in
gnu_configure|gnu-configure) run_func do_gnu_configure ;;
configure) run_func do_configure ;;

View file

@ -298,6 +298,11 @@ set_tmpl_common_vars()
export CPPFLAGS="$XBPS_CPPFLAGS $CPPFLAGS"
export LDFLAGS="$XBPS_LDFLAGS $LDFLAGS"
if [ -n "$broken_as_needed" -a -n "$XBPS_LDFLAGS" ]; then
export XBPS_LDFLAGS="$(echo $XBPS_LDFLAGS|sed -e "s|-Wl,--as-needed||g")"
export LDFLAGS="$XBPS_LDFLAGS $LDFLAGS"
fi
if [ -z "$in_chroot" ]; then
export CPPFLAGS="-I$XBPS_MASTERDIR/usr/include"
if [ -d /usr/lib/libfakeroot ]; then