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
(cherry picked from commit 3161ce3)
  • Loading branch information
ffesti authored and dmnks committed Jun 7, 2022
1 parent 3d59f60 commit fe4ebf3
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 fe4ebf3

Please sign in to comment.