This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: ERROR: already selected `xxxx' processor
- From: "Thomas Fleischmann" <TFleischmann at gmx dot de>
- To: Dave Korn <dave dot korn at artimi dot com>, binutils at sourceware dot org
- Date: Wed, 05 Jul 2006 19:10:12 +0200
- Subject: RE: ERROR: already selected `xxxx' processor
- References: <030a01c6a051$2bc87370$a501a8c0@CAM.ARTIMI.COM>
> On 05 July 2006 17:00, Thomas Fleischmann wrote:
>
> > 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.
>
>
> You mean, let's patch gas to accept invalid command lines rather than
> you
> fix your invalid kludgey hacked-up build environment? I suggest let's
> not! I
> appreciate that you have a valid motive here owing to the disjunction
> between
> what cpus gcc understands and what cpus gas understands, but this surely
> isn't
> the way to resolve it. The fact that it used to be accepted in 2.16.1 and
> now
> there's a check for it and it is specifically disallowed suggests that
> there
> may be some kind of problem. Did you check the archives to see why this
> test
> was added?
>
> The correct fix for this situation would be to add a -m5213 option to
> gcc,
> not to try and persuade gas to accept two or more --cpu options at the
> same
> time. It could be as simple as using the driver specs so that -m5213 gets
> turned into -m5200 when it's passed to cc1 in the CC1_SPEC and gets turned
> into -mcpu=5213 when it's passed to gas in the ASM_SPEC. Wouldn't that do
> everything you need, and be a somewhat cleaner solution as well?
Ok, you're right :-)
As I had to find a quick solution, I forgot the gcc spec file ;-(
Your suggestion is what I was searching for.
thanks
Thomas Fleischmann
--
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl