This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: installing gcc on winnt


On Thu, 13 Apr 2000, Martin v. Loewis wrote:

> > Just download the binaries, and use those instead. You'll need a lot more
> > than just a native compiler to build GCC.
> 
> The documentation currently says
> 
>        1. If you do not have a Unix-like shell and few Unix-like
>           utilities, you will use a DOS style batch script called
>           `configure.bat'.  Invoke it as `configure winnt' from an
>           MSDOS console window or from the program manager dialog box.
>           `configure.bat' assumes you have already installed and have
>           in your path a Unix-like `sed' program which is used to
>           create a working `Makefile' from `Makefile.in'.
> 
>           ...
> 
> Do you think this is still accurate? If not, could the documentation
> be corrected, or the process made work as documented?

The configure.bat et al are really for MSDOS/DJGPP based compiler, and
not really appropriate for Windows-based ones. I have been working on 
getting a complete native user-toolchain that will allow you to build 
gcc natively on windows, and now it's quite doable. I'm hoping to 
announce this sometime soon, as soon as I'm home for more than a few days 
at a time! This toolchain is built using a port of GNU C Library 
(v 2.1.2), which is the brainchild of of Douglas Hunt, and I've been 
tweaking it here and there. 

Here're some of the issues:

- autoconf: 
  * Assumes ':' as the PATH separator.
  * Assumes that `test -f prog' works if prog.exe exists.

  I've added code to handle both cases. There is one lingering
  issue where autoconf uses ':' to separate sources and targets,
  such as `Makefile:foo.in', but I'll look at that soon.

- Makefile.in's for most packages: 
  * GCC Makefiles are pretty well done, except for a few missing
    $(build_exeext) for generated programs. Also use mkinstalldirs
    in `installdirs' target instead of the overly complex shell
    script.
  * Various shell fragments used by Makefiles get confused when you have
    a colon in pathname. Chill Make-lang.in for example uses ':' in
    sed patterns, which can be changed to '|' or ',', both of which
    are unlikely to be in pathnames on any platform. Easy fix.

- ltconfig: This is part of libtool:
  * Assumes '/*' is the only pattern for absolute paths. Easy fix.

- GNU/Cygnus toplevel files, such as configure, configure.in, ltconfig
  config-ml.in (I use a multi-lib'd configuration locally):
  * Assumes '/*' is the only pattern for absolute paths. Easy fix.

All quite simple, but will take some coordination and advocacy to get
these patches integrated.

After these rather minor changes are made, you can build the whole bit
natively. I've tested on WinNT 4.0 and Win98 SE, both with gcc as the
native compiler. To use VC++ will take a wrapper which translates Unix
style options to VC++ style, and IMO is not worth the hassle.

> I had a report about somebody trying, and the first thing that failed
> in 2.95 was that not all autoconf variables got replaced.

I can believe that.

My goal is to let users build their own instead of depending on one of
us to put together binary distributions, and hopefully we'll get there
soon.

For those who want to test this "win32-gnu" toolchain, drop me a line.
It's moving to SourceForge soon, so the glibc port will be available
via anon CVS.

Regards,
Mumit



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