* [Buildroot] [PATCH 01/11] arch/Config.in.m68k: add ColdFire MCF5441x support
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 02/11] package/gcc: force --with-arch=cf on m68k MCF5441x Jean-Michel Hautbois
` (9 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
Add the MCF5441x (54418) ColdFire V4e variant to the m68k architecture
menu. The 5441x selects BR2_m68k_cf, BR2_USE_MMU (V4e has an MMU, unlike
the 5208) and BR2_SOFT_FLOAT (no hardware FPU). The GCC target CPU is
set to 54418.
qemu-system-m68k does not emulate the 5441x family, so no qemu
defconfig is added; the existing qemu_m68k_mcf5208_defconfig and
qemu_m68k_q800_defconfig are not affected.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
arch/Config.in.m68k | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/Config.in.m68k b/arch/Config.in.m68k
index 235cafacf5..b281f43a30 100644
--- a/arch/Config.in.m68k
+++ b/arch/Config.in.m68k
@@ -38,12 +38,19 @@ config BR2_m68k_cf5208
select BR2_m68k_cf
select BR2_SOFT_FLOAT
+config BR2_m68k_cf5441x
+ bool "5441x"
+ select BR2_m68k_cf
+ select BR2_USE_MMU
+ select BR2_SOFT_FLOAT
+
endchoice
config BR2_GCC_TARGET_CPU
default "68030" if BR2_m68k_68030
default "68040" if BR2_m68k_68040
default "5208" if BR2_m68k_cf5208
+ default "54418" if BR2_m68k_cf5441x
config BR2_READELF_ARCH_NAME
default "MC68000"
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 02/11] package/gcc: force --with-arch=cf on m68k MCF5441x
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 01/11] arch/Config.in.m68k: add ColdFire MCF5441x support Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 03/11] package/Makefile.in: add global ColdFire workaround flags Jean-Michel Hautbois
` (8 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
On m68k ColdFire V4e (MCF5441x) with BR2_USE_MMU selected, the
host-gcc build fails during the multilib pass because the compiler
cannot disambiguate between m68k and cf variants. It needs to be
configured explicitly with --with-arch=cf.
The natural place to wire this would be BR2_GCC_TARGET_ARCH="cf" in
arch/Config.in.m68k (as was attempted in an earlier v1 submission
[1], see the v1 review at [2]). That mechanism is however also
consumed by the external toolchain infrastructure: when
BR2_GCC_TARGET_ARCH is non-empty,
toolchain/toolchain-external/pkg-toolchain-external.mk unconditionally
adds -march=$(GCC_TARGET_ARCH) to TOOLCHAIN_EXTERNAL_CFLAGS and bakes
it into the toolchain wrapper as the default BR_ARCH.
This is fine as long as the value is a valid -march= argument, but
gcc m68k only accepts 68000/68010/68020/68030/68040/68060/cpu32/isaa
/isaaplus/isab/isac on the command line; "cf" is a valid --with-arch
value for configure, but not a valid -march. The result is that an
external toolchain user selecting BR2_m68k_cf5441x gets the wrapper
injecting -march=cf on every compile, which immediately fails with
"unrecognized argument in option '-march=cf'". This was confirmed by
consuming a Buildroot-generated cf5441x toolchain as external.
Instead, add the --with-arch=cf configure argument via Buildroot's
gcc packaging Makefile (package/gcc/gcc.mk), gated on
BR2_m68k_cf5441x. Only the internal host-gcc configure step picks
it up; BR2_GCC_TARGET_ARCH remains unset, so the external toolchain
infrastructure is untouched and external toolchain users are not
affected by this patch.
[1] https://lore.kernel.org/buildroot/20230629053130.3976-1-jeanmichel.hautbois@yoseli.org/
[2] https://lore.kernel.org/buildroot/20230704052449.GM2510@scaer/
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/gcc/gcc.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index ea96286c32..270a0638d9 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -220,6 +220,10 @@ endif
ifneq ($(GCC_TARGET_ARCH),)
HOST_GCC_COMMON_CONF_OPTS += --with-arch="$(GCC_TARGET_ARCH)"
endif
+
+ifeq ($(BR2_m68k_cf5441x),y)
+HOST_GCC_COMMON_CONF_OPTS += --with-arch=cf
+endif
ifneq ($(GCC_TARGET_ABI),)
HOST_GCC_COMMON_CONF_OPTS += --with-abi="$(GCC_TARGET_ABI)"
endif
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 03/11] package/Makefile.in: add global ColdFire workaround flags
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 01/11] arch/Config.in.m68k: add ColdFire MCF5441x support Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 02/11] package/gcc: force --with-arch=cf on m68k MCF5441x Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 04/11] package/gmp: disable C++ bindings on m68k ColdFire Jean-Michel Hautbois
` (7 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
GCC's instruction scheduler on m68k ColdFire reorders memory accesses
in ways that break code assuming sequential memory ordering. This was
observed in uClibc-ng's elf_machine_relative and in OpenSSL's internal
state management after fork().
Additionally, ColdFire uses 16-bit offsets for switch statement jump
tables by default. Large functions such as pcre2_match() and nftables
rule evaluation overflow this limit, causing assembler errors.
Add -fno-schedule-insns, -fno-schedule-insns2, and
-mlong-jump-table-offsets globally for BR2_m68k_cf, alongside the
existing -fno-dwarf2-cfi-asm workaround.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/Makefile.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/Makefile.in b/package/Makefile.in
index 5ebb5f9ba8..42dd79118d 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -211,6 +211,10 @@ TARGET_FCFLAGS = $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
ifeq ($(BR2_m68k_cf),y)
TARGET_CFLAGS += -fno-dwarf2-cfi-asm
TARGET_CXXFLAGS += -fno-dwarf2-cfi-asm
+TARGET_CFLAGS += -fno-schedule-insns -fno-schedule-insns2
+TARGET_CXXFLAGS += -fno-schedule-insns -fno-schedule-insns2
+TARGET_CFLAGS += -mlong-jump-table-offsets
+TARGET_CXXFLAGS += -mlong-jump-table-offsets
endif
ifeq ($(BR2_BINFMT_FLAT),y)
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 04/11] package/gmp: disable C++ bindings on m68k ColdFire
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
` (2 preceding siblings ...)
2026-04-24 13:23 ` [Buildroot] [PATCH 03/11] package/Makefile.in: add global ColdFire workaround flags Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 05/11] package/gdb: use static libgcc " Jean-Michel Hautbois
` (6 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
On m68k ColdFire, libgcc.a exports __sync_* atomic built-in functions
as hidden symbols. When GMP's C++ bindings are enabled, libgmpxx.so
links against libstdc++ which references these hidden symbols, causing
a linker error:
hidden symbol '__sync_val_compare_and_swap_4' in libgcc.a is
referenced by DSO
Disable C++ bindings on m68k ColdFire. The C library (libgmp.so) is
unaffected.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/gmp/gmp.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk
index 07aa4aefdf..8dd60fd2a0 100644
--- a/package/gmp/gmp.mk
+++ b/package/gmp/gmp.mk
@@ -31,7 +31,9 @@ ifeq ($(BR2_riscv):$(BR2_RISCV_ISA_RVM),y:)
GMP_CONF_OPTS += --disable-assembly
endif
-ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+ifeq ($(BR2_m68k_cf),y)
+GMP_CONF_OPTS += --disable-cxx
+else ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
GMP_CONF_OPTS += --enable-cxx
else
GMP_CONF_OPTS += --disable-cxx
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 05/11] package/gdb: use static libgcc on m68k ColdFire
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
` (3 preceding siblings ...)
2026-04-24 13:23 ` [Buildroot] [PATCH 04/11] package/gmp: disable C++ bindings on m68k ColdFire Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 06/11] package/libopenssl: extend m68k ColdFire support Jean-Michel Hautbois
` (5 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
On m68k ColdFire, libgcc.a exports __sync_* atomic built-in functions
as hidden symbols. GDB links against libstdc++ which references these
symbols, causing linker errors when building as a dynamically linked
executable.
Use -static-libstdc++ and -static-libgcc to avoid the hidden symbol
issue.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/gdb/gdb.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
index 1841002dc1..c6dfcf3bef 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -116,6 +116,11 @@ GDB_MAKE_ENV += \
GDB_CONF_ENV += gdb_cv_prfpregset_t_broken=no
GDB_MAKE_ENV += gdb_cv_prfpregset_t_broken=no
+ifeq ($(BR2_m68k_cf),y)
+GDB_CONF_ENV += LDFLAGS="-static-libstdc++ -static-libgcc"
+GDB_MAKE_ENV += LDFLAGS="-static-libstdc++ -static-libgcc"
+endif
+
# We want the built-in libraries of gdb (libbfd, libopcodes) to be
# built and linked statically, as we do not install them on the
# target, to not clash with the ones potentially installed by
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 06/11] package/libopenssl: extend m68k ColdFire support
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
` (4 preceding siblings ...)
2026-04-24 13:23 ` [Buildroot] [PATCH 05/11] package/gdb: use static libgcc " Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 07/11] package/dropbear: disable ML-KEM768 on m68k Jean-Michel Hautbois
` (4 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
ColdFire has no hardware atomic instructions. Disable OpenSSL's
atomic operations and inline assembly which assume a different m68k
variant, and add -fno-strict-aliasing to prevent GCC from optimizing
away type-punned pointer accesses used in OpenSSL internals.
Link with libatomic for the 64-bit atomic operations that OpenSSL 3.x
requires, and force the linux-generic32 target to avoid arch-specific
assembly paths.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/libopenssl/libopenssl.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/libopenssl/libopenssl.mk b/package/libopenssl/libopenssl.mk
index bd4b889c88..6009cbb345 100644
--- a/package/libopenssl/libopenssl.mk
+++ b/package/libopenssl/libopenssl.mk
@@ -23,6 +23,9 @@ ifeq ($(BR2_m68k_cf),y)
LIBOPENSSL_CFLAGS += -mxgot
# resolves an assembler "out of range error" with blake2 and sha512 algorithms
LIBOPENSSL_CFLAGS += -DOPENSSL_SMALL_FOOTPRINT
+LIBOPENSSL_CFLAGS += -DOPENSSL_NO_ATOMICS -DOPENSSL_NO_ASM -fno-strict-aliasing
+LIBOPENSSL_CONF_ENV += LDFLAGS="-latomic"
+LIBOPENSSL_TARGET_ARCH = linux-generic32
endif
ifeq ($(BR2_USE_MMU),)
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 07/11] package/dropbear: disable ML-KEM768 on m68k
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
` (5 preceding siblings ...)
2026-04-24 13:23 ` [Buildroot] [PATCH 06/11] package/libopenssl: extend m68k ColdFire support Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 14:11 ` Baruch Siach via buildroot
2026-04-24 13:23 ` [Buildroot] [PATCH 08/11] package/ntp: Link libatomic when available Jean-Michel Hautbois
` (3 subsequent siblings)
10 siblings, 1 reply; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
ML-KEM768 post-quantum key exchange code (in the vendored header
src/libcrux_mlkem768_sha3.h) triggers a GCC internal compiler error
(ICE) in cselib_record_set during the postreload CSE pass on m68k.
Reproduced on m68k-buildroot-linux-uclibc (cf5441x, -O2) with both
GCC 14.3.0 (the current Buildroot default for m68k) and GCC 15.2.0.
The failing pass backtrace is:
reload_cse_regs_1
-> pass_postreload_cse::execute
-> cselib_process_insn
-> cselib_record_sets
-> cselib_record_set (cselib.cc:2869 on gcc 15)
Disable ML-KEM768 via localoptions.h on m68k until the GCC bug is
resolved. Standard key exchange algorithms remain available.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/dropbear/dropbear.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
index e4e42cf994..52bc15e346 100644
--- a/package/dropbear/dropbear.mk
+++ b/package/dropbear/dropbear.mk
@@ -62,6 +62,13 @@ endef
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_SVR_PASSWORD_AUTH
endif
+ifeq ($(BR2_m68k),y)
+define DROPBEAR_DISABLE_MLKEM
+ echo '#define DROPBEAR_MLKEM768 0' >> $(@D)/localoptions.h
+endef
+DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_MLKEM
+endif
+
ifeq ($(BR2_PACKAGE_DROPBEAR_LEGACY_CRYPTO),y)
define DROPBEAR_ENABLE_LEGACY_CRYPTO
echo '#define DROPBEAR_3DES 1' >> $(@D)/localoptions.h
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [Buildroot] [PATCH 07/11] package/dropbear: disable ML-KEM768 on m68k
2026-04-24 13:23 ` [Buildroot] [PATCH 07/11] package/dropbear: disable ML-KEM768 on m68k Jean-Michel Hautbois
@ 2026-04-24 14:11 ` Baruch Siach via buildroot
2026-04-29 5:53 ` Jean-Michel Hautbois
0 siblings, 1 reply; 14+ messages in thread
From: Baruch Siach via buildroot @ 2026-04-24 14:11 UTC (permalink / raw)
To: Jean-Michel Hautbois
Cc: buildroot, Bernd Kuhls, Fabrice Fontaine, Giulio Benetti,
Ismael Luceno, Romain Naour, Thomas Petazzoni
Hi Jean-Michel,
On Fri, Apr 24 2026, Jean-Michel Hautbois wrote:
> ML-KEM768 post-quantum key exchange code (in the vendored header
> src/libcrux_mlkem768_sha3.h) triggers a GCC internal compiler error
> (ICE) in cselib_record_set during the postreload CSE pass on m68k.
> Reproduced on m68k-buildroot-linux-uclibc (cf5441x, -O2) with both
> GCC 14.3.0 (the current Buildroot default for m68k) and GCC 15.2.0.
>
> The failing pass backtrace is:
> reload_cse_regs_1
> -> pass_postreload_cse::execute
> -> cselib_process_insn
> -> cselib_record_sets
> -> cselib_record_set (cselib.cc:2869 on gcc 15)
>
> Disable ML-KEM768 via localoptions.h on m68k until the GCC bug is
> resolved. Standard key exchange algorithms remain available.
Common practice for GCC bugs is to add a BR2_TOOLCHAIN_HAS_GCC_BUG_[id]
config symbol to toolchain/Config.in, and use that symbol to activate
bug specific workaround. [id] refers to GCC Bugzilla bug ID. This makes
it easier to track the GCC versions this bug affects.
baruch
>
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
> ---
> package/dropbear/dropbear.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
> index e4e42cf994..52bc15e346 100644
> --- a/package/dropbear/dropbear.mk
> +++ b/package/dropbear/dropbear.mk
> @@ -62,6 +62,13 @@ endef
> DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_SVR_PASSWORD_AUTH
> endif
>
> +ifeq ($(BR2_m68k),y)
> +define DROPBEAR_DISABLE_MLKEM
> + echo '#define DROPBEAR_MLKEM768 0' >> $(@D)/localoptions.h
> +endef
> +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_MLKEM
> +endif
> +
> ifeq ($(BR2_PACKAGE_DROPBEAR_LEGACY_CRYPTO),y)
> define DROPBEAR_ENABLE_LEGACY_CRYPTO
> echo '#define DROPBEAR_3DES 1' >> $(@D)/localoptions.h
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [Buildroot] [PATCH 07/11] package/dropbear: disable ML-KEM768 on m68k
2026-04-24 14:11 ` Baruch Siach via buildroot
@ 2026-04-29 5:53 ` Jean-Michel Hautbois
0 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-29 5:53 UTC (permalink / raw)
To: Baruch Siach
Cc: buildroot, Bernd Kuhls, Fabrice Fontaine, Giulio Benetti,
Ismael Luceno, Romain Naour, Thomas Petazzoni
Hi Baruch,
Le 24/04/2026 à 16:11, Baruch Siach a écrit :
> Hi Jean-Michel,
>
> On Fri, Apr 24 2026, Jean-Michel Hautbois wrote:
>> ML-KEM768 post-quantum key exchange code (in the vendored header
>> src/libcrux_mlkem768_sha3.h) triggers a GCC internal compiler error
>> (ICE) in cselib_record_set during the postreload CSE pass on m68k.
>> Reproduced on m68k-buildroot-linux-uclibc (cf5441x, -O2) with both
>> GCC 14.3.0 (the current Buildroot default for m68k) and GCC 15.2.0.
>>
>> The failing pass backtrace is:
>> reload_cse_regs_1
>> -> pass_postreload_cse::execute
>> -> cselib_process_insn
>> -> cselib_record_sets
>> -> cselib_record_set (cselib.cc:2869 on gcc 15)
>>
>> Disable ML-KEM768 via localoptions.h on m68k until the GCC bug is
>> resolved. Standard key exchange algorithms remain available.
>
> Common practice for GCC bugs is to add a BR2_TOOLCHAIN_HAS_GCC_BUG_[id]
> config symbol to toolchain/Config.in, and use that symbol to activate
> bug specific workaround. [id] refers to GCC Bugzilla bug ID. This makes
> it easier to track the GCC versions this bug affects.
Thanks for the pointer !
I just filed a bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125078
I will prepare a v2 for this patch with a BR2_TOOLCHAIN_HAS_GCC_BUG_125078
I will wait a bit before a v2 as maybe other patches will have
remarks/issues.
Thanks !
JM
> baruch
>
>>
>> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
>> ---
>> package/dropbear/dropbear.mk | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
>> index e4e42cf994..52bc15e346 100644
>> --- a/package/dropbear/dropbear.mk
>> +++ b/package/dropbear/dropbear.mk
>> @@ -62,6 +62,13 @@ endef
>> DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_SVR_PASSWORD_AUTH
>> endif
>>
>> +ifeq ($(BR2_m68k),y)
>> +define DROPBEAR_DISABLE_MLKEM
>> + echo '#define DROPBEAR_MLKEM768 0' >> $(@D)/localoptions.h
>> +endef
>> +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_MLKEM
>> +endif
>> +
>> ifeq ($(BR2_PACKAGE_DROPBEAR_LEGACY_CRYPTO),y)
>> define DROPBEAR_ENABLE_LEGACY_CRYPTO
>> echo '#define DROPBEAR_3DES 1' >> $(@D)/localoptions.h
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 08/11] package/ntp: Link libatomic when available
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
` (6 preceding siblings ...)
2026-04-24 13:23 ` [Buildroot] [PATCH 07/11] package/dropbear: disable ML-KEM768 on m68k Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 09/11] package/nginx: add m68k ColdFire TLS support Jean-Michel Hautbois
` (2 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
NTP uses 64-bit atomic operations that GCC emits as calls to
__atomic_* runtime helpers on 32-bit targets without native 64-bit
atomic instructions (e.g. m68k). Without explicit linking, the link
step fails with undefined references.
Gate on BR2_TOOLCHAIN_HAS_LIBATOMIC (same pattern as dhcp, tor,
libcurl). Keeps uClibc/uClinux toolchains happy: they do not ship
libatomic but provide the helpers in the C library.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/ntp/ntp.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk
index f481c5d79b..eb9bfff85c 100644
--- a/package/ntp/ntp.mk
+++ b/package/ntp/ntp.mk
@@ -17,6 +17,11 @@ NTP_CPE_ID_VERSION = $(NTP_VERSION_MAJOR).$(NTP_VERSION_MINOR)
NTP_CPE_ID_UPDATE = p$(NTP_VERSION_POINT)
NTP_SELINUX_MODULES = ntp
NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no POSIX_SHELL=/bin/sh
+
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+NTP_CONF_ENV += LIBS="-latomic"
+endif
+
NTP_CONF_OPTS = \
--with-shared \
--program-transform-name=s,,, \
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 09/11] package/nginx: add m68k ColdFire TLS support
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
` (7 preceding siblings ...)
2026-04-24 13:23 ` [Buildroot] [PATCH 08/11] package/ntp: Link libatomic when available Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 10/11] package/mawk: create awk symlink on install Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 11/11] package/libglib2: add m68k ColdFire support Jean-Michel Hautbois
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
On m68k ColdFire, nginx with OpenSSL requires reduced optimization
(-O1) and -fno-strict-aliasing to avoid aliasing violations in the
OpenSSL/nginx interaction that cause segfaults in HTTPS handling.
Also enforce strict alignment (-mstrict-align) and explicitly link
against the system crypto libraries including libatomic.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/nginx/nginx.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/nginx/nginx.mk b/package/nginx/nginx.mk
index 41490caee2..35d53c3ec1 100644
--- a/package/nginx/nginx.mk
+++ b/package/nginx/nginx.mk
@@ -87,6 +87,12 @@ else
NGINX_CONF_OPTS += --without-pcre
endif
+ifeq ($(BR2_m68k_cf),y)
+NGINX_CFLAGS += -O1 -fno-strict-aliasing -mstrict-align
+NGINX_CONF_ENV += LIBS="-lssl -lcrypto -lz -ldl -lpcre"
+NGINX_CONF_OPTS += --with-ld-opt="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto -lpcre2-8 -latomic -lz -ldl -lpthread"
+endif
+
# modules disabled or not activated because of missing dependencies:
# - google_perftools (googleperftools)
# - http_perl_module (host-perl)
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 10/11] package/mawk: create awk symlink on install
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
` (8 preceding siblings ...)
2026-04-24 13:23 ` [Buildroot] [PATCH 09/11] package/nginx: add m68k ColdFire TLS support Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
2026-04-24 13:23 ` [Buildroot] [PATCH 11/11] package/libglib2: add m68k ColdFire support Jean-Michel Hautbois
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
Many scripts and Makefiles expect 'awk' to be available in PATH.
When mawk is the only awk implementation installed, create a symlink
from awk to mawk so that these scripts work without modification.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/mawk/mawk.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/mawk/mawk.mk b/package/mawk/mawk.mk
index f9f0623904..b21ac16742 100644
--- a/package/mawk/mawk.mk
+++ b/package/mawk/mawk.mk
@@ -10,4 +10,10 @@ MAWK_SOURCE = mawk-$(MAWK_VERSION).tgz
MAWK_LICENSE = GPL-2.0
MAWK_LICENSE_FILES = COPYING
+define MAWK_CREATE_SYMLINK
+ ln -sf mawk $(TARGET_DIR)/usr/bin/awk
+endef
+
+MAWK_POST_INSTALL_TARGET_HOOKS += MAWK_CREATE_SYMLINK
+
$(eval $(autotools-package))
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread* [Buildroot] [PATCH 11/11] package/libglib2: add m68k ColdFire support
2026-04-24 13:23 [Buildroot] [PATCH 00/11] Add ColdFire MCF5441x (m68k) support Jean-Michel Hautbois
` (9 preceding siblings ...)
2026-04-24 13:23 ` [Buildroot] [PATCH 10/11] package/mawk: create awk symlink on install Jean-Michel Hautbois
@ 2026-04-24 13:23 ` Jean-Michel Hautbois
10 siblings, 0 replies; 14+ messages in thread
From: Jean-Michel Hautbois @ 2026-04-24 13:23 UTC (permalink / raw)
To: buildroot
Cc: Bernd Kuhls, Jean-Michel Hautbois, Fabrice Fontaine,
Thomas Petazzoni, Giulio Benetti, Ismael Luceno, Romain Naour
On m68k ColdFire, libgio exceeds the default 16-bit GOT entry limit
(8192 entries). Add -mxgot to use 32-bit GOT offsets.
Also enable b_staticpic=true to allow linking static internal
libraries (girepository-internals) into shared libraries
(libgirepository), which requires position-independent code.
Disable sysprof profiling support which is not useful on embedded
targets and adds unnecessary build complexity.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
package/libglib2/libglib2.mk | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index cae8a85a28..8f8360e635 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -55,12 +55,17 @@ endif
# containing ${libdir} in gio-2.0.pc. Indeed, a value depending on
# ${libdir} would be prefixed by the sysroot by pkg-config, causing a
# bogus installation path once combined with $(DESTDIR).
+ifeq ($(BR2_m68k_cf),y)
+LIBGLIB2_CFLAGS += -mxgot
+endif
+
LIBGLIB2_CONF_OPTS = \
-Dglib_debug=disabled \
-Dlibelf=disabled \
-Dgio_module_dir=/usr/lib/gio/modules \
-Dtests=false \
- -Doss_fuzz=disabled
+ -Doss_fuzz=disabled \
+ -Dsysprof=disabled
LIBGLIB2_MESON_EXTRA_PROPERTIES = \
have_c99_vsnprintf=true \
@@ -118,6 +123,10 @@ else
LIBGLIB2_CONF_OPTS += -Dlibmount=disabled
endif
+ifeq ($(BR2_m68k_cf),y)
+LIBGLIB2_CONF_OPTS += -Db_staticpic=true
+endif
+
# Purge useless binaries from target
define LIBGLIB2_REMOVE_DEV_FILES
rm -rf $(TARGET_DIR)/usr/lib/glib-2.0
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 14+ messages in thread