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: 2.95,2 bug; can not create cross compiler


> From: Andreas Schwab <schwab@suse.de>
> Date: 23 Nov 1999 17:35:40 +0100

> I have already stated many times that this does not work because
> $(gcc_tooldir) does not exist before the compiler is installed the
> first time, thus the preprocessor will not see any of the files
> under $(tooldir)/sys-includes.  This is a long standing bug that no
> one has bothered to look at yet.

Yes, so?  The existence of unrelated bugs doesn't deter me form using
or trying to use gcc.  Nor should the mere existence of these bugs
cause us to not document things that need documenting.

I understand you would like to see the this bug addressed as well, in
time I am sure it will be.  Below is most (all?) of the solution I
use.  If the maintainers approve, I'd be happy to install it.  The
making of the directory isn't as invasive as the copying to
sys-include in the first place.  Now, problems with the patches, on a
native build and install, if the user does the build a the user, and
the install as root, but doesn't have privs to the install tree during
build time (which is often the case), the make installdirs will fail.
Is this a problem?  :-( Hum...  We could ignore it?  (Not that I like
that any more.)

If someone wants to spend a few more nurons fixing this up and
resubmitting it, I'd welcome it.  Maybe if the making of the install
dir was a bit more conditional?  I don't know.  Oh, how about if the 5
line fragment was in cross-make?

Thoughts?

*** Makefile.in@@/main/vendor.gnu/LATEST	Sat Jul 31 14:57:08 1999
--- Makefile.in	Tue Nov 16 15:10:07 1999
***************
*** 215,222 ****
    || ( [ "$(host_canonical)" = "$(target)" ] \
         && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
  
! # Dir to search for system headers.  Overridden by cross-make.
! SYSTEM_HEADER_DIR = /usr/include
  
  # Control whether to run fixproto.
  STMP_FIXPROTO = stmp-fixproto
--- 215,222 ----
    || ( [ "$(host_canonical)" = "$(target)" ] \
         && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
  
! # Dir to search for system headers; usu. /usr/include for non-cross builds.
! SYSTEM_HEADER_DIR = @system_header_dir@
  
  # Control whether to run fixproto.
  STMP_FIXPROTO = stmp-fixproto
***************
*** 879,884 ****
--- 883,893 ----
  stamp-objlist: $(OBJS) 
  	echo " $(OBJS)" | sed -e 's, \([a-z0-9]\), ../\1,g' -e 's/\.o/$(objext)/g' >stamp-objlist
  
+ xgcc$(exeext): stamp-installdirs
+ stamp-installdirs:
+ 	make installdirs
+ 	touch stamp-installdirs
+ 
  # We call this executable `xgcc' rather than `gcc'
  # to avoid confusion if the current directory is in the path
  # and CC is `gcc'.  It is renamed to `gcc' when it is installed.
***************
*** 1967,1973 ****
  	  -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  	  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
  	  -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
! 	  -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
  	  -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
  	  -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
  
--- 1986,1992 ----
  	  -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  	  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
  	  -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
! 	  -DCROSS_INCLUDE_DIR=\"$(SYSTEM_HEADER_DIR)\" \
  	  -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
  	  -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
  
***************
*** 2001,2007 ****
  	  -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  	  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
  	  -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
! 	  -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
  	  -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
  	  -c `echo $(srcdir)/cppinit.c | sed 's,^\./,,'`
  
--- 2020,2026 ----
  	  -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  	  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
  	  -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
! 	  -DCROSS_INCLUDE_DIR=\"$(SYSTEM_HEADER_DIR)\" \
  	  -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
  	  -c `echo $(srcdir)/cppinit.c | sed 's,^\./,,'`
  
***************
*** 2023,2029 ****
  	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
            -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  	  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
! 	  -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
  	  -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
  	  -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  	  -DSTD_PROTO_DIR=\"$(libsubdir)\" \
--- 2042,2048 ----
  	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
            -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  	  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
! 	  -DCROSS_INCLUDE_DIR=\"$(SYSTEM_HEADER_DIR)\" \
  	  -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
  	  -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  	  -DSTD_PROTO_DIR=\"$(libsubdir)\" \
***************
*** 2034,2040 ****
  	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
            -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  	  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
! 	  -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
  	  -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
  	  -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  	  -DSTD_PROTO_DIR=\"$(libsubdir)\" \
--- 2053,2059 ----
  	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
            -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  	  -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
! 	  -DCROSS_INCLUDE_DIR=\"$(SYSTEM_HEADER_DIR)\" \
  	  -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
  	  -DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
  	  -DSTD_PROTO_DIR=\"$(libsubdir)\" \
*** configure.in@@/main/vendor.gnu/LATEST	Sat Jul 31 15:02:09 1999
--- configure.in	Tue Nov 16 15:05:01 1999
***************
*** 3821,3832 ****
--- 3948,3963 ----
  # if this is a cross-compiler.
  # Also use all.cross instead of all.internal
  # and add cross-make to Makefile.
+ # Also don't use the normal system header dir.
  cross_overrides="/dev/null"
+ system_header_dir=/usr/include
  if test x$host != x$target
  then
  	cross_defines="CROSS=-DCROSS_COMPILE"
  	cross_overrides="${topdir}/cross-make"
+ 	system_header_dir="${system_alt_header_dir:-$(tooldir)/sys-include}"
  fi
+ AC_SUBST(system_header_dir)
  
  # When building gcc with a cross-compiler, we need to fix a few things.
  # This must come after cross-make as we want all.build to override


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