libelf: compile with -O1

Optimization flags -O2/-Oz cause bus error in program `uftrace` on ARM devices.
This commit is contained in:
Leonid Pliushch 2019-09-11 01:31:44 +03:00
parent 23b8ac3f11
commit 41db6ee864

View File

@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="GPL-2.0"
# NOTE: We only build the libelf part of elfutils for now,
# as other parts are not clang compatible.
TERMUX_PKG_VERSION=0.176
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=eb5747c371b0af0f71e86215a5ebb88728533c3a104a43d4231963f308cd1023
TERMUX_PKG_SRCURL=ftp://sourceware.org/pub/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2
# libandroid-support for langinfo.
@ -22,12 +22,16 @@ termux_step_pre_configure() {
CFLAGS+=" -DFNM_EXTMATCH=0"
if [ "$TERMUX_ARCH" = "arm" ]; then
CFLAGS="${CFLAGS/-Oz/-O1}"
fi
cp $TERMUX_PKG_BUILDER_DIR/error.h .
cp $TERMUX_PKG_BUILDER_DIR/stdio_ext.h .
cp $TERMUX_PKG_BUILDER_DIR/obstack.h .
cp $TERMUX_PKG_BUILDER_DIR/qsort_r.h .
cp $TERMUX_PKG_BUILDER_DIR/aligned_alloc.c libelf
autoreconf -if
autoreconf -if
}
termux_step_make() {