strip in rpmbuild

Enrico Scholz enrico.scholz at informatik.tu-chemnitz.de
Sun Jun 25 09:14:01 UTC 2006


rc040203 at freenet.de (Ralf Corsepius) writes:

>> > The question is, how can i control what files are to be stripped and
>> > what "strip" to use ?
>> 
>> * | %global __strip /usr/<your-arch>/bin/strip
>> 
>>   should work
> This way, you change rpm to use the target's "strip" for stripping host
> binaries.

And? When you read the whole posting you would have seen that the
cross-binutils were configured to work both with host and target
binaries.

| $ echo 'int main() {}' >foo.c
| $ gcc foo.c -o foo-host
| $ arm-xscale-linux-gnu-gcc foo.c -o foo-target
| $ arm-xscale-linux-gnu-strip foo-host
| $ arm-xscale-linux-gnu-strip foo-target


>> * you could try to inject something like
>> 
>>   | PATH=/usr/<cross-arch>/bin:$PATH
>> 
>>   e.g. at the end of %install (don't know whether that works; perhaps
>>   you have to play with %__spec_install_post). Using such a path will
>>   cover tools like objdump
> Definitely no.
>
> Putting /usr/<cross-arch>/bin in $PATH will render cross toolchains
> unusable and will confuse configure scripts.

Please learn a little bit about rpm packaging. "the end of %install" and
%__spec_install_post will be expanded after the %configure call...


>> * you should build your cross binutils with
>> 
>>   | --enable-targets=<cross-arch>,%_host
>> 
>>   to make the tools work with host binaries.
>
> All you are doing here, is making binutils aware about several targets, 
>
> I fail to see what this would be useful for,

You should really read the whole posting and not only single phrases...



Enrico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 480 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20060625/ed959cd6/attachment.sig>


More information about the fedora-devel-list mailing list