diff --git a/build-package.sh b/build-package.sh index d67f72a2b..a73dd9005 100755 --- a/build-package.sh +++ b/build-package.sh @@ -440,6 +440,11 @@ termux_step_setup_toolchain() { export CXX=$TERMUX_HOST_PLATFORM-g++ LDFLAGS+=" -specs=$TERMUX_SCRIPTDIR/termux.spec" CFLAGS+=" -specs=$TERMUX_SCRIPTDIR/termux.spec" + if [ $TERMUX_ARCH = aarch64 ]; then + # Currently needed hack. + LDFLAGS+=" -Wl,-rpath-link,$TERMUX_PREFIX/lib" + LDFLAGS+=" -Wl,-rpath-link,$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib" + fi else export AS=${TERMUX_HOST_PLATFORM}-clang export CC=$TERMUX_HOST_PLATFORM-clang diff --git a/packages/elfutils/build.sh b/packages/elfutils/build.sh index 5c5faa829..461df54c0 100644 --- a/packages/elfutils/build.sh +++ b/packages/elfutils/build.sh @@ -16,12 +16,6 @@ termux_step_pre_configure() { LDFLAGS+=" -lintl" CFLAGS+=" -DTERMUX_EXPOSE_MEMPCPY=1 -Wno-error=unused-value -Wno-error=format-nonliteral -Wno-error" - if [ $TERMUX_ARCH = aarch64 ]; then - # Currently needed hack. - LDFLAGS+=" -Wl,-rpath-link,$TERMUX_PREFIX/lib" - LDFLAGS+=" -Wl,-rpath-link,$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib" - fi - # Exposes ACCESSPERMS in which elfutils uses: CFLAGS+=" -D__USE_BSD"