This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA:] toplevel Makefile.in: In EXTRA_TARGET_FLAGS, passRANLIB_FOR_TARGET not RANLIB.
- To: hp at bitrange dot com
- Subject: Re: [RFA:] toplevel Makefile.in: In EXTRA_TARGET_FLAGS, passRANLIB_FOR_TARGET not RANLIB.
- From: DJ Delorie <dj at redhat dot com>
- Date: Sat, 11 Aug 2001 16:07:42 -0400
- CC: gcc-patches at gcc dot gnu dot org
- References: <Pine.BSF.4.30.0108091859350.61771-100000@dair.pair.com>
> Why special-case RANLIB as not using RANLIB_FOR_TARGET here
There are two issues:
1. Why is RANLIB special, needing the echo/sed?
2. Why isn't RANLIB_FOR_TARGET used?
I've explained what the echo/sed code does. RANLIB is one of those
commands that is sometimes there and sometimes not; that might be why
it alone has that code (especially when a host/target combo has one
with and one without). Needless, we shouldn't remove it without first
understanding the circumstances that led to it being there.
As for the second, it seems to me that RANLIB_FOR_TARGET would make more
sense, until you look at the definition of that:
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 \
t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
fi; \
fi`
It would be pointless to test that for being empty, because it never
would be. That would defeat the purpose of the echo/sed code.