Browse Source

arm: don't build with -fno-integrated-as

Fixes ruby segfault (without the need for -O1).
android-5
Henrik Grimler 6 years ago
committed by Fredrik Fornwall
parent
commit
e85e3907de
  1. 1
      build-package.sh
  2. 6
      packages/ruby/build.sh

1
build-package.sh

@ -604,7 +604,6 @@ termux_step_setup_toolchain() {
# "We recommend using the -mthumb compiler flag to force the generation of 16-bit Thumb-2 instructions".
# With r13 of the ndk ruby 2.4.0 segfaults when built on arm with clang without -mthumb.
CFLAGS+=" -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb"
CFLAGS+=" -fno-integrated-as"
LDFLAGS+=" -march=armv7-a"
elif [ "$TERMUX_ARCH" = "i686" ]; then
# From $NDK/docs/CPU-ARCH-ABIS.html:

6
packages/ruby/build.sh

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.ruby-lang.org/
TERMUX_PKG_DESCRIPTION="Dynamic programming language with a focus on simplicity and productivity"
_MAJOR_VERSION=2.5
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.1
TERMUX_PKG_REVISION=4
TERMUX_PKG_REVISION=5
TERMUX_PKG_SHA256=886ac5eed41e3b5fc699be837b0087a6a5a3d10f464087560d2d21b3e71b754d
TERMUX_PKG_SRCURL=https://cache.ruby-lang.org/pub/ruby/${_MAJOR_VERSION}/ruby-${TERMUX_PKG_VERSION}.tar.xz
# libbffi is used by the fiddle extension module:
@ -22,10 +22,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"
if [ "$TERMUX_ARCH" = arm ]; then
# Workaround for segmentation fault:
export CFLAGS="${CFLAGS/-Os/} -O1"
fi
fi
}

Loading…
Cancel
Save