Linux->Cygwin cross compiler?

Fabrice Gautier gautier@email.enst.fr
Thu Jan 25 17:36:00 GMT 2001


Hi,

I managed to compile this cross-gcc like this:

1/ patch gcc.2.95.2/gcc/config/i386/t-cygwin by removing the "LIMITS_H_TEST
= true line"
2/ configure with --with-newlib
3/ make only the C compiler (with: make all-gcc LANGUAGES="c" )

In this case you don't need the cygwin header pre-installed.

I'm not sure why if the fix in 1/ is correct but if I don't make it, there
is a #include_next <limits.h> that fails in gcc limits.h. The comment in
gcc/config/i386/t-cygwin says:

# cygwin always has a limits.h, but, depending upon how we are doing
# the build, it may not be installed yet.

So i don't see why there is the LIMITS_H_TEST=true if the the limits.h is
not there.
By removing this line configure test by default if
$(tooldir)\sys-include\limits.h exists or no.


So in the end i get my i686-cygwin32-gcc binary and the libraries in my
lib/gcc-lib/i686-cygwin32 directory.

For sure I can't link because I miss (at least) crt0.o. (but gcc -c seems to
work)

A+

--
Fabrice Gautier
gautier@email.enst.fr

> -----Message d'origine-----
> De : cygwin-owner@sources.redhat.com
> [ mailto:cygwin-owner@sources.redhat.com]De la part de David McNab
> Envoyé : jeudi 25 janvier 2001 08:17
> À : cygwin@cygwin.com
> Objet : Linux->Cygwin cross compiler?
>
>
> Does anyone know where I can find a cross-compiler to run on Linux (pref
> Mandrake) which will generate EXEs, DLLs etc for CYGWIN?
>
> I humbly have to admit that I lack the experience to feel confident in
> compiling the Cygwin gcc/ld on Linux. I could probably do it over
> time, but
> I'd rather avoid it if it's already been done. A compiler is not a small
> piece of software.
>
> Another issue that intimidates me is the fact that a
> Linux->CYGWIN gcc would
> need a largely different set of header files, libraries etc to
> the set used
> by native Linux gcc. If feels like there'd be more to it than
> just changing
> a few trivial makefile constants and #defines to keep the CYGWIN-targeted
> headers and libraries from clashing with the native Linux ones.
>
> Would I get away with Linux's 'make', or would I need to port
> cygwin's make?
>
> Any leads or advice would be deeply appreciated.
> Especially if someone could offer a URL where I could download an existing
> cross-compiler.
>
> Please reply to david@rebirthing.co.nz
>
>
>
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list