Browse Source
Merge pull request #4865 from buttaface/rpath
termux_step_setup_toolchain.sh: don't add duplicate rpath for on-device builds
build-on-device
Leonid Plyushch
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
scripts/build/termux_step_setup_toolchain.sh
|
@ -24,6 +24,7 @@ termux_step_setup_toolchain() { |
|
|
if [ $TERMUX_ARCH = arm ]; then |
|
|
if [ $TERMUX_ARCH = arm ]; then |
|
|
CCTERMUX_HOST_PLATFORM=armv7a-linux-androideabi$TERMUX_PKG_API_LEVEL |
|
|
CCTERMUX_HOST_PLATFORM=armv7a-linux-androideabi$TERMUX_PKG_API_LEVEL |
|
|
fi |
|
|
fi |
|
|
|
|
|
LDFLAGS+=" -Wl,-rpath=$TERMUX_PREFIX/lib" |
|
|
else |
|
|
else |
|
|
export CC_FOR_BUILD=$CC |
|
|
export CC_FOR_BUILD=$CC |
|
|
# Some build scripts use environment variable 'PKG_CONFIG', so |
|
|
# Some build scripts use environment variable 'PKG_CONFIG', so |
|
@ -53,7 +54,7 @@ termux_step_setup_toolchain() { |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# Android 7 started to support DT_RUNPATH (but not DT_RPATH). |
|
|
# Android 7 started to support DT_RUNPATH (but not DT_RPATH). |
|
|
LDFLAGS+=" -Wl,-rpath=$TERMUX_PREFIX/lib,--enable-new-dtags" |
|
|
LDFLAGS+=" -Wl,--enable-new-dtags" |
|
|
|
|
|
|
|
|
# Avoid linking extra (unneeded) libraries. |
|
|
# Avoid linking extra (unneeded) libraries. |
|
|
LDFLAGS+=" -Wl,--as-needed" |
|
|
LDFLAGS+=" -Wl,--as-needed" |
|
|