From 242b87e2996fcc464789835b96e0fa5b1d4e531f Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Sun, 29 May 2022 15:18:06 +0200 Subject: [PATCH] package/gcc: add missing --enable-libquadmath-support option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Thomas Petazzoni --- 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 128cf8421d..42484f539b 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -118,7 +118,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