build-package.sh: Remove _SPECSFLAG
This commit is contained in:
parent
a19f43f2af
commit
619b966418
@ -431,20 +431,22 @@ termux_step_setup_toolchain() {
|
|||||||
# We put this after system PATH to avoid picking up toolchain stripped python
|
# We put this after system PATH to avoid picking up toolchain stripped python
|
||||||
export PATH=$PATH:$TERMUX_STANDALONE_TOOLCHAIN/bin
|
export PATH=$PATH:$TERMUX_STANDALONE_TOOLCHAIN/bin
|
||||||
|
|
||||||
export AR=$TERMUX_HOST_PLATFORM-ar
|
export CFLAGS=""
|
||||||
|
export LDFLAGS="-L${TERMUX_PREFIX}/lib"
|
||||||
|
|
||||||
if [ "$TERMUX_PKG_CLANG" = "no" ]; then
|
if [ "$TERMUX_PKG_CLANG" = "no" ]; then
|
||||||
export AS=${TERMUX_HOST_PLATFORM}-gcc
|
export AS=${TERMUX_HOST_PLATFORM}-gcc
|
||||||
export CC=$TERMUX_HOST_PLATFORM-gcc
|
export CC=$TERMUX_HOST_PLATFORM-gcc
|
||||||
export CXX=$TERMUX_HOST_PLATFORM-g++
|
export CXX=$TERMUX_HOST_PLATFORM-g++
|
||||||
_SPECSFLAG=" -specs=$TERMUX_SCRIPTDIR/termux.spec"
|
LDFLAGS+=" -specs=$TERMUX_SCRIPTDIR/termux.spec"
|
||||||
|
CFLAGS+=" -specs=$TERMUX_SCRIPTDIR/termux.spec"
|
||||||
else
|
else
|
||||||
export AS=${TERMUX_HOST_PLATFORM}-clang
|
export AS=${TERMUX_HOST_PLATFORM}-clang
|
||||||
export CC=$TERMUX_HOST_PLATFORM-clang
|
export CC=$TERMUX_HOST_PLATFORM-clang
|
||||||
export CXX=$TERMUX_HOST_PLATFORM-clang++
|
export CXX=$TERMUX_HOST_PLATFORM-clang++
|
||||||
# TODO: clang does not have specs file, how to ensure pie
|
|
||||||
# binaries gets built?
|
|
||||||
_SPECSFLAG=""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export AR=$TERMUX_HOST_PLATFORM-ar
|
||||||
export CPP=${TERMUX_HOST_PLATFORM}-cpp
|
export CPP=${TERMUX_HOST_PLATFORM}-cpp
|
||||||
export CC_FOR_BUILD=gcc
|
export CC_FOR_BUILD=gcc
|
||||||
export LD=$TERMUX_HOST_PLATFORM-ld
|
export LD=$TERMUX_HOST_PLATFORM-ld
|
||||||
@ -455,8 +457,6 @@ termux_step_setup_toolchain() {
|
|||||||
export READELF=$TERMUX_HOST_PLATFORM-readelf
|
export READELF=$TERMUX_HOST_PLATFORM-readelf
|
||||||
export STRIP=$TERMUX_HOST_PLATFORM-strip
|
export STRIP=$TERMUX_HOST_PLATFORM-strip
|
||||||
|
|
||||||
export CFLAGS="$_SPECSFLAG"
|
|
||||||
export LDFLAGS="$_SPECSFLAG -L${TERMUX_PREFIX}/lib"
|
|
||||||
# Android 7 started to support DT_RUNPATH (but not DT_RPATH), so we may want
|
# Android 7 started to support DT_RUNPATH (but not DT_RPATH), so we may want
|
||||||
# LDFLAGS+="-Wl,-rpath=$TERMUX_PREFIX/lib -Wl,--enable-new-dtags"
|
# LDFLAGS+="-Wl,-rpath=$TERMUX_PREFIX/lib -Wl,--enable-new-dtags"
|
||||||
# and no longer remove DT_RUNPATH in termux-elf-cleaner.
|
# and no longer remove DT_RUNPATH in termux-elf-cleaner.
|
||||||
@ -668,12 +668,6 @@ termux_step_configure_autotools () {
|
|||||||
termux_step_configure_cmake () {
|
termux_step_configure_cmake () {
|
||||||
termux_setup_cmake
|
termux_setup_cmake
|
||||||
|
|
||||||
if [ -n "$_SPECSFLAG" ]; then
|
|
||||||
CFLAGS=${CFLAGS#$_SPECSFLAG}
|
|
||||||
CXXFLAGS=${CXXFLAGS#$_SPECSFLAG}
|
|
||||||
LDFLAGS=${LDFLAGS#$_SPECSFLAG}
|
|
||||||
fi
|
|
||||||
|
|
||||||
local TOOLCHAIN_ARGS="-DCMAKE_ANDROID_STANDALONE_TOOLCHAIN=$TERMUX_STANDALONE_TOOLCHAIN"
|
local TOOLCHAIN_ARGS="-DCMAKE_ANDROID_STANDALONE_TOOLCHAIN=$TERMUX_STANDALONE_TOOLCHAIN"
|
||||||
local BUILD_TYPE=MinSizeRel
|
local BUILD_TYPE=MinSizeRel
|
||||||
test -n "$TERMUX_DEBUG" && BUILD_TYPE=Debug
|
test -n "$TERMUX_DEBUG" && BUILD_TYPE=Debug
|
||||||
|
Loading…
Reference in New Issue
Block a user