Re: Compiling gcc-4.2 on 64 bit Ubuntu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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
> 


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux