diff options
Diffstat (limited to 'scripts/build/companion_libs')
-rw-r--r-- | scripts/build/companion_libs/100-gmp.sh | 6 | ||||
-rw-r--r-- | scripts/build/companion_libs/121-isl.sh | 9 | ||||
-rw-r--r-- | scripts/build/companion_libs/330-gettext.sh | 22 | ||||
-rw-r--r-- | scripts/build/companion_libs/340-picolibc.sh | 30 | ||||
-rw-r--r-- | scripts/build/companion_libs/350-newlib_nano.sh | 12 |
5 files changed, 43 insertions, 36 deletions
diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh index 3655787..a17eda9 100644 --- a/scripts/build/companion_libs/100-gmp.sh +++ b/scripts/build/companion_libs/100-gmp.sh @@ -109,12 +109,6 @@ do_gmp_backend() { CT_DoLog EXTRA "Configuring GMP" - # FIXME is it needed even for older versions? They seem to compile fine - # without it. - if [ "${CT_GMP_HAS_MPBSD}" = "y" ]; then - extra_config+=("--enable-mpbsd") - fi - # To avoind “illegal text-relocation” linking error against # the static library, see: # https://github.com/Homebrew/homebrew-core/pull/25470 diff --git a/scripts/build/companion_libs/121-isl.sh b/scripts/build/companion_libs/121-isl.sh index 8b1b720..3577b75 100644 --- a/scripts/build/companion_libs/121-isl.sh +++ b/scripts/build/companion_libs/121-isl.sh @@ -84,15 +84,6 @@ do_isl_backend() { CT_DoLog EXTRA "Configuring ISL" - if [ "${CT_ISL_NEEDS_WITH_GMP}" != "y" ]; then - extra_config+=("--with-libgmp-prefix=${prefix}") - extra_config+=("--with-libgmpxx-prefix=${prefix}") - fi - - if [ "${CT_ISL_HAS_WITH_PIPLIB}" != "y" ]; then - extra_config+=("--with-piplib=no") - fi - CT_DoExecLog CFG \ CFLAGS="${cflags}" \ CXXFLAGS="${cxxflags}" \ diff --git a/scripts/build/companion_libs/330-gettext.sh b/scripts/build/companion_libs/330-gettext.sh index 149d7d7..9fa3bdc 100644 --- a/scripts/build/companion_libs/330-gettext.sh +++ b/scripts/build/companion_libs/330-gettext.sh @@ -80,6 +80,28 @@ do_gettext_backend() { return ;; + # Starting with 0.21, gettext cannot build against uClibc-NG: gettext + # checks if it needs to use fopen wrapper (using gnulib) and newer versions + # of gnulib also check if fopen provided by the system supports 'e' and 'x' + # modes. In cross-compile environment, gnulib falls back to assuming fopen + # does not support these modes unless the target tuple is glibc or musl + # (rightly so, since these fopen modes are optional in uClibc-NG). + # Unfortunately, the fopen() wrapper does not compile against uClibc-NG's + # stdio.h then because it includes <stdio.h> after defining __need_FILE macro. + # It looks like two bugs, one in each of uClibc-ng and gnulib: + # - uClibc-ng does not include its internal headers with the definitions for the + # __BEGIN_NAMESPACE_STD/__END_NAMESPACE_STD macros, which therefore escape + # unsubstituted into the including code. + # - gnulib shouldn't expect the fopen() prototype if it only asked for FILE + # structure definition by defining the __need_FILE macro. + # Until the maintainers sort this out, disallow newer gettext versions if + # linking against uClibc-NG. + *-uclibc*) + if [ "${CT_GETTEXT_INCOMPATIBLE_WITH_UCLIBC_NG}" = "y" ]; then + CT_Abort "This version of gettext is incompatible with uClibc-NG" + fi + ;; + # A bit ugly. D__USE_MINGW_ANSI_STDIO=1 has its own {v}asprintf functions # but gettext configure doesn't see this flag when it checks for that. An # alternative may be to use CC="${host}-gcc ${cflags}" but that didn't diff --git a/scripts/build/companion_libs/340-picolibc.sh b/scripts/build/companion_libs/340-picolibc.sh index cb96e71..e879005 100644 --- a/scripts/build/companion_libs/340-picolibc.sh +++ b/scripts/build/companion_libs/340-picolibc.sh @@ -32,18 +32,18 @@ do_cc_libstdcxx_picolibc() if [ "${CT_LIBC_PICOLIBC_GCC_LIBSTDCXX}" = "y" ]; then final_opts+=( "host=${CT_HOST}" ) - final_opts+=( "libstdcxx_name=picolibc" ) + final_opts+=( "libstdcxx_name=picolibc" ) final_opts+=( "prefix=${CT_PREFIX_DIR}" ) final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" ) final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) final_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) final_opts+=( "lang_list=c,c++" ) final_opts+=( "build_step=libstdcxx" ) - final_opts+=( "extra_config+=('--enable-stdio=stdio_pure')" ) - final_opts+=( "extra_config+=('--disable-wchar_t')" ) - if [ "${CT_LIBC_PICOLIBC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then - final_opts+=( "enable_optspace=yes" ) - fi + final_opts+=( "extra_config+=('--enable-stdio=stdio_pure')" ) + final_opts+=( "extra_config+=('--disable-wchar_t')" ) + if [ "${CT_LIBC_PICOLIBC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then + final_opts+=( "enable_optspace=yes" ) + fi if [ "${CT_BARE_METAL}" = "y" ]; then final_opts+=( "mode=baremetal" ) @@ -107,7 +107,7 @@ RETARGETABLE_LOCKING:newlib-retargetable-locking done [ "${CT_USE_SYSROOT}" = "y" ] && \ - picolibc_opts+=( "-Dsysroot-install=true" ) + picolibc_opts+=( "-Dsysroot-install=true" ) [ "${CT_LIBC_PICOLIBC_EXTRA_SECTIONS}" = "y" ] && \ CT_LIBC_PICOLIBC_TARGET_CFLAGS="${CT_LIBC_PICOLIBC_TARGET_CFLAGS} -ffunction-sections -fdata-sections" @@ -122,11 +122,11 @@ RETARGETABLE_LOCKING:newlib-retargetable-locking # build : not used # host : the machine building picolibc # target : the machine picolibc runs on - meson_cflags="" - for cflag in ${cflags_for_target}; do - meson_cflags="${meson_cflags} '${cflag}'," - done - cat << EOF > picolibc-cross.txt + meson_cflags="" + for cflag in ${cflags_for_target}; do + meson_cflags="${meson_cflags} '${cflag}'," + done + cat << EOF > picolibc-cross.txt [binaries] c = '${CT_TARGET}-gcc' ar = '${CT_TARGET}-ar' @@ -149,9 +149,9 @@ EOF meson \ --cross-file picolibc-cross.txt \ --prefix="${CT_PREFIX_DIR}" \ - -Dincludedir=picolibc/include \ - -Dlibdir=picolibc/${CT_TARGET}/lib \ - -Dspecsdir="${CT_SYSROOT_DIR}"/lib \ + -Dincludedir=picolibc/include \ + -Dlibdir=picolibc/${CT_TARGET}/lib \ + -Dspecsdir="${CT_SYSROOT_DIR}"/lib \ "${CT_SRC_DIR}/picolibc" \ "${picolibc_opts[@]}" \ "${CT_LIBC_PICOLIBC_EXTRA_CONFIG_ARRAY[@]}" diff --git a/scripts/build/companion_libs/350-newlib_nano.sh b/scripts/build/companion_libs/350-newlib_nano.sh index f521be1..ad6ea9a 100644 --- a/scripts/build/companion_libs/350-newlib_nano.sh +++ b/scripts/build/companion_libs/350-newlib_nano.sh @@ -57,16 +57,16 @@ do_cc_libstdcxx_newlib_nano() if [ "${CT_NEWLIB_NANO_GCC_LIBSTDCXX}" = "y" ]; then final_opts+=( "host=${CT_HOST}" ) - final_opts+=( "libstdcxx_name=newlib-nano" ) + final_opts+=( "libstdcxx_name=newlib-nano" ) final_opts+=( "prefix=${CT_PREFIX_DIR}" ) final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" ) final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) final_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) final_opts+=( "lang_list=c,c++" ) final_opts+=( "build_step=libstdcxx" ) - if [ "${CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE}" = "y" ]; then - final_opts+=( "enable_optspace=yes" ) - fi + if [ "${CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE}" = "y" ]; then + final_opts+=( "enable_optspace=yes" ) + fi if [ -n "${CT_NEWLIB_NANO_GCC_LIBSTDCXX_TARGET_CXXFLAGS}" ]; then final_opts+=( "extra_cxxflags_for_target=${CT_NEWLIB_NANO_GCC_LIBSTDCXX_TARGET_CXXFLAGS}" ) fi @@ -185,8 +185,8 @@ ENABLE_TARGET_OPTSPACE:target-optspace --host=${CT_BUILD} \ --target=${CT_TARGET} \ --prefix=${CT_PREFIX_DIR} \ - --exec-prefix=${CT_PREFIX_DIR}/newlib-nano \ - --libdir=${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/lib \ + --exec-prefix=${CT_PREFIX_DIR}/newlib-nano \ + --libdir=${CT_PREFIX_DIR}/newlib-nano/${CT_TARGET}/lib \ "${newlib_opts[@]}" \ "${CT_LIBC_NEWLIB_NANO_EXTRA_CONFIG_ARRAY[@]}" |