From fbc57885369315d1051fe19e37869e8174f90df8 Mon Sep 17 00:00:00 2001 From: law Date: Mon, 18 May 1998 01:24:26 +0000 Subject: [PATCH 1/1] * Makefile.in (TARGET_TOOLPREFIX): No longer define. (AR_FOR_TARGET, RANLIB_FOR_TARGET): Define to use versions in the build tree if they exist. (AR, AR_FLAGS, OLDAR, OLDAR_FLAGS, RANLIB, RANLIB_TEST): Update appropriately. (objdir): Let configure substitute value. (FLOAT_H): Let configure select a pre-built version from the config subdir. * build-make (INSTALL_TARGET, ALL): Disable, no longer needed. * configure.in: Substitute for objdir. * cp/Makefile.in (program_transform_name, objdir): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19828 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 11 +++++++++++ gcc/Makefile.in | 50 +++++++++++++++++++++++++++++++++++++++++++++----- gcc/build-make | 4 ++-- gcc/configure | 5 +++++ gcc/configure.in | 4 ++++ gcc/cp/ChangeLog | 2 ++ gcc/cp/Makefile.in | 6 ++++++ 7 files changed, 75 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 94d3c2c93a4..c4dca038bf7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,16 @@ Mon May 18 01:23:33 1998 Jeffrey A Law (law@cygnus.com) + * Makefile.in (TARGET_TOOLPREFIX): No longer define. + (AR_FOR_TARGET, RANLIB_FOR_TARGET): Define to use versions in + the build tree if they exist. + (AR, AR_FLAGS, OLDAR, OLDAR_FLAGS, RANLIB, RANLIB_TEST): Update + appropriately. + (objdir): Let configure substitute value. + (FLOAT_H): Let configure select a pre-built version from the + config subdir. + * build-make (INSTALL_TARGET, ALL): Disable, no longer needed. + * configure.in: Substitute for objdir. + * Makefile.in (build_canonical, host_canonical): Let configure substitute values for these variables. * configure.in: Substitute for build_canonical, host_canonical diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 029ed142f4b..fc580666773 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -177,12 +177,49 @@ host_canonical = @host_canonical@ # These are used because `configure' appends `cross-make' # to the makefile when making a cross-compiler. -TARGET_TOOLPREFIX = $(tooldir)/bin/ -AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar +# Use the tools from the build tree, if they are available. + +# objdir is set by configure. +objdir = @objdir@ + +AR_FOR_TARGET = ` \ + if [ -f $(objdir)/../binutils/ar ] ; then \ + echo $(objdir)/../binutils/ar ; \ + else \ + if [ "$(host_canonical)" = "$(target)" ] ; then \ + echo ar; \ + else \ + t='$(program_transform_name)'; echo ar | sed -e $$t ; \ + fi; \ + fi` AR_FOR_TARGET_FLAGS = rc -RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib -RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ] - +RANLIB_FOR_TARGET = ` \ + if [ -f $(objdir)/../binutils/ranlib ] ; then \ + echo $(objdir)/../binutils/ranlib ; \ + else \ + if [ "$(host_canonical)" = "$(target)" ] ; then \ + echo ranlib; \ + else \ + t='$(program_transform_name)'; echo ranlib | sed -e $$t ; \ + fi; \ + fi` +RANLIB_TEST_FOR_TARGET = \ + [ -f $(RANLIB_FOR_TARGET) ] \ + || ( [ "$(host_canonical)" = "$(target)" ] \ + && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ) + +# We always act like a cross-compiler, even when we're +# compiling native. This is because we want to use our own tools if +# we can. We don't just set RANLIB to a complicated expression, +# because the top level Makefile.in might override RANLIB_FOR_TARGET. +# These are from the FSF file "cross-make". +AR = $(AR_FOR_TARGET) +AR_FLAGS = $(AR_FOR_TARGET_FLAGS) +OLDAR = $(AR_FOR_TARGET) +OLDAR_FLAGS = $(AR_FOR_TARGET_FLAGS) +RANLIB = $(RANLIB_FOR_TARGET) +RANLIB_TEST = $(RANLIB_TEST_FOR_TARGET) + # Dir to search for system headers. Overridden by cross-make. SYSTEM_HEADER_DIR = /usr/include @@ -440,6 +477,9 @@ INSTALL_TARGET=install-normal # Source for float.h. Overridden by cross-make. FLOAT_H=float.h-nat +# We do not try to build float.h anymore. Let configure select the +# appropriate pre-built float.h file for the target. +FLOAT_H=$(srcdir)/config/float-@float_format@.h # Setup the testing framework, if you have one EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \ diff --git a/gcc/build-make b/gcc/build-make index 116d579ba66..f9049ae0db9 100644 --- a/gcc/build-make +++ b/gcc/build-make @@ -28,8 +28,8 @@ FIXINCLUDES=Makefile.in STMP_FIXPROTO = # Cause installation using install-build. We do nothing here. -INSTALL_TARGET = install-build +#INSTALL_TARGET = install-build # Don't try to compile the things we can't compile or we have made # while making gcc with the cross-compiler. -ALL = all.build +#ALL = all.build diff --git a/gcc/configure b/gcc/configure index c88ad6e78c8..0fad95147ef 100755 --- a/gcc/configure +++ b/gcc/configure @@ -5254,6 +5254,10 @@ if [ x$enable_haifa != x ]; then done fi +# Nothing to do for FLOAT_H, float_format already handled. +objdir=`pwd` + + # Process the language and host/target makefile fragments. ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" @@ -5515,6 +5519,7 @@ s%@target_subdir@%$target_subdir%g s%@inhibit_libc@%$inhibit_libc%g s%@sched_prefix@%$sched_prefix%g s%@sched_cflags@%$sched_cflags%g +s%@objdir@%$objdir%g s%@subdirs@%$subdirs%g s%@all_languages@%$all_languages%g s%@all_boot_languages@%$all_boot_languages%g diff --git a/gcc/configure.in b/gcc/configure.in index 0ee19c4b545..41917f4472c 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -3410,6 +3410,10 @@ if [[ x$enable_haifa != x ]]; then done fi +# Nothing to do for FLOAT_H, float_format already handled. +objdir=`pwd` +AC_SUBST(objdir) + # Process the language and host/target makefile fragments. ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7c7c44fe435..17701ecf1ac 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com) + * Makefile.in (program_transform_name, objdir): Define. + * Makefile.in (BISON): Use bison from the build tree if it exists. (FLEX): Similarly. diff --git a/gcc/cp/Makefile.in b/gcc/cp/Makefile.in index 6ce522722b2..0a53c69e3d9 100644 --- a/gcc/cp/Makefile.in +++ b/gcc/cp/Makefile.in @@ -83,6 +83,12 @@ GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) # These are used because `configure' appends `cross-make' # to the makefile when making a cross-compiler. +# We don't use cross-make. Instead we use the tools +# from the build tree, if they are available. +# program_transform_name and objdir are set by configure.in. +program_transform_name = +objdir = . + target=@target@ xmake_file=@dep_host_xmake_file@ tmake_file=@dep_tmake_file@ -- 2.11.0