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: Nick Clifton
Subject: Re: Can't run "install-strip" in binutils 2.18 ... ?
Date: Mon, 13 Oct 2008 10:31:29 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Hi Paul,

Is there another/better way to do this?

Not really, sorry. :-(

 I wanted to have the binutils
tools stripped when they are installed.  Typically for autoconfiscated
environments I run "make install-strip" to do this.

For binutils if I try this I get:

make: *** No rule to make target `install-strip'.  Stop.
>
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/. The top level binutils makefile is shared by the gcc and gdb projects, so any changes to it will have to be acceptable to them as well.

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.


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. For example this is what happens when I run "make install-strip" in the binutils build directory of an arm-eabi toolchain. [Edited to remove superfluous stuff]:

make INSTALL_PROGRAM="/bin/sh /work/sources/binutils/current/install-sh -c -s" \ install_sh_PROGRAM="/bin/sh /work/sources/binutils/current/install-sh -c -s" \
 INSTALL_STRIP_FLAG=-s `test -z 'strip' || \
    echo "INSTALL_PROGRAM_ENV=STRIPPROG='strip'"` install
[...]
STRIPPROG='strip' /bin/sh ./libtool --mode=install /bin/sh /work/sources/binutils/current/install-sh -c -s 'size' '/dev/shm/del-me/install/bin/arm-eabi-size' libtool: install: /bin/sh /work/sources/binutils/current/install-sh -c -s size /dev/shm/del-me/install/bin/arm-eabi-size
[...]

And libtool then installs a stripped binary into the install directory:

 % file ../install/bin/arm-eabi-readelf
../install/bin/arm-eabi-readelf: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

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.

Cheers
  Nick





reply via email to

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