bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't run "install-strip" in binutils 2.18 ... ?


From: Paul Smith
Subject: Re: Can't run "install-strip" in binutils 2.18 ... ?
Date: Mon, 13 Oct 2008 11:24:07 -0400

On Mon, 2008-10-13 at 10:31 +0100, Nick Clifton wrote:
> > It looks like the top-level makefile in binutils doesn't grok the
> > install-strip target.
> 
> Correct.  If you are really miffed by this, please file a bug report at
> http://sourceware.org/bugzilla/.

OK thanks!

> > However if I look at the individual targets like
> > the binutils subdirectory, they do have install-strip.
> 
> True.  I am hoping that this is sufficient for your purposes.

See below.  So far I've had to use "make install" then run the strip
operation by hand afterwards.

> > On the gripping hand, though, I'm trying to cross-compile binutils and
> > it doesn't work to cd directly to binutils-2.18/binutils and run "make
> > install-strip" then it tries to use the "strip" command (which fails)
> > instead of the cross-strip program, because the sub-makefiles expect the
> > cross-tools to be provided as command-line overrides on the make
> > invocation.
> 
> When I tried this on my machine it worked without any problems.  I am 
> not sure exactly what you mean when you complain that it uses the 
> "strip" command instead of the cross-strip program, since surely it is 
> the host's strip command that should be used.

Sorry, I wasn't explicit enough.  When I say "cross-compile binutils", I
mean exactly that: I'm building binutils with a cross-compiler, so that
the resulting executable will run on a different architecture.  I don't
mean that I'm building binutils to BE part of a cross-compiler: in that
case you're right, I'd need to use the host's strip command.

What I'm doing is building binutils on Intel but I want it to run on
PPC.  Thus, the resulting binaries are PPC binaries and in order to
strip them I need to use the cross-compiler's "strip" command, not the
native system's "strip".

> According to a comment in the binutils/configure file you can also use 
> the environment variable STRIP to override the strip program used when 
> installing stripped binaries.

This is exactly what I did: I set STRIP='powerpc-linux-gnu-strip' in the
environment before I invoked configure.  In the top-level makefile, I
see that the STRIP variable has been set to powerpc-linux-gnu-strip.  I
also see that when the top-level makefile invokes the sub-makes, it
sends that value (along with CC and the rest of it) to the sub-makes as
overrides on the command line.

But, when I look at the binutils/Makefile, I see that the STRIP variable
is simply set to "strip", not the cross-compiler version of "strip".  So
if I invoke "make install-strip" directly from within the binutils
subdirectory rather than from the top level, the cross-compiler version
of STRIP is not set and it tries to use "strip" instead... which fails.

Cheers!

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]