How to prevent a binary from being stripped by rpmbuild?

Josh Boyer jwboyer at gmail.com
Sat Dec 10 02:34:16 UTC 2011


On Fri, Dec 9, 2011 at 7:32 PM, David Howells <dhowells at redhat.com> wrote:
>
> Hi,
>
> How do I prevent rpmbuild from attempting to strip a particular binary?  The
> problem is that the binary was cross-compiled and is not of the same
> architecture as the normal Fedora binutils.  Thus the strip program used (from
> the wrong binutils) appears to corrupt the binary.

You probably need to disable debuginfo packages if that is the case.
You might also want to redefine %{__strip} to the appropriate
cross-strip utility, or /bin/true.  Something like:

%define debug_package %{nil}
%define __strip /bin/true

josh


More information about the devel mailing list