Просмотр исходного кода

m68k: FLAT means uClinux, so use the uclinux triplet

gcc decides which CPUs a m68k toolchain may target from the triplet: for
m68k-*-linux* config/m68k/t-linux keeps only cores with FL_MMU, which leaves
68020/68040/68060, while m68k-*-uclinux* uses t-uclinux and keeps the cores
without an MMU. Building a 68000 toolchain therefore stops in gcc before it
starts:

  t-mlibs:45: *** Error default cpu 'm68000' is not in multilib set
              'm68020 m68040 m68060'.  Stop.

The MCF5208 system entry has carried "select ADK_TARGET_UCLINUX if
ADK_TARGET_BINFMT_FLAT" for that reason, but a FLAT build picked through any
other m68k system - the generic one, for instance - kept the linux triplet.
On m68k a FLAT binary is a uClinux binary, so state it where the format is
chosen, next to the bfin and arm cases that say the same thing. The MCF5208
entry keeps its line; it now selects what is already selected.

Verified by building a 68000 toolchain (generic-m68k, noMMU, FLAT, static)
with gcc 15.3.0: the triplet comes out as m68k-openadk-uclinux-uclibc, a hello
world links as "BFLT executable - version 4 ram", and the binary contains no
instruction beyond the 68000.

Signed-off-by: Ramin Moussavi <ramin.moussavi@yacoub.de>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
ramin 1 неделя назад
Родитель
Сommit
09b40d30c0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      target/config/Config.in.binfmt

+ 1 - 1
target/config/Config.in.binfmt

@@ -14,7 +14,7 @@ config ADK_TARGET_BINFMT_ELF
 config ADK_TARGET_BINFMT_FLAT
 config ADK_TARGET_BINFMT_FLAT
 	bool "FLAT"
 	bool "FLAT"
 	select BUSYBOX_NOMMU
 	select BUSYBOX_NOMMU
-	select ADK_TARGET_UCLINUX if ADK_TARGET_ARCH_BFIN || ADK_TARGET_ARCH_ARM
+	select ADK_TARGET_UCLINUX if ADK_TARGET_ARCH_BFIN || ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_M68K
 	depends on ADK_TARGET_LIB_UCLIBC_NG
 	depends on ADK_TARGET_LIB_UCLIBC_NG
 	depends on !ADK_TARGET_WITH_MMU
 	depends on !ADK_TARGET_WITH_MMU
 	depends on ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_M68K || ADK_TARGET_ARCH_SH || ADK_TARGET_ARCH_XTENSA \
 	depends on ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_M68K || ADK_TARGET_ARCH_SH || ADK_TARGET_ARCH_XTENSA \