Skip to content

Commit

Permalink
Don't strip ELF files with "no machine"
Browse files Browse the repository at this point in the history
as strip fails on them (if they are Guile object files).
This adds another layer of protection as *.go files are already filtered
out.

Resolves:  rpm-software-management#1765
  • Loading branch information
ffesti authored and mikhailnov committed Sep 30, 2021
1 parent 7427a09 commit 019adab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/brp-strip
Expand Up @@ -14,4 +14,4 @@ esac

# Strip ELF binaries
find "$RPM_BUILD_ROOT" -type f \! -regex "${RPM_BUILD_ROOT}/*usr/lib/debug.*" \! -name "*.ko" \! -name "*.go" -print0 | \
xargs -0 -r -P$NCPUS -n32 sh -c "file \"\$@\" | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | xargs -I\{\} $STRIP -g \{\}" ARG0
xargs -0 -r -P$NCPUS -n32 sh -c "file \"\$@\" | sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | grep -v 'no machine' | xargs -I\{\} $STRIP -g \{\}" ARG0

0 comments on commit 019adab

Please sign in to comment.