This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: mingw -> linux cross compiler
> I don't have a useful URL. While people do Linux -> Windows all the
time, I doubt Windows -> Linux is common. The basic operation would
be
configure --build=i386-cygwin --host=i386-linux-gnu --prefix=/....
make
I know the basic procedure. The problem is that the gcc code requires
tweaking for this to work, and I don't have the knowledge of compilers to do
this tweaking.
> I'll note that you do need Linux header files and a Linux glibc.
There is no substitute for that. Fortunately Linux binaries are easy
to come by. I wouldn't recommend trying to build glibc on a Windows
system; that sounds like a world of hurt.
I have not been able to find the Linux headers or binaries anywhere on the
internet--at least not in a form I can access. I found an RPM version, but I
can't get inside this because I don't have a working Linux system.
> Also, you need to build the binutils as well as gcc.
I was already able to build the binutils under Windows with Linux as a
target. I got stuck on the second step in the tool chain--building gcc. This
requires tweaks to collect2.c that I'm not competent to make. There was a
message posted about this here:
http://gcc.gnu.org/ml/gcc-patches/2003-01/msg02331.html
All in all, I'd starting to think that getting a Linux system is the easier
approach to my problem (easier than building a cross compiler without a
Linux system), and I'm now looking into the cheapest and easiest way to do
this. I don't want to spend money on a new box, so that leaves me two
options: use a live CD so I can leave my existing Windows installation
intact (I'm not sure how painful this would be for development), or get a
copy of RedHat and set up one of my systems as a dual boot machine. This
will involve repartitioning my hard disk--a big pain in the neck.
Anyone have suggestions?
- Sheryl