From f4e414f14a62c8c12a11b7815ede0fd8f09005dc Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 15 Jan 1993 18:32:04 +0000 Subject: [PATCH] Fri Jan 15 10:27:02 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (GCC_FLAGS_TO_PASS): New variable. (all-gcc, install-gcc, subdir_do): Use it. --- ChangeLog | 5 +++++ Makefile.in | 43 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b11464b1f..0834308377 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jan 15 10:27:02 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (GCC_FLAGS_TO_PASS): New variable. + (all-gcc, install-gcc, subdir_do): Use it. + Wed Jan 13 17:06:45 1993 Jim Wilson (wilson@sphagnum.cygnus.com) * Makefile.in: Rename uninstalled gcc driver from gcc to xgcc. diff --git a/Makefile.in b/Makefile.in index 30c9af9a2f..e6a104e964 100644 --- a/Makefile.in +++ b/Makefile.in @@ -226,6 +226,36 @@ TARGET_FLAGS_TO_PASS = \ "prefix=$(prefix)" \ "tooldir=$(tooldir)" +# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it +# unfortunately needs the native compiler and the target ar and +# ranlib. Keep these in alphabetical order, please. +GCC_FLAGS_TO_PASS = \ + "AR=$(AR_FOR_TARGET)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ + "AS=$(AS)" \ + "BISON=$(BISON)" \ + "CXX=$(CXX)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "CC=$(CC)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CFLAGS=$(CFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "LDFLAGS=$(LDFLAGS)" \ + "LEX=$(LEX)" \ + "LOADLIBES=$(LOADLIBES)" \ + "MAKEINFO=$(MAKEINFO)" \ + "NM=$(NM)" \ + "RANLIB=$(RANLIB_FOR_TARGET)" \ + "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ + "XTRAFLAGS=$(XTRAFLAGS)" \ + "exec_prefix=$(exec_prefix)" \ + "prefix=$(prefix)" \ + "tooldir=$(tooldir)" + # The first rule in the file had better be this one. Don't put any above it. all: $(ALL) @@ -655,8 +685,9 @@ install-flex: force all-gcc: all-libiberty all-byacc all-binutils @if [ -f ./gcc/Makefile ] ; then \ rootme=`pwd` ; export rootme ; \ + srcroot=`cd $(srcdir); pwd` ; export srcroot ; \ (cd ./gcc; \ - $(MAKE) $(FLAGS_TO_PASS) all) ; \ + $(MAKE) $(GCC_FLAGS_TO_PASS) all) ; \ else \ true ; \ fi @@ -664,8 +695,9 @@ all-gcc: all-libiberty all-byacc all-binutils install-gcc: force @if [ -f ./gcc/Makefile ] ; then \ rootme=`pwd` ; export rootme ; \ + srcroot=`cd $(srcdir); pwd` ; export srcroot ; \ (cd ./gcc; \ - $(MAKE) $(FLAGS_TO_PASS) install) ; \ + $(MAKE) $(GCC_FLAGS_TO_PASS) install) ; \ else \ true ; \ fi @@ -1277,6 +1309,13 @@ subdir_do: else exit 1 ; fi \ ;; \ $(end-sanitize-chill) \ + gcc) \ + if (rootme=`pwd` ; export rootme ; \ + srcroot=`cd $(srcdir); pwd` ; export srcroot ; \ + cd ./$$i ; \ + $(MAKE) $(GCC_FLAGS_TO_PASS) $(DO)) ; then true ; \ + else exit 1 ; fi \ + ;; \ *) \ if (rootme=`pwd` ; export rootme ; \ cd ./$$i ; \