Package: binutils
Version: 2.22-6.1
Severity: normal

debian/rules contains:
STRIP  = strip --remove-section=.comment --remove-section=.note
CROSS :=
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
  CROSS := $(DEB_HOST_GNU_TYPE)-
  CC   = $(CROSS)gcc
  CXX  = $(CROSS)g++
  STRIP= $(CROSS)strip --remove-section=.comment --remove-section=.note
  install_binary = install -m 755 -s --strip-program="$(STRIP)"
endif

If binutils is cross-built, using 
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -aarmhf -uc -us 

This results in install failing because 'install' is run with 
--strip-program="arm-linux-gnueabihf-strip  --remove-section=.comment 
--remove-section=.note"
which of course results in 'file not found', because --strip-program is 
expecting an
actual binary name.

This works on the native build because 
install_binary = install -m 755 -s 
i.e. does not include the --strip-program setting.

There is no --strip-options setting in install so far as I can see, so if this 
behvaiour
is important then I think it can only be done with a wrapper script.

I tried running arm-linux-gnueabihf-strip  --remove-section=.comment 
--remove-section=.note
on builddir-static/ld/ld-new (the file it fell over on) and the size didn't 
change so I'm not sure how important it
is to pass these options to strip? Is it really needed? If so how should we fix 
this?

The simplest thing is just to specify --strip-program as "$(CROSS)strip" when 
crossing then it all
builds fine. But I'm not sure if that is a suitable fix, as maybe that 
remove-section
stuff is important.

It's here in the rules file that the issue arises:

install-static-stamp: checkroot build-static-stamp
        $(checkdir)

        rm -fr $(d_static) $(d_udeb)
        $(install_dir) $(d_static) $(d_udeb)

        : # Copy static ld-new into /bin for both -static and -static-udeb
        $(install_dir) $(d_static)/bin
        $(install_binary) builddir-static/ld/ld-new $(d_static)/bin/ld_static
...


The same problem arises in Ubuntu quantal. 

-- System Information:
Debian Release: 6.0.5
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.33-kvm-i386-20111128-dirty (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages binutils depends on:
ii  libc6                   2.11.3-3         Embedded GNU C Library: Shared lib
ii  libgcc1                 1:4.4.5-8        GCC support library
ii  libstdc++6              4.4.5-8          The GNU Standard C++ Library v3
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

binutils recommends no packages.

Versions of packages binutils suggests:
pn  binutils-doc                  <none>     (no description available)

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to