This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[OT] RE: Canadian cross on cygwin
- From: "Dave Korn" <dk at artimi dot com>
- To: "'Tal Agmon'" <Tal dot Agmon at nsc dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Wed, 1 Sep 2004 14:40:57 +0100
- Subject: [OT] RE: Canadian cross on cygwin
> -----Original Message-----
> From: gcc-owner On Behalf Of James E Wilson
> Sent: 31 August 2004 01:28
> On Thu, 2004-08-26 at 01:12, Tal Agmon wrote:
> > Isn't compiling a compiler that is going to generate crx
> executable, will run
> > on windows and built on cygwin is a canadian cross?
>
> cygwin does run on windows, so it isn't clear what you mean here.
Tal, I am going to interpret it as meaning you want it to be mingw-hosted,
i.e. not to require the cygwin dll in end use. So stop me if I've got it
wrong.
> The easy solution here is that you build a --target=crx-elf compiler.
> This will give you a cygwin cross compiler to crx-elf. Anyone with
> cygwin can run it, and perhaps all they need is the cygwin dll, though
> it doesn't hurt to give them an entire cygwin environment.
>
> If you won't want to use the cygwin dll, then one wonders why you are
> using cygwin at all. Using mingw32 to build a --target=crx-elf
> compiler, and you will get a mingw32 cross compiler to crx-elf.
> Assuming that mingw32 can build gcc. I don't have any experience with
> mingw32, so I don't know what its capabilities are.
Although mingw/msys works well enough, the cygwin environment is a good
deal nicer to work in, as it provides a fully posix fs and environment,
rather than trying to squeeze *nix-y software into dealing with
windoze-style file paths. But it is an emulation layer, which makes it
slower; you might well want to use it as a dev environment but have your
production compiler mingw hosted for native win32 speed[*].
> Trying to build a canadian cross cygwin build/mingw32 host/crx-elf
> target is probably a lot of unnecessary complexity. Building canadian
> crosses takes a lot of time and effort to get right. Don't waste your
> time doing it if you really don't need to.
I don't think a canadian cross is necessary, in fact. The cygwin gcc is
both a native (cygwin-targetted) and cross (mingw-targetted) compiler.
Adding "-mno-cygwin" to the CFLAGS (and any similar linker flags etc.) and
configuring simply with "--target=crx-elf" should produce a mingw-hosted
gcc. With a bit of luck and a tailwind.
cheers,
DaveK
[*] Hey! I never thought I'd use the words "win32" and "speed" in the same
sentence :-O
--
Can't think of a witty .sigline today....