gcc: disable fortran use of libquadmath
PATCH 1/1 gcc: disable fortran use of libquadmath
The GCC package has a default conf option of disabling libquadmath and the toolchain dependencies selectively enabled it if i386 / x64.
Fixes:
https://gitlab.com/bootlin/toolchains-builder/-/jobs/729359622
This patch fixes a build failure when (GCC + glibc) is being built for the IBM Power8 arch and has libgfortran enabled + libquadmath disabled. The libgfortran has a code condition for __float128 and includes the quadmath headers. The bug occurs because Power8 has emulated float128 support. The fix per GCC options is to also set --disable-libquadmath-support which disables the __float128/libquadmath support in gcc/fortran and in libgfortran [1].
Another option to fix the build failure was to enable libquadmath for IBM Power8 (ISA 2.07), however this would be soft float based as the ISA 3.0+ (Power9) first supports native float128 [2][3].
[1] https://fortran.gcc.gnu.narkive.com/8uSfoKUS/patch-build-pr-46540-add-disable-libquadmath-disable-libquadmath-support
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66382#c7
[3] https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html
--- package/gcc/gcc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/gcc/gcc.mk +1 -1
@@ -116,7 +116,7 @@ endif ifeq ($(BR2_USE_WCHAR)$(BR2_TOOLCHAIN_HAS_LIBQUADMATH),yy) HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath else -HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath +HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath --disable-libquadmath-support endif # Disable libsanitizer due to a build issue with gcc 7.5 and glibc 2.31.
Signature · 1 line
2.17.1
PATCH 1/1 gcc: disable fortran use of libquadmath
Hello Matt,
Le 11/09/2020 ? 14:41, Matt Weber a ?crit?:
Quoted 14 lines
The GCC package has a default conf option of disabling libquadmath and the toolchain dependencies selectively enabled it if i386 / x64.
Fixes:
https://gitlab.com/bootlin/toolchains-builder/-/jobs/729359622This patch fixes a build failure when (GCC + glibc) is being built for the IBM Power8 arch and has libgfortran enabled + libquadmath disabled. The libgfortran has a code condition for
__float128and includes the quadmath headers. The bug occurs because Power8 has emulated float128 support. The fix per GCC options is to also set --disable-libquadmath-support which disables the __float128/libquadmath support in gcc/fortran and in libgfortran [1].
Quoted 3 lines
Another option to fix the build failure was to enable libquadmath for IBM Power8 (ISA 2.07), however this would be soft float based as the ISA 3.0+ (Power9) first supports native float128 [2][3].
I did a test with toolchain-builder this weekend using Buildroot's master branch but without your patch (I missed that it was included for toolchain builder release 2020.08-1). So I had the same issue...
I tried to fix it by enabling libquadmath even if it's a software support:
http://patchwork.ozlabs.org/project/buildroot/patch/20201004142050.2487724-1-romain.naour at gmail.com
But I can't really test the libquadmath solution since I'm only using qemu to do a boot testing. So your proposal looks safer.
Best regards,
Romain
Quoted 25 lines
[1] https://fortran.gcc.gnu.narkive.com/8uSfoKUS/patch-build-pr-46540-add-disable-libquadmath-disable-libquadmath-support
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66382#c7
[3] https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.htmlCc Thomas Petazzoni <[email protected]>Signed-off-by Matthew Weber <[email protected]>--- package/gcc/gcc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/gcc/gcc.mk +1
-1@@ -116,7 +116,7 @@ endif ifeq ($(BR2_USE_WCHAR)$(BR2_TOOLCHAIN_HAS_LIBQUADMATH),yy) HOST_GCC_COMMON_CONF_OPTS += --enable-libquadmath else -HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath +HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath --disable-libquadmath-support endif # Disable libsanitizer due to a build issue with gcc 7.5 and glibc 2.31.
PATCH 1/1 gcc: disable fortran use of libquadmath
Romain,
Quoted 26 lines · Romain Naour
Hello Matt,
Le 11/09/2020 ? 14:41, Matt Weber a ?crit :
Quoted 14 lines
The GCC package has a default conf option of disabling libquadmath and the toolchain dependencies selectively enabled it if i386 / x64.
Fixes:
https://gitlab.com/bootlin/toolchains-builder/-/jobs/729359622This patch fixes a build failure when (GCC + glibc) is being built for the IBM Power8 arch and has libgfortran enabled + libquadmath disabled. The libgfortran has a code condition for
__float128and includes the quadmath headers. The bug occurs because Power8 has emulated float128 support. The fix per GCC options is to also set --disable-libquadmath-support which disables the __float128/libquadmath support in gcc/fortran and in libgfortran [1].Quoted 3 lines
Another option to fix the build failure was to enable libquadmath for IBM Power8 (ISA 2.07), however this would be soft float based as the ISA 3.0+ (Power9) first supports native float128 [2][3].
I did a test with toolchain-builder this weekend using Buildroot's master branch but without your patch (I missed that it was included for toolchain builder release 2020.08-1). So I had the same issue...
Quoted 5 lines
I tried to fix it by enabling libquadmath even if it's a software support:
http://patchwork.ozlabs.org/project/buildroot/patch/20201004142050.2487724-1-romain.naour at gmail.comBut I can't really test the libquadmath solution since I'm only using qemu to do a boot testing. So your proposal looks safer.
I ran into a similar test situation. I agree there are more ppc archs that could have libquadmath enabled. However after reading about some of the performance regressions when hardware doesn't support float128 but the quadmath library is used, I picked a conservative path of disabling.
Best Regards,
Matt
Thomas Petazzoni
AppliedPATCH 1/1 gcc: disable fortran use of libquadmath
In reply to Matt WeberQuoted 22 lines · On Fri, 11 Sep 2020 07:41:31 -0500 Matt Weber…
The GCC package has a default conf option of disabling libquadmath and the toolchain dependencies selectively enabled it if i386 / x64.
Fixes:
https://gitlab.com/bootlin/toolchains-builder/-/jobs/729359622This patch fixes a build failure when (GCC + glibc) is being built for the IBM Power8 arch and has libgfortran enabled + libquadmath disabled. The libgfortran has a code condition for
__float128and includes the quadmath headers. The bug occurs because Power8 has emulated float128 support. The fix per GCC options is to also set --disable-libquadmath-support which disables the __float128/libquadmath support in gcc/fortran and in libgfortran [1].Another option to fix the build failure was to enable libquadmath for IBM Power8 (ISA 2.07), however this would be soft float based as the ISA 3.0+ (Power9) first supports native float128 [2][3].
[1] https://fortran.gcc.gnu.narkive.com/8uSfoKUS/patch-build-pr-46540-add-disable-libquadmath-disable-libquadmath-support
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66382#c7
[3] https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html
Quoted 5 lines
Cc Thomas Petazzoni <[email protected]>Signed-off-by Matthew Weber <[email protected]>--- package/gcc/gcc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 gcc: disable fortran use of libquadmath
In reply to Matt WeberQuoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Matt" == Matt Weber <[email protected]> writes:
The GCC package has a default conf option of disabling libquadmath and the toolchain dependencies selectively enabled it if i386 / x64.
Fixes:
https://gitlab.com/bootlin/toolchains-builder/-/jobs/729359622This patch fixes a build failure when (GCC + glibc) is being built for the IBM Power8 arch and has libgfortran enabled + libquadmath disabled. The libgfortran has a code condition for
__float128and includes the quadmath headers. The bug occurs because Power8 has emulated float128 support. The fix per GCC options is to also set --disable-libquadmath-support which disables the __float128/libquadmath support in gcc/fortran and in libgfortran [1].Another option to fix the build failure was to enable libquadmath for IBM Power8 (ISA 2.07), however this would be soft float based as the ISA 3.0+ (Power9) first supports native float128 [2][3].
Quoted 6 lines
[1] https://fortran.gcc.gnu.narkive.com/8uSfoKUS/patch-build-pr-46540-add-disable-libquadmath-disable-libquadmath-support
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66382#c7
[3] https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.htmlCc Thomas Petazzoni <[email protected]>Signed-off-by Matthew Weber <[email protected]>
Committed to 2020.02.x and 2020.08.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard