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]

Report on compilation/installation of egcs-19981109 on i586-pc-mingw32


As I didn't know very much on the state of EGCS for Windows using MINGW32
(no cygwin), I decided to have a try on building it. 
First impressions: it actually configures and builds now! Congratulations!

There were a few minor glitches, which I will report below.
I also included fixes. Hopefully they will be useful for someone, they
are mainly to illustrate what I had to change. Please correct them and
include them in the main sources if possible.

I used bash as shell for configuring/building. 
The configure command was: 
  ./configure --target=i586-pc-mingw32 --host=i586-pc-mingw32

Here are the problems I encountered:
1) Because of errors related to missing definitions of O_RDWR (and similar),
   ULONG_MAX and offsetof, I added the following includes to xm-mingw32.h:

  #include <stdlib.h>
  #include <stddef.h>   
  #include <limits.h>
  #include <fcntl.h>

This fixed the problems, although I don't know if this is the proper fix
or not. 

2) For compiling the f77 directory, I had to use HOST_CC=gcc
   This was mentioned in the Makefile.

3) For installing the tar options had to be changed in the main Makefile
   as follows: (I don't know how I should configure this)
*** gcc/Makefile.in.orig	Tue Nov 17 21:28:44 1998
--- gcc/Makefile.in	Tue Nov 17 22:02:54 1998
***************
*** 401,407 ****
  INSTALL_HEADERS=install-headers
  
  # Options for tar when copying trees.  So HPUX can override it.
! TAROUTOPTS = xpBf
  
  # Select which version of fixincludes to use (I.E. regular versus SVR4)
  # This value is overridden directly by configure.
--- 401,407 ----
  INSTALL_HEADERS=install-headers
  
  # Options for tar when copying trees.  So HPUX can override it.
! TAROUTOPTS = xmpBf
  
  # Select which version of fixincludes to use (I.E. regular versus SVR4)
  # This value is overridden directly by configure.


4) For installing, the f77 language fragment had to be changed
   to add $(exeext)'s as follows:

*** gcc/f/Make-lang.in.orig	Tue Nov 17 21:30:00 1998
--- gcc/f/Make-lang.in	Tue Nov 17 21:44:25 1998
***************
*** 298,309 ****
  	esac
  	if [ -f lang-f77 ]; then \
  	  $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $(INCLUDES) \
! 	   `echo $(srcdir)/f/ansify.c | sed 's,^\./,,'` -o f/ansify; \
! 	  f/ansify < $(srcdir)/f/intdoc.in > f/intdoc.h0 $(srcdir)/f/intdoc.in; \
  	  $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $(INCLUDES) -I./f \
! 	   `echo $(srcdir)/f/intdoc.c | sed 's,^\./,,'` -o f/intdoc; \
! 	  f/intdoc > $(srcdir)/f/intdoc.texi; \
! 	  rm f/intdoc f/ansify f/intdoc.h0; \
  	else true; fi
  
  $(srcdir)/f/BUGS: f/bugs0.texi f/bugs.texi
--- 298,310 ----
  	esac
  	if [ -f lang-f77 ]; then \
  	  $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $(INCLUDES) \
! 	   `echo $(srcdir)/f/ansify.c | sed 's,^\./,,'` -o f/ansify$(exeext); \
! 	  f/ansify$(exeext) < $(srcdir)/f/intdoc.in > f/intdoc.h0 \
!        $(srcdir)/f/intdoc.in; \
  	  $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $(INCLUDES) -I./f \
! 	   `echo $(srcdir)/f/intdoc.c | sed 's,^\./,,'` -o f/intdoc$(exeext); \
! 	  f/intdoc$(exeext) > $(srcdir)/f/intdoc.texi; \
! 	  rm f/intdoc$(exeext) f/ansify$(exeext) f/intdoc.h0; \
  	else true; fi
  
  $(srcdir)/f/BUGS: f/bugs0.texi f/bugs.texi

5) makeinfo build fails
   The seems to be some include-file mess with missing definitions
   and multiple definitions. As I'm not interested in info files for
   the moment, I tried just to install gcc without info, but for some
   reason that is hard. All language front-ends got installed but gcc.exe
   and cc1.exe and cpp.exe where not installed :-(
   As a work-around I modified the install-normal target to do install-info
   last. Maybe it would be a good idea to do documentation last anyway.

6) chill didn't get compiled properly
   This was also a $(exeext) problem, here is a patch:

*** gcc/ch/make-lang.in.orig	Tue Nov 17 23:53:00 1998
--- gcc/ch/make-lang.in	Tue Nov 17 23:52:42 1998
***************
*** 64,77 ****
  	"GNUCHILL_VERSION=$(GNUCHILL_VERSION)"
  #

  # Define the names for selecting languages in LANGUAGES.
! CHILL: chill cc1chill chill-runtime
  
  # handle startfile in chill script and build script to install
  chill: $(srcdir)/ch/chill.in Makefile
  	thisdir=`pwd` ; \
  	sed -e "s:startfile=chillrt0:startfile=$${thisdir}/ch/runtime/chillrt0.o:" \
  	    -e "s:libpath=chillrt:libpath=-L$${thisdir}/ch/runtime/:" \
! 	    -e "s:whatgcc=gcc:whatgcc=\"$${thisdir}/xgcc -B$${thisdir}/\":" \
  	    -e "s:gnuchill_version=unknown:gnuchill_version=$(GNUCHILL_VERSION):" \
  	    -e "s:gnuchill_script_flags=:gnuchill_script_flags=\"$(GNUCHILL_SCRIPT_FLAGS)\":" $(srcdir)/ch/chill.in > chill ; \
  	chmod a+x chill ; \
--- 64,77 ----
  	"GNUCHILL_VERSION=$(GNUCHILL_VERSION)"
  #

  # Define the names for selecting languages in LANGUAGES.
! CHILL: chill cc1chill$(exeext) chill-runtime
  
  # handle startfile in chill script and build script to install
  chill: $(srcdir)/ch/chill.in Makefile
  	thisdir=`pwd` ; \
  	sed -e "s:startfile=chillrt0:startfile=$${thisdir}/ch/runtime/chillrt0.o:" \
  	    -e "s:libpath=chillrt:libpath=-L$${thisdir}/ch/runtime/:" \
! 	    -e "s:whatgcc=gcc:whatgcc=\"$${thisdir}/xgcc$(exeext) -B$${thisdir}/\":" \
  	    -e "s:gnuchill_version=unknown:gnuchill_version=$(GNUCHILL_VERSION):" \
  	    -e "s:gnuchill_script_flags=:gnuchill_script_flags=\"$(GNUCHILL_SCRIPT_FLAGS)\":" $(srcdir)/ch/chill.in > chill ; \
  	chmod a+x chill ; \
***************
*** 93,108 ****
  chill-cross: $(srcdir)/ch/chill.in
  	touch $@
  
! cc1chill: $(P) $(CHILL_SRCS) $(LIBDEPS) stamp-objlist \
  	insn-config.h insn-flags.h insn-attr.h insn-codes.h \
  	c-typeck.o c-aux-info.o c-common.o c-iterate.o
! 	cd ch; $(MAKE) $(FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) ../cc1chill
  
  chill-runtime: stmp-headers $(GCC_PASSES)
  	case "$(LANGUAGES)" in \
  	*CHILL*) if [ -f ch/runtime/Makefile -a -z "$(CROSS)" ] ; then \
  		   thisdir1=`pwd`; \
! 		   cd ch/runtime; $(MAKE) $(FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" all ; \
  		 else true; fi ;; \
  	esac
  #

--- 93,108 ----
  chill-cross: $(srcdir)/ch/chill.in
  	touch $@
  
! cc1chill$(exeext): $(P) $(CHILL_SRCS) $(LIBDEPS) stamp-objlist \
  	insn-config.h insn-flags.h insn-attr.h insn-codes.h \
  	c-typeck.o c-aux-info.o c-common.o c-iterate.o
! 	cd ch; $(MAKE) $(FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) ../cc1chill$(exeext)
  
  chill-runtime: stmp-headers $(GCC_PASSES)
  	case "$(LANGUAGES)" in \
  	*CHILL*) if [ -f ch/runtime/Makefile -a -z "$(CROSS)" ] ; then \
  		   thisdir1=`pwd`; \
! 		   cd ch/runtime; $(MAKE) $(FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) GCC_FOR_TARGET="$${thisdir1}/xgcc$(exeext) -B$${thisdir1}/" all ; \
  		 else true; fi ;; \
  	esac
  #

***************
*** 141,147 ****
  
  # Install the driver program
  CHILL.install-common:
! 	-if [ -f cc1chill ] ; then \
  	  if [ -f chill.install ] ; then \
  	    if [ -f gcc-cross ]; then \
  	      rm -f $(bindir)/$(CHILL_CROSS_NAME); \
--- 141,147 ----
  
  # Install the driver program
  CHILL.install-common:
! 	-if [ -f cc1chill$(exeext) ] ; then \
  	  if [ -f chill.install ] ; then \
  	    if [ -f gcc-cross ]; then \
  	      rm -f $(bindir)/$(CHILL_CROSS_NAME); \



I didn't do any testing runs, but if it is straightforward to configure I'll
certainly look into that. (If somebody wants to give me a hint, I'd welcome
that though I didn't read the fine manuals yet.)

Regards,
   Geert




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