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: Specs file


Brendan Simon <brendan@dgs.monash.edu.au> writes:
> This is great.  I wonder if you could but the binaries (zipped or tgz I
> guess) on an ftp site somewhere.  I simple HOWTO on how you built the
> cross-compiler would be great.  Maybe you can contribute these to the
> crossgcc maintainers.  I would like to get a copy of this mingw32 version.
> I have build egcs1.1b for powerpc-eabi hosted on linux and would like to
> produce egcs1.1b powerpc-eabi to hosted on either mingw32 or cygwin32.
> Your HOWTO will probably help me do the canadian cross.  Mingw32 appears to
> be significantly faster but Mumit Khan suggests that cygwin32 beta20 is
> closing the gap.  I have beta20 and it still appears pretty slow to me.

It's a very large gap ;-)

We have a few various different kinds of embedded systems that are used
as controllers for experimental stations, and we use linux to build
everything. I can't imagine using MS-Windows boxes to do the development
unless I have to (eg., if the tools were not available for linux); in
fact, all of our windows32 software is built on Linux or Solaris as 
well since to me it's just another embedded system.

If you want a mingw32 hosted toolchain, it's rather simple to build it
all on a linux box.

Let's take ppc-eabi target for example:
  
  1. get the entire source tree. I use single tree ala Cygnus.
  2. Build the cross tools for the host first.
     
     $ mkdir <srcdir>/mingw; cd <srcdir>/mingw
     $ ../configure --target=i386-mingw --prefix=/usr/local/mingw
     $ make && make install
  
  3. Now build the target tools hosted on mingw.
     
     $ export PATH=$PATH:/usr/local/mingw/bin
     $ mkdir <srcdir>/ppc-eabi; cd <srcdir>/ppc-eabi
     $ ../configure --host=i386-mingw32 --target=ppc-eabi \
       --build=i686-pc-linux-gnu --prefix=/usr/local/ppc-eabi
     $ make

Bit over-simplified, but you get the idea.

Note that Cygwin B20 source tree could be used for everything, but I
believe there is a bug in either BFD or GAS that causes forward references
to functions to be misassembled (the offset is a large negative number
instead of a small positive delta), so I ended up using binutils-2.9.1. 
It becomes a bit messy thanks to this little problem. I've only seen this
for ppc-eabi target, and not for anything else I've built so far.

I haven't submitted any bug report on this problem since I haven't had
the time to see if it's been fixed in the dev snapshots yet. 

Regards,
Mumit

________________________________________________
To get help for the crossgcc list, send mail to
crossgcc-request@cygnus.com with the text 'help'
(without the quotes) in the body of the message.