crosscompiling gcc to run on windows an compile for linux

Marco Trudel mtrudel@gmx.ch
Fri Jun 16 19:22:00 GMT 2006


Hello list

I'm creating a gcc that runs on windows and compiles for linux. I can 
successfully build it, if not using "with-sysroot". But if I set 
--with-sysroot=foobar/sys-root and --with-build-sysroot=foobar/sys-root, 
compilation always fails with:

checking for suffix of object files... configure: error: cannot compute 
suffix of object files: cannot compile

I guess that I'm missing some includes or libs, but can't figure out 
which ones... I copy:
/usr/include to sys-root/usr/include
/lib to sys-root/lib
i686-pc-linux-gnu/4.1.1/include to sys-root/include

Unfortunately I haven't found anything useful on google. If someone got 
the same problem, there never was an answer.


Another thing that surprised me:
Firstly, I compile gcc so that it runs on linux and compiles for windows.
If I use this compiler to create a gcc that runs on windows and compiles 
for windows, it works.
If I use this compiler to create a gcc that runs on windows and compiles 
for linux, I additionally need a gcc that runs on linux and compiles for 
linux (i686-pc-linux-gnu-cc and i686-pc-linux-gnu-nm is needed).


Hm, should I better ask such questions to the gcc-help mailinglist?


regards
Marco



More information about the Java mailing list