libmakepkg: skip stripping guile-2.2 files

Guile 2.2 uses ELF format for its byte-compiled files.  These are not
normal executables, and are not strippable in the normal sense.

Given these are ELF files and detected by "file" as non-stripped binaries,
it is only possible to skip these using the file path.

Fixes #73

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2024-02-10 11:51:46 +10:00
parent fface9001a
commit 48729f8ecc

View file

@ -156,6 +156,10 @@ tidy_strip() {
local binary strip_flags local binary strip_flags
find . -type f -perm -u+w -print0 2>/dev/null | LC_ALL=C sort -z | while IFS= read -rd '' binary ; do find . -type f -perm -u+w -print0 2>/dev/null | LC_ALL=C sort -z | while IFS= read -rd '' binary ; do
# skip filepaths that cause stripping issues - ideally these should be temporary
# guile-2.2
[[ "$binary" =~ .*/guile/.*\.go$ ]] && continue
local STATICLIB=0 local STATICLIB=0
case "$(LC_ALL=C readelf -h "$binary" 2>/dev/null)" in case "$(LC_ALL=C readelf -h "$binary" 2>/dev/null)" in
*Type:*'DYN (Shared object file)'*) # Libraries (.so) or Relocatable binaries *Type:*'DYN (Shared object file)'*) # Libraries (.so) or Relocatable binaries