Skip to contentSkip to conversation

package/gcc: disallow Fortran on gcc 12/13 on Microblaze

PATCH Applied Thomas Petazzoni via buildroot 2 participants 3 messages Jul 13, 2024 – Aug 11, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gcc: disallow Fortran on gcc 12/13 on Microblaze

The build of gcc with Fortran support is broken on gcc 12.x and gcc 13.x, it fails with:

../../../libgfortran/generated/bessel_r8.c: In function 'bessel_yn_r8':
../../../libgfortran/generated/bessel_r8.c:178:1: internal compiler error: in gen_reg_rtx, at emit-rtl.cc:1167

This issue has been fixed in gcc 14.x, which builds a Microblaze Fortran-capable toolchain successfully.

Since we're not really interested in figuring out the commit that fixed the problem, let's simply disallow the selection of Fortran with gcc12/13 on Microblaze.

Fixes:

http://autobuild.buildroot.net/results/5b4eee1d9b119c9f923f9518618f45a6482ddc85/

---
 package/gcc/Config.in.host | 4 ++++
 1 file changed, 4 insertions(+)
package/gcc/Config.in.host +4 -0
index 969702b707..013527c34e 100644
@@ -103,6 +103,10 @@ config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
 	# on architecture building libquadmath, wchar is required
 	depends on !BR2_TOOLCHAIN_HAS_LIBQUADMATH || \
 		(BR2_TOOLCHAIN_HAS_LIBQUADMATH && BR2_USE_WCHAR)
+	# internal compiler error: in gen_reg_rtx, at emit-rtl.cc:1167
+	# fixed in gcc 14.x, so disable gcc 12.x/13.x
+	depends on !(BR2_microblaze && \
+		(BR2_GCC_VERSION_12_X || BR2_GCC_VERSION_13_X))
 	select BR2_TOOLCHAIN_HAS_FORTRAN
 	help
 	  Enable this option if you want your toolchain to support the
Signature · 6 lines
2.45.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Thomas,

Le 13/07/2024 à 14:09, Thomas Petazzoni via buildroot a écrit :

Quoted 13 lines

The build of gcc with Fortran support is broken on gcc 12.x and gcc 13.x, it fails with:

../../../libgfortran/generated/bessel_r8.c: In function 'bessel_yn_r8':
../../../libgfortran/generated/bessel_r8.c:178:1: internal compiler error: in gen_reg_rtx, at emit-rtl.cc:1167

This issue has been fixed in gcc 14.x, which builds a Microblaze Fortran-capable toolchain successfully.

Since we're not really interested in figuring out the commit that fixed the problem, let's simply disallow the selection of Fortran with gcc12/13 on Microblaze.

Quoted 5 lines

Fixes:

http://autobuild.buildroot.net/results/5b4eee1d9b119c9f923f9518618f45a6482ddc85/

Applied to master, thanks.

Best regards,
Romain

Quoted 9 lines
---
 package/gcc/Config.in.host | 4 ++++
 1 file changed, 4 insertions(+)
package/gcc/Config.in.host +0 -0
index 969702b707..013527c34e 100644

package/gcc/Config.in.host config BR2_TOOLCHAIN_BUILDROOT_FORTRAN · line 112

Quoted 10 lines
package/gcc/Config.in.host +4 -0
@@ -103,6 +103,10 @@ config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
 	# on architecture building libquadmath, wchar is required
 	depends on !BR2_TOOLCHAIN_HAS_LIBQUADMATH || \
 		(BR2_TOOLCHAIN_HAS_LIBQUADMATH && BR2_USE_WCHAR)
+	# internal compiler error: in gen_reg_rtx, at emit-rtl.cc:1167
+	# fixed in gcc 14.x, so disable gcc 12.x/13.x
+	depends on !(BR2_microblaze && \
+		(BR2_GCC_VERSION_12_X || BR2_GCC_VERSION_13_X))
 	select BR2_TOOLCHAIN_HAS_FORTRAN
 	help
 	  Enable this option if you want your toolchain to support the

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni via buildroot <[email protected]> writes:

The build of gcc with Fortran support is broken on gcc 12.x and gcc 13.x, it fails with:

../../../libgfortran/generated/bessel_r8.c: In function 'bessel_yn_r8':
../../../libgfortran/generated/bessel_r8.c:178:1: internal compiler error: in gen_reg_rtx, at emit-rtl.cc:1167

This issue has been fixed in gcc 14.x, which builds a Microblaze Fortran-capable toolchain successfully.

Since we're not really interested in figuring out the commit that fixed the problem, let's simply disallow the selection of Fortran with gcc12/13 on Microblaze.

Quoted 5 lines

Fixes:

http://autobuild.buildroot.net/results/5b4eee1d9b119c9f923f9518618f45a6482ddc85/

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot