delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/04/28/00:19:58

From: karuottu AT freenet DOT hut DOT fi (Kai Ruottu)
Subject: Re: gcc and cross-compilers
28 Apr 1998 00:19:58 -0700 :
Message-ID: <199804271936.WAA21669.cygnus.gnu-win32@freenet.hut.fi>
References: karuottu AT freenet DOT hut DOT fi (Kai Ruottu)
Reply-To: karuottu AT freenet DOT hut DOT fi
Mime-Version: 1.0
To: Hannu Koivisto <azure AT iki DOT fi>
Cc: gnu-win32 AT cygnus DOT com

Hannu Koivisto wrote:

> What about making both mingw32->mingw32 and linux->mingw32
> compilers (egcs) under Linux? For a long time I've wanted to
> experiment with latest egcs snapshots (I'm using these under
> Linux) for making Win32-mingw apps (both under Linux and NT),
> but as your www-page was lacking the mingw32 cross-compiling
> instructions at least when I checked it last time, I haven't yet
> been brave enough to try myself :) Is there something special I
> should remember before I start hitting my head to the wall?

 The rest of the message went badly over my head (reilusti yli
 hilseen)...

 Here's some problems and bugs revealed when trying to build a 
Linux-to-mingw32 compiler from the egcs-1.0.2 sources and using
the Mumit's libs and headers :
-------------------------------------------------------------
Problem:  Needs 'crt0.o' as the startup routine, mingw32 has 'crt1.o'.
Solution: make a symbolic link from 'crt1.o' to 'crt0.o'

Problem:  The prototypes for 'write()' and 'fdopen()' are wrong.
Solution: change 'unsigned int' to 'size_t' in 'write()' and add
          'const' before 'char *' in 'fdopen()'.

Problem:  The header 'sys/param.h' is missing.
Solution: add empty 'sys/param.h'.

Problem:  The header 'sys/times.h' is missing.
Solution: add a dummy 'sys/times.h' to contain '#include <time.h>'

Problem:  The routines 'dtime_', 'etime_', 'alarm' and 'sys_clock'
          for libf2c need structs which the mingw32 headers don't have.
Solution: disable the making and archiving of these routines.

Problem:  When building 'liberty.a' for the mingw32 target, we 
		  get the error :
		  strerror.c:461: conflicting types for `__imp__sys_errlist'          
		  include/errno.h:116: previous declaration of `__imp__sys_errlist' 
Solution: remove NEED_sys_errlist from i386-mingw32/libiberty/config.h.

Problem:  Prototypes for 'mkdir()' in 'dir.h' and 'umask()' in 'io.h'
          are wrong.
Solution: Correct them to be right...
-------------------------------------------------------------

 I got the C, C++, Objective-C, F77, libiberty and libiostream
made, but when trying the libstdc++, the make stopped with
"no rule to make 'all'". Ok, I'll run 'make clean' and try again...
Mumit's C++ libs are quite fat, so self-made slimmer ones will
be needed (how a library archive can be stripped anyhow?)

 After making five or so egcs-1.0.2-based compilers, this seems
the hardest to make... Linux-to-cygwin32 with egcs-1.0.2 was just
a piece of cake...

 Cheers (Laatokka ympäri), Kai
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019