This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: NT cross compiler for Linux


Curt wrote:

> I am trying to create an NT cross compiler for Linux and as part of this
> process, I am trying to build a cross-compiled set of binutils.  I
> downloaded the latest Cygwin release (B20.1), and am using the executables
> from that in order to run the configure (sh) script, along with an NT native
> gcc compiler, and the other typical unix tools.

 Using Linux for the builds may be much easier.

 1. Build a Linux-to-cygwin-b20.1 toolset, Mumit Khan should have quite good
    instructions for this....

 2. Build a Cygwin-to-linux toolset under Linux :
    configure --build=i486-linux-gnu --host=i686-cygwin32 \
		--target=i486-linux-gnu

> Any idea why bfd.h is missing or where it comes from?  Does this file get
> generated somewhere? 

 Configure (or Makefile) should produce it, but somehow it fails. You haven't
a real Unix system, so it can be expected that it doesn't behave like one...
Of course Cygnus tries to make it behave 'just like Unix', but it is still 
'beta-20.1'

> In case anyone cares:  In trying to create an NT cross Linux compiler, I've
> tried alot of other things before getting to this point... Most of them
> involving downloading the Cygwin source distribution itself and trying to
> cross compile that instead.  Everything I tried resulted in compilation
> problems for one reason or another, including the same Binutils bfd.h
> problem mentioned above.  For this reason, I decided to abandon the Cygwin
> stuff and am concentrating on getting the individual packages like Binutils
> to cross compile instead.

 The problem is not only in the sources for the target, the host system doesn't 
(yet) always behave like Unix.

 If you want to take part in fixing the bugs in Cygwin, please join into the 
'cygwin@cygnus.com' mailing list (or something, the name has been changed some 
time ago) --- more info available via http://sourceware.cygnus.com/cygwin. 
Perhaps there are already fixes for the configure scripts, so that they will 
work also under Cygwin.

> If anyone thinks that I should keep doing this, or if anyone thinks that I
> should go back to trying to get the Cygwin release to compile, please let me
> know what you think would be easier.  :-)

 If you only want produce some Cygwin-hosted toolsets etc., doing the builds in 
a real Unix system (like Linux) involves only the prerequisite of a 
Cygwin-target toolset to produce 'i386pe' binaries under the Unix-system... The
'www.objsw.com' had Mumit Khan's prebuilt toolset for producing cygwin-b19 
binaries under Linux, perhaps Mumit has now updated the toolset...

 I remember Mumit writing that he builds his Cygwin/Mingw32 stuff under Linux,
I build mine too, perhaps David Fiddes builds his 'm68k/Coldfire' toolsets 
under Linux too (he has Linux-hosted tools too). So I'm very curious about if
someone really uses Cygwin to build Cygwin-hosted things (other than the Cygwin
tools itself). Probably Cygnus-guys must do this because it is one way to find 
bugs in Cygwin.

 Anyway anybody has always the freedom to wish prebuilt Linux and Cygwin tools 
like a Linux-libc6-to-Cygwin-b20.1 and a Cygwin-b20.1-to-Linux-libc6 
toolsets...  If the NT with Cygwin (or still worse Win9x with Cygwin) is the 
only 'Unix-system' available for the builds, wishing the proud Linux-owners to 
build Cygwin-hosted things in their 'perfect' Unix-systems is one way... To 
test the soon appearing gcc-2.95, building a cygwin-to-linux-gcc-2.95 toolset
and putting it available (bug reports then to 'egcs-bugs@egcs.cygnus.com :-)
could be one way...

 My thoughts & questions about debugging Linux programs under a 
Win32-system....

 A Mingw32-to-Linux-libc6 toolset is also possible, but getting TCP/IP etc. 
things to work in GDB under Mingw32 may be quite tough... Compiling and 
remote-debugging Linux programs under Win32 should be possible somehow as
follows:

   (gdb) file mytest               - gives the name for the Linux-program
   (gdb) target remote-linux ...   - starts remote TCP/IP-connection to Linux
   (gdb) load                      - loads the program to the Linux system
   (gdb) run                       - runs it there, stdout etc. coming to the
                                     Win32 system's screen

 Schools are now full of those Win32 PCs, and there may be only one Linux 
server available for 'Unix programming'. When 30 or more persons edit, compile
and debug their programs in the single system at the same time, it can become
quite slow... The Win9x (or NT) / Linux dual-boot in every PC is the 
alternative but seldom used...

 All we know that embedded systems can be connected via serial lines, 
BDM-interfaces or a TCP/IP-connection to the host with GDB... But how to 
connect a remote 'target' Unix system to a 'host' Unix system (like NT with
Cygwin) for remote debugging via a TCP/IP connection? What kind of 'daemon' 
('GDB stub') must be running in the target Unix-system?

 Cheers, Kai
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]