makepkg: fix stripping of relocatable binaries with binutils>=2.37

Binutils commit 93df3340fd5ad32f784214fc125de71811da72ff enabled readelf
to report "Position-Independent Executable" files.  Fix stripping to
account for this change.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2021-08-04 18:52:08 +10:00
parent b4383b8d00
commit a193979cb6

View file

@ -135,6 +135,8 @@ tidy_strip() {
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
strip_flags="$STRIP_SHARED";; strip_flags="$STRIP_SHARED";;
*Type:*'DYN (Position-Independent Executable file)'*) # Relocatable binaries
strip_flags="$STRIP_SHARED";;
*Type:*'EXEC (Executable file)'*) # Binaries *Type:*'EXEC (Executable file)'*) # Binaries
strip_flags="$STRIP_BINARIES";; strip_flags="$STRIP_BINARIES";;
*Type:*'REL (Relocatable file)'*) # Libraries (.a) or objects *Type:*'REL (Relocatable file)'*) # Libraries (.a) or objects