libsasl: Fix mistake in build script
[termux-packages] / packages / ruby / build.sh
index 4da90b7..190a7b7 100644 (file)
@@ -18,6 +18,14 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" rb_cv_type_deprecated=x"
 # getresuid(2) does not work on ChromeOS - https://github.com/termux/termux-app/issues/147:
 # TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_getresuid=no"
 
+termux_step_pre_configure() {
+       # This exception is to avoid a broken ruby on 32-bit arm
+       # with NDK r15c and ruby 2.4.2 - see #1520.
+       if [ "$TERMUX_ARCH" = arm ]; then
+               CFLAGS=${CFLAGS/Oz/O1}
+       fi
+}
+
 termux_step_make_install () {
        make install
        make uninstall # remove possible remains to get fresh timestamps