This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Install install-tools even on a cross build


The configure scripts were completely disabling fixinclude when a
cross-hosted compiler was being built.  It's right to not run them in
that case (because, well, you can't; they'll only run on the host)
but the scripts and executables (especially) still need to be
installed, or else how can you run them on the host?

Tested by building an i686-darwin native on powerpc-darwin.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-fixinccross.patch=====================
2004-11-02  Geoffrey Keating  <geoffk@apple.com>

	* configure.ac: Don't clear STMP_FIXINC or STMP_FIXPROTO just
	because we don't want to run them now; instead, set them to
	stmp-install-fixproto or stmp-install-fixinc.
	* Makefile.in (stmp-install-fixproto): New.
	(stmp-install-fixinc): New.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1416
diff -u -p -u -p -r1.1416 Makefile.in
--- Makefile.in	28 Oct 2004 13:37:33 -0000	1.1416
+++ Makefile.in	2 Nov 2004 21:11:06 -0000
@@ -2829,6 +2829,12 @@ stmp-fixinc: fixinc.sh gsyslimits.h spec
 	chmod a+r include/syslimits.h)
 	$(STAMP) stmp-fixinc
 
+# We can't run fixinc (it's being built for a different host), but we still
+# need to install it so that the user can run it when the compiler is
+# installed.
+stmp-install-fixinc: fixinc.sh gsyslimits.h
+	$(STAMP) $@
+
 # Files related to the fixproto script.
 # gen-protos and fix-header are compiled with CC_FOR_BUILD, but they are only
 # used in native and host-x-target builds, so it's safe to link them with
@@ -2909,6 +2915,12 @@ stmp-fixproto: fixhdr.ready fixproto stm
 	  $(STAMP) include/fixed; \
 	fi
 	$(STAMP) stmp-fixproto
+
+# We can't run fixproto (it's being built for a different host), but we still
+# need to install it so that the user can run it when the compiler is
+# installed.
+stmp-install-fixproto: fixproto
+	$(STAMP) $@
 #
 # Remake the info files.
 
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.81
diff -u -p -u -p -r2.81 configure.ac
--- configure.ac	27 Oct 2004 16:08:48 -0000	2.81
+++ configure.ac	2 Nov 2004 21:11:06 -0000
@@ -1684,15 +1684,17 @@ then
     BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)'
 
     if test "x$TARGET_SYSTEM_ROOT" = x; then
-	STMP_FIXINC=
-	STMP_FIXPROTO=
+	STMP_FIXINC=stmp-install-fixinc
+	if [ "x$STMP_FIXPROTO" != x ] ; then
+	  STMP_FIXPROTO=stmp-install-fixproto
+	fi
     fi
 fi
 
 # When bootstrapping from the toplevel, only run fixincludes during stage1
 if test -d ../prev-gcc
 then
-    STMP_FIXINC=
+    STMP_FIXINC=stmp-install-fixinc
     cp -R ../prev-gcc/include include
 fi
 
============================================================


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