From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14889 invoked by alias); 1 Mar 2007 17:13:28 -0000 Received: (qmail 14877 invoked by uid 22791); 1 Mar 2007 17:13:25 -0000 X-Spam-Check-By: sourceware.org Received: from anubis.medic.chalmers.se (HELO anubis.medic.chalmers.se) (129.16.30.218) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 01 Mar 2007 17:13:08 +0000 Received: from [129.16.97.227] (fkpc167.phc.chalmers.se [129.16.97.227]) (Authenticated sender: terry) by anubis.medic.chalmers.se (Postfix) with ESMTP id E4DFA4570 for ; Thu, 1 Mar 2007 18:13:04 +0100 (CET) Subject: Re: Compiling gcc-4.2 on 64 bit Ubuntu From: Terry Frankcombe To: gcc-help@gcc.gnu.org In-Reply-To: <1172602042.5222.21.camel@fkpc167> References: <1172602042.5222.21.camel@fkpc167> Content-Type: text/plain Date: Thu, 01 Mar 2007 17:13:00 -0000 Message-Id: <1172769184.5165.2.camel@fkpc167> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg00012.txt.bz2 [Posted for completeness] After no useful help here or through the Ubuntu forums, I worked it out. Solution was simple: set CFLAGS to -m64 before configure. Strange, as the previously installed gcc produced 64 bit execs by default. On Tue, 2007-02-27 at 19:47 +0100, Terry Frankcombe wrote: > Hi folks > > I've run into trouble trying to compile gcc 4.2 (gcc-4.2-20070221) on an > amd64 machine running 64 bit Ubuntu. I configure with: > > ./configure --disable-multilibs --enable-languages=fortran > > then doing a make gets as far as compiling ../.././gcc/crtstuff.c in > gcc-4.2-20070221/host-x86_64-unknown-linux-gnu/gcc. /usr/include/gnu/stubs.h is included which then tries to include gnu/stubs-32.h, which doesn't exist, rather than gnu/stubs-64.h, which does. Thus apparently __WORDSIZE is defined as 32. > > Now Ubuntu has 64 bit libraries in /usr/lib and 32 bit libraries > in /usr/lib32 (with a simlink from /usr/lib64 to /usr/lib). > > Any ideas about how I can coerce configure to set things up correctly to > build a 64 bit compiler? > > Ciao > Terry >