This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Cannot build a gcc cross-compiler


Hello,

I'm trying to build a gcc cross-compiler that runs on x86_64-unknown-linux-gnu and produces code for i686-unknown-linux-gnu.

My sysroot is located in /stage1 directory.

First of all I built binutils-2.19.1 with --prefix=/stage1/usr --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=i686-unknown-linux-gnu --with-sysroot=/stage1. This works without problems.

Then I tried building gcc-4.4.0 with --prefix=/stage1/usr --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=i686-unknown-linux-gnu --with-sysroot=/stage1 --enable-languages=c. This doesn't work because the system asks for (glibc) headers files in /stage1/usr/include. To fix this I probably have to build glibc with --build=x86_64-unknown-linux-gnu --host=i686-unknown-linux-gnu, but for that I need a cross-compiler, which I don't have yet.

It seems a chicken and egg problem: glibc needs gcc, gcc needs glibc.

What can I do?

Thanks.


-- For unsubscribe information see http://sourceware.org/lists.html#faq


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