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]

Re: [RFA:] toplevel Makefile.in: In EXTRA_TARGET_FLAGS, passRANLIB_FOR_TARGET not RANLIB.



> 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.


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