From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13236 invoked by alias); 5 Jul 2006 17:10:19 -0000 Received: (qmail 13222 invoked by uid 22791); 5 Jul 2006 17:10:17 -0000 X-Spam-Check-By: sourceware.org Received: from mail.gmx.de (HELO mail.gmx.net) (213.165.64.21) by sourceware.org (qpsmtpd/0.31) with SMTP; Wed, 05 Jul 2006 17:10:14 +0000 Received: (qmail 8539 invoked by uid 0); 5 Jul 2006 17:10:12 -0000 Received: from 141.76.1.121 by www005.gmx.net with HTTP; Wed, 05 Jul 2006 19:10:12 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-1" Date: Wed, 05 Jul 2006 17:10:00 -0000 From: "Thomas Fleischmann" In-Reply-To: <030a01c6a051$2bc87370$a501a8c0@CAM.ARTIMI.COM> Message-ID: <20060705171012.109040@gmx.net> MIME-Version: 1.0 References: <030a01c6a051$2bc87370$a501a8c0@CAM.ARTIMI.COM> Subject: RE: ERROR: already selected `xxxx' processor To: Dave Korn , binutils@sourceware.org X-Authenticated: #2600927 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) Content-Transfer-Encoding: 8bit Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00049.txt.bz2 > 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