Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161028AbVLJUqn (ORCPT ); Sat, 10 Dec 2005 15:46:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161031AbVLJUqn (ORCPT ); Sat, 10 Dec 2005 15:46:43 -0500 Received: from mustang.oldcity.dca.net ([216.158.38.3]:42912 "HELO mustang.oldcity.dca.net") by vger.kernel.org with SMTP id S1161028AbVLJUqn (ORCPT ); Sat, 10 Dec 2005 15:46:43 -0500 Subject: Re: i386 -> x86_64 cross compile failure (binutils bug?) From: Lee Revell To: Xavier Bestel Cc: linux-kernel In-Reply-To: <1134246859.5192.1.camel@bip.parateam.prv> References: <1134154208.14363.8.camel@mindpipe> <1134168222.5270.1.camel@bip.parateam.prv> <1134178279.18432.55.camel@mindpipe> <1134246859.5192.1.camel@bip.parateam.prv> Content-Type: text/plain; charset=ISO-8859-1 Date: Sat, 10 Dec 2005 15:48:23 -0500 Message-Id: <1134247704.18432.119.camel@mindpipe> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1852 Lines: 44 On Sat, 2005-12-10 at 21:34 +0100, Xavier Bestel wrote: > Le vendredi 09 d?cembre 2005 ? 20:31 -0500, Lee Revell a ?crit : > > On Fri, 2005-12-09 at 23:43 +0100, Xavier Bestel wrote: > > > Le vendredi 09 d?cembre 2005 ? 13:50 -0500, Lee Revell a ?crit : > > > > I'm trying to build an x66-64 kernel on a 32 bit system (Ubuntu 5.10). > > > > I added -m64 to the CFLAGS as per the gcc docs. > > > > > > Under debian 32bits with 64bits kernel, I just add -m64 somewhere in the > > > main Makefile to rebuild my modules. Didn't try with a whole kernel > > > though. > > > > The bug seems to be that the kernel build system does not grok biarch > > toolchains - it really insists on a separate toolchain for i386 and > > x86_64 even though the situation can be handled with selective use of > > -m64. If I jsut add -m64 to everything then it fails when it gets to > > the ia32 stuff. > > Yes, you shouldn't compile host executables with -m64, obviously. > > --- /usr/src/linux-headers-2.6.14-2/Makefile.old 2005-12-10 21:32:17.000000000 +0100 > +++ /usr/src/linux-headers-2.6.14-2/Makefile 2005-11-17 14:26:02.000000000 +0100 > @@ -352,7 +352,7 @@ > > CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ > -fno-strict-aliasing -fno-common \ > - -ffreestanding > + -ffreestanding -m64 > AFLAGS := -D__ASSEMBLY__ > > export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION LOCALVERSION KERNELRELEASE \ > > > HTH, This would break native 32 bit kernel builds. Andi's patch seems to be the correct solution. Lee - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/