summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2018-04-20 19:46:16 +0200
committerAllan McRae <allan@archlinux.org>2018-05-12 14:57:47 +0200
commit03272ad57142a1c7dacf1d9933d52650d3936225 (patch)
tree42d81c805b276cdc680d71691d14448e379c21c2 /scripts
parent40937b381abd013cf3473af4ea04bf52fecf0854 (diff)
downloadpacman-03272ad57142a1c7dacf1d9933d52650d3936225.tar.gz
pacman-03272ad57142a1c7dacf1d9933d52650d3936225.tar.xz
libmakepkg: Support file 5.33's application/x-pie-executable
file 5.33 introduces a new MIME type "application/x-pie-executable", which is used for relocatable binaries. makepkg ignored these binaries and did not attempt to strip them. Handle the new MIME type like the old "application/x-sharedlib". Stripping the binaries with --strip-unneeded to keep relocation information should be the correct thing to do. file 5.33 also misidentifies actual libraries as PIE executables, so we didn't strip any shared libraries, either. We now work around this bug. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/libmakepkg/tidy/strip.sh.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in
index e20114c0..36d1b89e 100644
--- a/scripts/libmakepkg/tidy/strip.sh.in
+++ b/scripts/libmakepkg/tidy/strip.sh.in
@@ -125,6 +125,8 @@ tidy_strip() {
esac;;
*application/x-executable*) # Binaries
strip_flags="$STRIP_BINARIES";;
+ *application/x-pie-executable*) # Relocatable binaries
+ strip_flags="$STRIP_SHARED";;
*)
continue ;;
esac