Browse Source
busybox: properly pass compiler & linker flags
emacs-27
Leonid Plyushch
5 years ago
No known key found for this signature in database
GPG Key ID: 45F2964132545795
2 changed files with
8 additions and
5 deletions
-
packages/busybox/build.sh
-
packages/busybox/busybox.config
|
|
@ -16,15 +16,18 @@ termux_step_pre_configure() { |
|
|
|
if $TERMUX_ON_DEVICE_BUILD; then |
|
|
|
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds." |
|
|
|
fi |
|
|
|
|
|
|
|
CFLAGS+=" -llog" # Android system liblog.so for syslog |
|
|
|
} |
|
|
|
|
|
|
|
termux_step_configure() { |
|
|
|
sed -e "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" \ |
|
|
|
-e "s|@TERMUX_SYSROOT@|$TERMUX_STANDALONE_TOOLCHAIN/sysroot|g" \ |
|
|
|
-e "s|@TERMUX_HOST_PLATFORM@|${TERMUX_HOST_PLATFORM}|g" \ |
|
|
|
-e "s|@TERMUX_CFLAGS@|$CFLAGS|g" \ |
|
|
|
-e "s|@TERMUX_LDFLAGS@|$LDFLAGS|g" \ |
|
|
|
-e "s|@TERMUX_LDLIBS@|-llog|g" \ |
|
|
|
$TERMUX_PKG_BUILDER_DIR/busybox.config > .config |
|
|
|
|
|
|
|
unset CFLAGS LDFLAGS |
|
|
|
make oldconfig |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -49,9 +49,9 @@ CONFIG_PIE=y |
|
|
|
# CONFIG_FEATURE_SHARED_BUSYBOX is not set |
|
|
|
CONFIG_CROSS_COMPILER_PREFIX="@TERMUX_HOST_PLATFORM@-" |
|
|
|
CONFIG_SYSROOT="@TERMUX_SYSROOT@" |
|
|
|
CONFIG_EXTRA_CFLAGS="" |
|
|
|
CONFIG_EXTRA_LDFLAGS="" |
|
|
|
CONFIG_EXTRA_LDLIBS="" |
|
|
|
CONFIG_EXTRA_CFLAGS="@TERMUX_CFLAGS@" |
|
|
|
CONFIG_EXTRA_LDFLAGS="@TERMUX_LDFLAGS@" |
|
|
|
CONFIG_EXTRA_LDLIBS="@TERMUX_LDLIBS@" |
|
|
|
# CONFIG_USE_PORTABLE_CODE is not set |
|
|
|
# CONFIG_STACK_OPTIMIZATION_386 is not set |
|
|
|
|
|
|
|