2012/7/23 Corinna Vinschen <[email protected]>

> On Jul 21 13:04, Ruben Van Boxem wrote:
> > Hi,
> >
> > I've seen a lot of chatter/patches going into MinGW-w64 for Cygwin
> support,
> > which is great, as I've noticed a lot of small inconsistencies and code
> > clarity issues are being fixed.
> >
> > What I would like to know is if I could build a working Cygwin
> > cross-compiler using MinGW-w64 and if so, what steps would be required to
> > build it. If this is possible, this would end in a Cygwin cross-compiler
> > for Arch in the AUR (Arch User Repository), and me building Cygwin hosted
> > MinGW-w64 cross-compilers as well for my builds.
> >
> > I have previously attempted to build a Cygwin cross-compiler, but I found
> > it troubling that I needed to copy the binary Cygwin runtime. I'd like to
>
> The problem is that a full cross-toolchain also contains target libs,
> for instance libstdc++.  Building these libs requires access to the
> headers and link libs of the target.


> > build everything from source and a native Linux GCC, not paste together a
> > bunch of prebuilt packages.
>
> As you might know, the gcc build tree and the combined sourceware.org
> build tree can be merged to do a full build.  If you merge the newlib
> and winsup dirs into the build tree, you should be able to build a
> complete cross toolchain without external references to Cygwin crt files
> or libs, since they are then part of your source tree.
>

Thanks for your time! I know target libs need the crt, but this should be
no different than plain MinGW-w64 (which I know how to build correctly).
The only real build instructions I could find for Cygwin (that was of any
use) were outdated <http://x.cygwin.com/docs/cg/cross.html>. I know Fedora
provides a Cygwin cross-compiler (which IIRC uses the binary Cygwin
packaged crt/headers).

Doesn't a Cygwin compiler need win32 headers/crt to build? My first guess
at how things should be built is this:

0. Native Linux tools
1. Cross binutils
2. Cygwin+Win32 (MinGW-w64) headers
3. Cross GCC C compiler
4. MinGW(-w64) CRT
5. Cygwin CRT (but this uses C++ IIRC, so that is a problem!!)
6. Rest of Cross GCC (C++,fortran, etc)

This assumes I know how to point GCC to the correcct directories, which I
honestly don't.

Number five is the conceptual problem, and if this is impossible, I would
say this is a big theoretical problem in the Cygwin infrastructure: You
cannot build cygwin without access to... prebuilt Cygwin, which kind of
sucks wrt circular dependencies on itself.

I will attempt a combined tree with winsup and newlib and see where I get.
I really hope there's no MinGW.org centric hard-coded directories in the
build.

Ruben


>
> Corinna
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to