build-package.sh: Avoid more gnulib wrappers

This commit is contained in:
Fredrik Fornwall 2017-02-04 01:15:26 +01:00
parent c659001544
commit 00d9769e93

View File

@ -661,19 +661,46 @@ termux_step_configure_autotools () {
done done
export PATH=$TERMUX_PKG_TMPDIR/config-scripts:$PATH export PATH=$TERMUX_PKG_TMPDIR/config-scripts:$PATH
# See http://wiki.buici.com/xwiki/bin/view/Programing+C+and+C%2B%2B/Autoconf+and+RPL_MALLOC # Avoid gnulib wrapping of functions when cross compiling. See
# about this problem which may cause linker errors in test scripts not undef:ing malloc and # http://wiki.osdev.org/Cross-Porting_Software#Gnulib
# also cause problems with e.g. malloc interceptors such as libgc: # https://gitlab.com/sortix/sortix/wikis/Gnulib
local AVOID_AUTOCONF_WRAPPERS="ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes" # https://github.com/termux/termux-packages/issues/76
# Similarly, disable gnulib's rpl_getcwd(). It returns the wrong value, affecting zile. See local AVOID_GNULIB=""
# <https://github.com/termux/termux-packages/issues/76>. AVOID_GNULIB+=" ac_cv_func_malloc_0_nonnull=yes"
AVOID_AUTOCONF_WRAPPERS+=" gl_cv_func_getcwd_null=yes gl_cv_func_getcwd_posix_signature=yes gl_cv_func_getcwd_path_max=yes gl_cv_func_getcwd_abort_bug=no" AVOID_GNULIB+=" ac_cv_func_realloc_0_nonnull=yes"
AVOID_AUTOCONF_WRAPPERS+=" gl_cv_header_working_fcntl_h=yes gl_cv_func_fcntl_f_dupfd_cloexec=yes gl_cv_func_fcntl_f_dupfd_works=yes" AVOID_GNULIB+=" am_cv_func_working_getline=yes"
# Remove rpl_gettimeofday reference when building at least coreutils: AVOID_GNULIB+=" gl_cv_func_dup2_works=yes"
AVOID_AUTOCONF_WRAPPERS+=" gl_cv_func_tzset_clobber=no gl_cv_func_gettimeofday_clobber=no gl_cv_func_gettimeofday_posix_signature=yes" AVOID_GNULIB+=" gl_cv_func_fcntl_f_dupfd_cloexec=yes"
AVOID_GNULIB+=" gl_cv_func_fcntl_f_dupfd_works=yes"
AVOID_GNULIB+=" gl_cv_func_getcwd_abort_bug=no"
AVOID_GNULIB+=" gl_cv_func_getcwd_null=yes"
AVOID_GNULIB+=" gl_cv_func_getcwd_path_max=yes"
AVOID_GNULIB+=" gl_cv_func_getcwd_posix_signature=yes"
AVOID_GNULIB+=" gl_cv_func_gettimeofday_clobber=no"
AVOID_GNULIB+=" gl_cv_func_gettimeofday_posix_signature=yes"
AVOID_GNULIB+=" gl_cv_func_link_works=yes"
AVOID_GNULIB+=" gl_cv_func_lstat_dereferences_slashed_symlink=yes"
AVOID_GNULIB+=" gl_cv_func_memchr_works=yes"
AVOID_GNULIB+=" gl_cv_func_mkdir_trailing_dot_works=yes"
AVOID_GNULIB+=" gl_cv_func_mkdir_trailing_slash_works=yes"
AVOID_GNULIB+=" gl_cv_func_select_detects_ebadf=yes"
AVOID_GNULIB+=" gl_cv_func_snprintf_retval_c99=yes"
AVOID_GNULIB+=" gl_cv_func_stat_dir_slash=yes"
AVOID_GNULIB+=" gl_cv_func_stat_file_slash=yes"
AVOID_GNULIB+=" gl_cv_func_strerror_0_works=yes"
AVOID_GNULIB+=" gl_cv_func_symlink_works=yes"
AVOID_GNULIB+=" gl_cv_func_tzset_clobber=no"
AVOID_GNULIB+=" gl_cv_func_unlink_honors_slashes=yes"
AVOID_GNULIB+=" gl_cv_func_unlink_honors_slashes=yes"
AVOID_GNULIB+=" gl_cv_func_wcwidth_works=yes"
AVOID_GNULIB+=" gl_cv_func_working_getdelim=yes"
AVOID_GNULIB+=" gl_cv_func_working_mkstemp=yes"
AVOID_GNULIB+=" gl_cv_func_working_mktime=yes"
AVOID_GNULIB+=" gl_cv_func_working_strerror=yes"
AVOID_GNULIB+=" gl_cv_header_working_fcntl_h=yes"
# NOTE: We do not want to quote AVOID_AUTOCONF_WRAPPERS as we want word expansion. # NOTE: We do not want to quote AVOID_GNULIB as we want word expansion.
env $AVOID_AUTOCONF_WRAPPERS "$TERMUX_PKG_SRCDIR/configure" \ env $AVOID_GNULIB "$TERMUX_PKG_SRCDIR/configure" \
--disable-dependency-tracking \ --disable-dependency-tracking \
--prefix=$TERMUX_PREFIX \ --prefix=$TERMUX_PREFIX \
--disable-rpath --disable-rpath-hack \ --disable-rpath --disable-rpath-hack \