Compiling gcc-4.2 on 64 bit Ubuntu
Terry Frankcombe
terry@chem.gu.se
Thu Mar 1 17:13:00 GMT 2007
[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
>
More information about the Gcc-help
mailing list