Re: Build issue "Error: operands mismatch -- statement `movec %d2,%caar' ignored" on m68k

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Geert,

On Mon, 30 Dec 2024 09:53:29 +0100
Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:

/usr/libexec/gcc/m68k-unknown-linux-musl/as -v -mcpu=68020 --pcrel -o a.o a.s  

Thanks, so it fails when -mcpu=68040 is passed to the assembler.

Oh, I misread "caar" as "cacr". The latter exists on MC68040, the
former does not. However, that doesn't explain the failures for pflusha,
which is supported on 68040.

After disabling CONFIG_680[236]0 in the kernel config, I can build
it fine using the buildroot toolchain.

Conclusion: make sure your toolchain supports (a superset of) the
CPUs supported by your kernel config.

Thanks for the investigation. How should the toolchain be configured to
s upport multiple m68k CPUs? My understanding was that when you
configure gcc with --with-cpu=<something>, it means gcc will by default
emit code for <something>, but it can always be overridden when running
gcc using -mcpu=<somethingelse>.

How can one build this kernel/sys_m68k.c file if it uses instructions
that are mutually incompatible on different m68k cores?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux