From 217af619cac6afb4ac6f7b63d78efac273b79a08 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 23 Jan 2018 13:50:45 -0500 Subject: games/z26: Add 64-bit support. Signed-off-by: B. Watson --- games/z26/statify.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 games/z26/statify.sh (limited to 'games/z26/statify.sh') diff --git a/games/z26/statify.sh b/games/z26/statify.sh new file mode 100644 index 0000000000000..91a0abd094b17 --- /dev/null +++ b/games/z26/statify.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# z26 is written partly in x86 (32-bit) assembly, so it can't be built +# for 64-bit. So the solution for running it on pure 64-bit systems is +# to use a static binary that doesn't require any 32-bit libs. + +# Run this script on a 32-bit host *with VDSO disabled*, to generate +# the binary used for the 64-bit build. + +# Notes: +# - libgcc_s.so has to be included or else z26 dumps core on exit. +# - libaoss and libasound are needed because z26 doesn't use SDL's +# sound API, it talks directly to OSS via /dev/dsp. +# - libudev is needed for SDL to detect the mouse. +# - If you run "file" on the statified binary, it looks dynamic: +# $ file /usr/games/z26 +# /usr/games/z26: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, stripped +# ...but ldd says it's "not a dynamic executable". This is normal +# for statified binaries. +# - Do not attempt to strip the statified binary. It will break. + +statifier --set=LD_PRELOAD=/usr/lib/libudev.so:/usr/lib/libaoss.so:/usr/lib/libasound.so:/usr/lib/libgcc_s.so /usr/games/z26 z26.static -- cgit v1.2.3