X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/c9d4e74fa11c94958961e840c6aaf9af8d12d08d..47463899868b46e59caf6cee016cf66873c186b4:/build-package.sh diff --git a/build-package.sh b/build-package.sh index 2790f6f7..89241315 100755 --- a/build-package.sh +++ b/build-package.sh @@ -661,19 +661,46 @@ termux_step_configure_autotools () { done 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 - # about this problem which may cause linker errors in test scripts not undef:ing malloc and - # also cause problems with e.g. malloc interceptors such as libgc: - local AVOID_AUTOCONF_WRAPPERS="ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes" - # Similarly, disable gnulib's rpl_getcwd(). It returns the wrong value, affecting zile. See - # . - 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_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" - # Remove rpl_gettimeofday reference when building at least coreutils: - AVOID_AUTOCONF_WRAPPERS+=" gl_cv_func_tzset_clobber=no gl_cv_func_gettimeofday_clobber=no gl_cv_func_gettimeofday_posix_signature=yes" - - # NOTE: We do not want to quote AVOID_AUTOCONF_WRAPPERS as we want word expansion. - env $AVOID_AUTOCONF_WRAPPERS "$TERMUX_PKG_SRCDIR/configure" \ + # Avoid gnulib wrapping of functions when cross compiling. See + # http://wiki.osdev.org/Cross-Porting_Software#Gnulib + # https://gitlab.com/sortix/sortix/wikis/Gnulib + # https://github.com/termux/termux-packages/issues/76 + local AVOID_GNULIB="" + AVOID_GNULIB+=" ac_cv_func_malloc_0_nonnull=yes" + AVOID_GNULIB+=" ac_cv_func_realloc_0_nonnull=yes" + AVOID_GNULIB+=" am_cv_func_working_getline=yes" + AVOID_GNULIB+=" gl_cv_func_dup2_works=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_GNULIB as we want word expansion. + env $AVOID_GNULIB "$TERMUX_PKG_SRCDIR/configure" \ --disable-dependency-tracking \ --prefix=$TERMUX_PREFIX \ --disable-rpath --disable-rpath-hack \