This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cross compiling for x86_64


Indu Bhagat writes:
 > Hi,
 > 
 >  I am trying to configure gcc for compiling some c,cpp and fortran
 > sources to x86_64 on my x86 machine using the following steps:
 > 
 > 
 >  1. Binutils-2.17 configuration and installation:
 > $../binutils-2.17/configure --target=x86_64-pc-linux
 > --prefix=/users/scratch/ibhagat/x86_64-exp/x86_64_prefix-II/
 >  $ ...
 >  $ make all install
 > 
 >   2. After successful completion of step 1, gcc configuration and installation:
 > 
 > $ export PATH=$PATH:/users/scratch/ibhagat/x86_64-exp/x86_64_prefix-II/bin/
 >  $ ../gcc-4.1.1/configure --target=x86_64-pc-linux
 > --prefix=/users/scratch/ibhagat/x86_64-exp/x86_64_prefix-II/
 > --disable-shared --disable-threads --enable-tls --enable-languages=c
 > --with-newlib
 >  $ make all-gcc
 >  $ make install-gcc
 > 
 >   3. After this, I proceeded with glibc, as I think one needs to have
 > appropriate library support as well, to support cross compilation. So,
 > I cnfigured and installed the glibc-2.5
 > 
 > $ ../glibc-2.5/configure
 > --prefix=/users/scratch/ibhagat/x86_64-exp/x86_64_prefix-II/
 > --host=x86_64-pc-linux --build=i686-redhat-linux
 > --enable-add-ons=linuxthreads --disable-sanity-checks
 > --with-headers=/users/scratch/ibhagat/x86_64-exp/linux-2.6.19.1/include
 > --with-tls --with-__thread
 > --with-binutils=/users/scratch/ibhagat/x86_64-exp/x86_64_prefix-II/bin/
 >  $ make all install

OK, now you need to build gcc again, this time with glibc (not newlib)
support.

 >  4. Till step 3 it works fine, and now I can generate x86_64
 > executables using gcc. But moving further, i need g++ and gfortran as
 > well. To build these i used the same command as before (the PATH
 > remaining the same)-
 > 
 > $ ../gcc-4.1.1/configure --target=x86_64-pc-linux
 > --prefix=/users/scratch/ibhagat/x86_64-exp/x86_64_prefix-II/
 > --disable-shared --disable-threads --enable-tls --enable-languages=c++
 > 
 >  I get the following error :

There's a configure.log file which shows the error.  Have a look.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]