diff options
Diffstat (limited to 'scripts/build/cc')
-rw-r--r-- | scripts/build/cc/gcc.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index d4c1b43..8fd39b7 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -453,6 +453,16 @@ do_gcc_core_backend() { extra_config+=("--disable-libstdcxx-pch") fi + if [ "${CT_LIBC_GLIBC}" = "y" ]; then + # Report GLIBC's version to GCC, it affects the defaults on other options. + # Pass-2 should be able to get it from the headers, but for some options + # (such as --with-long-double-128) we need to get it right even in pass-1. + # GCC expects just two numbers separated by a dot. + local glibc_version=`CT_GetPkgVersion GLIBC | sed 's/\([1-9][0-9]*\.[1-9][0-9]*\).*/\1/'` + + extra_config+=("--with-glibc-version=${glibc_version}") + fi + case "${CT_CC_GCC_LDBL_128}" in y) extra_config+=("--with-long-double-128");; m) ;; |