From 51c97e3bb5ecf6cef3e6a4d541ecc3ebdb3608b1 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 14 Jul 2019 20:03:07 +0200 Subject: [PATCH] Always use -Oz optimization level --- packages/ruby/build.sh | 1 - packages/scrypt/build.sh | 8 +------- scripts/build/termux_step_setup_toolchain.sh | 6 +----- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/ruby/build.sh b/packages/ruby/build.sh index 382c1f766..54644d3cc 100644 --- a/packages/ruby/build.sh +++ b/packages/ruby/build.sh @@ -23,7 +23,6 @@ termux_step_pre_configure() { if [ "$TERMUX_ARCH_BITS" = 32 ]; then # process.c:function timetick2integer: error: undefined reference to '__mulodi4' TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" rb_cv_builtin___builtin_mul_overflow=no" - CFLAGS="${CFLAGS/-Os/-Oz}" fi } diff --git a/packages/scrypt/build.sh b/packages/scrypt/build.sh index 35f2f5dc6..875a581e3 100644 --- a/packages/scrypt/build.sh +++ b/packages/scrypt/build.sh @@ -2,13 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.tarsnap.com/scrypt.html TERMUX_PKG_DESCRIPTION="scrypt KDF library and file encryption tool" TERMUX_PKG_LICENSE="BSD 2-Clause" TERMUX_PKG_VERSION=1.2.1 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_REVISION=3 TERMUX_PKG_SRCURL=https://www.tarsnap.com/scrypt/scrypt-1.2.1.tgz TERMUX_PKG_SHA256=4621f5e7da2f802e20850436219370092e9fcda93bd598f6d4236cce33f4c577 TERMUX_PKG_DEPENDS="openssl" - -termux_step_pre_configure() { - # Work around miscompilation on at least aarch64 with -Oz, - # see https://github.com/termux/termux-packages/issues/3260: - export CFLAGS=${CFLAGS/-Oz/-Os} -} diff --git a/scripts/build/termux_step_setup_toolchain.sh b/scripts/build/termux_step_setup_toolchain.sh index 16e92621e..6dd07b83a 100644 --- a/scripts/build/termux_step_setup_toolchain.sh +++ b/scripts/build/termux_step_setup_toolchain.sh @@ -47,11 +47,7 @@ termux_step_setup_toolchain() { if [ -n "$TERMUX_DEBUG" ]; then CFLAGS+=" -g3 -O1 -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" else - if [ $TERMUX_ARCH = arm ]; then - CFLAGS+=" -Os" - else - CFLAGS+=" -Oz" - fi + CFLAGS+=" -Oz" fi export CXXFLAGS="$CFLAGS"