ERROR: already selected `xxxx' processor

Thomas Fleischmann TFleischmann@gmx.de
Wed Jul 5 16:00:00 GMT 2006


Hi all,

one month ago we built a m68k-elf - toolchain ourselfes (binutils 2.16.1 / gcc 4.1.1).

Whilst the gcc doesn't support our used cpu MCF5213 100%, we use the compilerswitch -m5200 to generate generic code for a MCF52xx.
We also need to use inline assembly for the MCF5213 stuff (movec ..., %rambar). So we have to apply a second compiler switch to be passed to gas -Wa,-m5213 (-Wa,-mcpu=5213 for binutils 2.17).

This is ok for binutils 2.16.1 but not for 2.17.

As the compiler passes two "cpu" selections to gas, one indirectly generated by gcc's -m5200 and one direktly passed by -Wa,-mcpu=5213, gas is "confused".
File gas/config/tc-m68k.c checks this and produces an error, because of two different selected cpu's.

My suggestion is:
If gas is invoked with -mcpu=xxx, this should override the former settings. Additional a warning will be produced.

My included patch would produce this behavior.
Please could you check if I done everything right and if it is worth to be applied to gas.

Thomas Fleischmann
-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-2.17-forcecpu.patch
Type: application/octet-stream
Size: 2769 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060705/0cd55675/attachment.obj>


More information about the Binutils mailing list