[Buildroot] [PATCH for-next 06/11] package/gcc: add missing --enable-libquadmath-support option

Romain Naour romain.naour at gmail.com
Sun May 29 13:18:06 UTC 2022


When BR2_TOOLCHAIN_HAS_LIBQUADMATH is set, --enable-libquadmath-support
option is missing. So the float128 support is not fully enabled in gcc.

This lead to a build issue with gcc 12 on PowerPC power8 due to missing
M_2_SQRTPIq definition (provided by libquadmath.h).

../../../libgfortran/intrinsics/erfc_scaled.c: In function ‘erfc_scaled_r17’:
../../../libgfortran/intrinsics/erfc_scaled.c:143:22: error: ‘M_2_SQRTPIq’ undeclared (first use in this function); did you mean ‘M_2_SQRTPIf’?
  143 | # define _M_2_SQRTPI M_2_SQRTPIq
      |                      ^~~~~~~~~~~

This is fixed by adding --enable-libquadmath-support (like crosstool-ng
handling [1]).

Fixes:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/2510178766

[1] https://github.com/crosstool-ng/crosstool-ng/blob/crosstool-ng-1.25.0/scripts/build/cc/gcc.sh#L370

Signed-off-by: Romain Naour <romain.naour at gmail.com>
---
 package/gcc/gcc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 73440e9e35..c3c1df833b 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -121,7 +121,7 @@ endif
 
 # quadmath support requires wchar
 ifeq ($(BR2_USE_WCHAR)$(BR2_TOOLCHAIN_HAS_LIBQUADMATH),yy)
-HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath
+HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath --enable-libquadmath-support
 else
 HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath --disable-libquadmath-support
 endif
-- 
2.35.3




More information about the buildroot mailing list