This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
3.4 PATCH: Define RANLIB in toplevel Makefile
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 14 Feb 2003 18:07:24 +0100 (MET)
- Subject: 3.4 PATCH: Define RANLIB in toplevel Makefile
Trying to bootstrap on IRIX 6.5.19 failed when building the target
libiberty. It tried to invoke ranlib, which doesn't exist at all on that
platform.
This happens because of the following: the configure for target libiberty
is invoked with RANLIB=$(RANLIB_FOR_TARGET), and RANLIB_FOR_TARGET is as
defined in the toplevel Makefile:
RANLIB_FOR_TARGET=$(USUAL_RANLIB_FOR_TARGET)
USUAL_RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \
else \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
if [ x'$(RANLIB)' != x ]; then \
echo $(RANLIB); \
else \
echo ranlib; \
fi; \
else \
echo ranlib | sed '$(program_transform_name)' ; \
fi; \
fi`
There's no binutils in my tree, and I'm performing a native build, so the
$(host_canonical) = $(target_canonical) test is true. $(RANLIB) is
undefined at that point (there's no definition of that variable either in
the environment or in the toplevel Makefile), so we have a x != x test
(obviously false) and RANLIB_FOR_TARGET is incorrectly set to ranlib.
The simple fix is to define RANLIB at the top level to provide a place for
the NCN_STRICT_CHECK_TOOL(RANLIB, ranlib, :) test to leave its result.
The patch below implements this and allows me to get further in the
bootstrap (still failing for other reasons, to be addressed by future
patches).
Ok for mainline and 3.3 branch?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Thu Feb 13 14:53:14 2003 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Makefile.tpl (RANLIB): Define.
* Makefile.in: Regenerate.
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.31
diff -u -p -r1.31 Makefile.tpl
--- Makefile.tpl 6 Feb 2003 20:55:11 -0000 1.31
+++ Makefile.tpl 14 Feb 2003 16:54:05 -0000
@@ -110,6 +110,7 @@ INSTALL_DATA = $(INSTALL) -m 644
AS = @AS@
AR = @AR@
AR_FLAGS = rc
+RANLIB = @RANLIB@
CC = @CC@
# Special variables passed down in EXTRA_GCC_FLAGS. They are defined