Skip to contentSkip to conversation

package/gcc: fortran support now requires MMU

PATCH In review Thomas Petazzoni via buildroot 1 participant 2 messages Aug 13 – Aug 15

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gcc: fortran support now requires MMU

Since upstream commit c66d1ba685b0d03b28967d2f7a48f6c64687efa2 ("Fortran: Add a shared memory multi process coarray implementation [PR88076]"), libgfortran now unconditionally uses fork(), which makes it impossible to build Fortran support on noMMU architectures.

In follow-up commit efb497c23a6f4109bf8794342617cbc161c08301, it was made even more clear: if you don't have fork() and you're not on WIN32:

+#else
+#error "no way known to start child processes."
+#endif

There are apparently no autobuilder failures for this issue, but the simple defconfig below allows to trigger the build failure:

BR2_arm=y
BR2_cortex_m7=y
BR2_GCC_VERSION_16_X=y
BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y

Even though this issue is only starting from GCC 16.x, we make Fortran unavailable on noMMU configurations regardless of the GCC version, with the reasoning that:

1. Fortran on noMMU is unlikely to be in use

2. Moving forward, all future versions of GCC will have this restriction

---
 package/gcc/Config.in.host | 2 ++
 1 file changed, 2 insertions(+)
package/gcc/Config.in.host +2 -0
index d8b89d942c..bc3223eb59 100644
@@ -98,6 +98,8 @@ 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)
+	# requires fork() since gcc 16.x
+	depends on BR2_USE_MMU
 	select BR2_TOOLCHAIN_HAS_FORTRAN
 	help
 	  Enable this option if you want your toolchain to support the
Signature · 6 lines
2.55.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 26 lines · Thomas Petazzoni via buildroot

Since upstream commit c66d1ba685b0d03b28967d2f7a48f6c64687efa2 ("Fortran: Add a shared memory multi process coarray implementation [PR88076]"), libgfortran now unconditionally uses fork(), which makes it impossible to build Fortran support on noMMU architectures.

In follow-up commit efb497c23a6f4109bf8794342617cbc161c08301, it was made even more clear: if you don't have fork() and you're not on WIN32:

(quoted diff) +3 -0
+#else
+#error "no way known to start child processes."
+#endif

There are apparently no autobuilder failures for this issue, but the simple defconfig below allows to trigger the build failure:

BR2_arm=y
BR2_cortex_m7=y
BR2_GCC_VERSION_16_X=y
BR2_TOOLCHAIN_BUILDROOT_FORTRAN=y

Even though this issue is only starting from GCC 16.x, we make Fortran unavailable on noMMU configurations regardless of the GCC version, with the reasoning that:

Quoted 7 lines

1. Fortran on noMMU is unlikely to be in use

2. Moving forward, all future versions of GCC will have this restriction

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot