diff --git a/common/hooks/pre-configure/00-gnu-configure-asneeded.sh b/common/hooks/pre-configure/00-gnu-configure-asneeded.sh index 16275ab6adc..708a0bbc7b4 100644 --- a/common/hooks/pre-configure/00-gnu-configure-asneeded.sh +++ b/common/hooks/pre-configure/00-gnu-configure-asneeded.sh @@ -7,7 +7,7 @@ hook() { return 0 fi # http://lists.gnu.org/archive/html/libtool-patches/2004-06/msg00002.html - if [ -z "$broken_as_needed" -a "$build_style" = "gnu-configure" ]; then + if [ "$build_style" = "gnu-configure" ]; then sed -i "s/^\([ \t]*tmp_sharedflag\)='-shared'/\1='-shared -Wl,--as-needed'/" ${configure_script} fi } diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 3dd43c6d68c..d9a086a0968 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -380,10 +380,6 @@ setup_pkg() { export CPPFLAGS="$XBPS_TARGET_CPPFLAGS $XBPS_CPPFLAGS $XBPS_CROSS_CPPFLAGS $CPPFLAGS" export LDFLAGS="$XBPS_TARGET_LDFLAGS $XBPS_LDFLAGS $XBPS_CROSS_LDFLAGS $LDFLAGS" - if [ -n "$broken_as_needed" ]; then - LDFLAGS="${LDFLAGS/-Wl,--as-needed/}" - fi - export BUILD_CC="cc" export BUILD_CFLAGS="$XBPS_CFLAGS" export CC_FOR_BUILD="cc"