This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Re: building egcs for mingw32...


On Thu, 13 Aug 1998, Daniel Karipides wrote:

> 
> I would like to request information on how to build an egcs snapshot
> for a mingw32 target and host.  I realize that binaries of the
> releases are available to save me the trouble.  For a variety of
> reasons, I would like to be able to compile the compiler myself.  So,
> if you have successfully built egcs for mingw32 using nothing but
> cygwin/mingw32 and have the time to give the some pointers, that would
> be greatly appreciated.

I always recommend building from source so at least you know what you're
getting! 

Building on cygwin32 is easy, since you already have all the shell tools
available. I've never built mingw32 natively, so can't comment.
Theoretically at least, it should work just fine since you already have
the shell tools installed from cygwin32.

Here's what I would do:

Common steps: 
  - get all the includes and libraries in the right places. If you already
    have my prebuilt binaries in place, you already have it.
  
  - get the sources and patch if needed. I have source patches at my site
    (see under patches). The only patch there I don't recommend is the
    one called "cygnus.diff" aka unlibsubdir patch unless you want a 
    "relocatable" package that depends only on GCC_EXEC_PREFIX. If you use
    that patch see (1) below.

    binutils-2.9.1 builds straight from sources.

Cygwin32:

  Let's say you've installed Cygwin32 b19 under /Cygnus/B19

    % prefix=/Cygnus/B19
    % exec_prefix=$prefix/H-i386-cygwin32
  
  - Configure and build binutils:
    
    % mkdir <srcdir>/BUILD
    % cd <srcdir>/BUILD
    % ../configure --prefix=$prefix --exec-prefix=$exec_prefix i386-cygwin32
    % make 
    % make install

  - Configure and build egcs:

    % mkdir <srcdir>/BUILD
    % cd <srcdir>/BUILD
    % ../configure --prefix=$prefix --exec-prefix=$exec_prefix i386-cygwin32
    [ 
      NOTE 1: If you've added "cygnus.diff" aka unlibsubdir patch from
      Cygnus, you must do the following here:
    % cd gcc; make installdirs
    ]
    % make 
    % make install

Mingw32:

  Let's say you've installed Mingw32 /mingw32

    % prefix=/mingw32
    % exec_prefix=$prefix

  Replace i386-cygwin32 with i386-mingw32 above.

Note that we're "forcing" the platform to be i386-cygwin32 (we have to
for i386-mingw32 since otherwise uname will return the wrong value)
instead of letting config.guess figure it out. This is needed to keep
the directory hierarchy sane and in sync with the current distributions.

> 
> I tried a build with a minimum of configure options and it died
> in gcc/toplev.c.  I'll leave deatils for the egcs list, but I think
> this is the most apporpriate place to ask for starters.
> 

Could you send me the errors please? BTW, I doubt if you'll be successfull
on W95. NT 4.0SP3 does work, and Win98 reportedly works. W95 is just too
unstable for development work. Tim Prince has been working with W95 and
has run into every problem in the book. Others have reported success on
NT 4.0SP3 and Win98.
  
When I released the egcs-1.0.2 binaries, I had parallel trees for
cygwin32 and mingw32. Hence lots of the patches are in common, but not
quite. You can do a combined build of course. I have patches for
egcs-1.0.3a that combines both (same tree). See under snapshots
directory on my ftp site (URL below).

This might not be an issue if you're building from the pre-1.1
snapshots, since all of these are integrated in it. I have patches for
egcs-1.1 (some of which will *not* be in egcs-1.1 since these are too
platform specific and will take some lobbying to get it in) under the
snapshots/egcs-1.1 directory.

Do yourself a favor and use a Unix box to do all this. Lot less painful,
and works 100% of the time.

Good luck and do keep me posted on your success (or the lack thereof).

Regards,
Mumit


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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