diff options
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/cc/gcc.sh | 5 | ||||
-rw-r--r-- | scripts/build/companion_libs/100-gmp.sh | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 1ad1db5e..b96bb89b 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -385,6 +385,11 @@ do_gcc_core_backend() { [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}") [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") + # Hint GCC we'll use a bit special version of Newlib + if [ "${CT_LIBC_NEWLIB_NANO_FORMATTED_IO}" = "y" ]; then + extra_config+=("--enable-newlib-nano-formatted-io") + fi + if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then extra_config+=("--enable-__cxa_atexit") else diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh index 4e8c12fb..eafe2dd7 100644 --- a/scripts/build/companion_libs/100-gmp.sh +++ b/scripts/build/companion_libs/100-gmp.sh @@ -87,6 +87,15 @@ do_gmp_backend() { 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 + case "${host}" in + *darwin*) + extra_config+=("--with-pic") + ;; + esac + # FIXME: GMP's configure script doesn't respect the host parameter # when not cross-compiling, ie when build == host. CT_DoExecLog CFG \ |