Improve the way how LDFLAGS is modified

The -u flags are required only for i686. So why add them to all archs?
This commit is contained in:
Yaksh Bariya 2021-09-14 09:15:42 +05:30
parent 2b1446db88
commit 04c742b575
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581

View File

@ -65,6 +65,7 @@ termux_step_configure() {
DEST_CPU="arm" DEST_CPU="arm"
elif [ $TERMUX_ARCH = "i686" ]; then elif [ $TERMUX_ARCH = "i686" ]; then
DEST_CPU="ia32" DEST_CPU="ia32"
LDFLAGS+=" -u __atomic_fetch_add_8 -u __atomic_load_8 -u __atomic_compare_exchange_8 -latomic"
elif [ $TERMUX_ARCH = "aarch64" ]; then elif [ $TERMUX_ARCH = "aarch64" ]; then
DEST_CPU="arm64" DEST_CPU="arm64"
elif [ $TERMUX_ARCH = "x86_64" ]; then elif [ $TERMUX_ARCH = "x86_64" ]; then
@ -78,8 +79,7 @@ termux_step_configure() {
export CXX_host=g++ export CXX_host=g++
export LINK_host="g++ -Wl,--no-as-needed -ldl -lz" export LINK_host="g++ -Wl,--no-as-needed -ldl -lz"
LDFLAGS+=" -Wl,--no-as-needed -ldl -u __atomic_fetch_add_8 -u __atomic_load_8 -u __atomic_compare_exchange_8 -latomic" LDFLAGS+=" -ldl"
# See note above TERMUX_PKG_DEPENDS why we do not use a shared libuv. # See note above TERMUX_PKG_DEPENDS why we do not use a shared libuv.
./configure \ ./configure \
--prefix=$TERMUX_PREFIX \ --prefix=$TERMUX_PREFIX \