From 20e0f706c60898a283374bbd15096b7bd6b1fbc5 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 22 Aug 2017 16:48:45 -0700 Subject: Fix PPC64LE by supplying --with-glibc-version Signed-off-by: Alexey Neyman --- scripts/build/cc/gcc.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts/build/cc') diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index d4c1b430..8fd39b77 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) ;; -- cgit v1.2.3