add code to compile compat.so to provide *_chk functions for musl
commit91899836de77b65804f30534a228aca0b122c405
authorrofl0r <retnyg@gmx.net>
Sat, 24 Dec 2016 23:10:44 +0000 (24 23:10 +0000)
committerrofl0r <retnyg@gmx.net>
Sat, 24 Dec 2016 23:10:44 +0000 (24 23:10 +0000)
treee59ad70bdb1a5555c477dd38c6942a7808ce9c80
parentdc6f244ae6c7c02515b43c70c5cf45097ba4cb5e
add code to compile compat.so to provide *_chk functions for musl

the DF 0.43.05 x86_64 binary was apparently compiled some security/debugging
feature such as -DFORTIFY_SOURCE=2 or similar, instead of optimized solely
for highest performance, so it makes use of some glibc specific
functions that are not yet available in mainstream musl.

Error relocating ./libs/Dwarf_Fortress: __stpcpy_chk: symbol not found
Error relocating ./libs/Dwarf_Fortress: __memcpy_chk: symbol not found
Error relocating ./libs/Dwarf_Fortress: __memmove_chk: symbol not found
Error relocating ./libs/Dwarf_Fortress: __strcat_chk: symbol not found
Error relocating ./libs/Dwarf_Fortress: __strcpy_chk: symbol not found
Error relocating ./libs/Dwarf_Fortress: __memset_chk: symbol not found

in order to supply these functions we must LD_PRELOAD a .so that provides
these functions.
dist/musl-glibc-compat-preload.c [new file with mode: 0644]