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 gcc? (sysroot confusion)


On 01.11.2014 00:18, Pierre Ossman wrote:
You are doing several things wrong.

First off - Keep the cross compiler and cross binutils *out* of /sysroot. Install them somewhere else. That includes gmp, mpfr and mpc. The easiest way (imho) is to create /cross where you install all of those. I would also recommend to install gmp,mpfr and mpc with static only. *Or* if you have root access, just use the ones that come with your distribution.


But I was keeping them out of /sysroot. I was putting the tools
in /bootstrap. So I'm not sure what you're suggesting here?


I probably missed that part :-)

So I can build all of glibc with the --without-headers gcc?


Yeap.


Of course. I left those out as they are fairly straight forward
applications to cross compile. It's gcc that's the cause of concern as
it looks in more detail at the build system. But what about the
specifics of building gcc? What configure flags to I need to specify?
That's my primary source of confusion.


A lot of stuff is *not* straight forward to cross compile. Coreutils ,for instance, can be a pain.
Whats the confusion? The final-gcc is pretty straight forward :-)

I would use something like this:
 export PATH=/bootstrap/bin:$PATH
   ./configure --target=i686-pc-linux-gnu --prefix=/bootstrap
               --with-gmp=/bootstrap --with-mpfr=... --with-mpc=...
               --with-sysroot=/sysroot
               --enable-__cxa_atexit
               --enable-languages=c,c++

(I'm not 100% sure, but I don't think you need to specify to disable multilib on i686)

--
chs


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