From: Fredrik Fornwall Date: Thu, 19 Jan 2017 17:40:53 +0000 (+0100) Subject: valgrind: Fix arm build by avoiding -mthumb X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/termux-packages/commitdiff_plain/538fab5db5316e970860a8fd1c6f113f98ea8885?ds=sidebyside valgrind: Fix arm build by avoiding -mthumb --- diff --git a/packages/valgrind/build.sh b/packages/valgrind/build.sh index 379f9e42..eeff1abb 100644 --- a/packages/valgrind/build.sh +++ b/packages/valgrind/build.sh @@ -11,8 +11,12 @@ TERMUX_PKG_BLACKLISTED_ARCHES="x86_64" # "error: the clang compiler does not support '-mcpu=cortex-a8'": TERMUX_PKG_CLANG=no -if [ "$TERMUX_ARCH" == "arm" ]; then - # valgrind doesn't like arm; armv7 works, though. - TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --host=armv7-linux-androideabi" -fi - +termux_step_pre_configure() { + if [ "$TERMUX_ARCH" == "arm" ]; then + # valgrind doesn't like arm; armv7 works, though. + TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --host=armv7-linux-androideabi" + # http://lists.busybox.net/pipermail/buildroot/2013-November/082270.html: + # "valgrind uses inline assembly that is not Thumb compatible": + CFLAGS=${CFLAGS/-mthumb/} + fi +}