io: add static linking

When executing the programm the libraries were relinking to libm.so and
segfaulting
Since the libs in question are all <1MB when staticly linked this seemed like an easy workaround
To find future regression the interpreter will be called in
installCheckPhase

io: add install check
This commit is contained in:
Alwin Berger 2021-02-23 19:32:29 +01:00
parent c2b65f7f91
commit b01f6c43af
1 changed files with 11 additions and 0 deletions

View File

@ -40,6 +40,17 @@ stdenv.mkDerivation {
sed -ie \
"s/add_subdirectory(addons)/#add_subdirectory(addons)/g" \
CMakeLists.txt
# Bind Libs STATIC to avoid a segfault when relinking
sed -i 's/basekit SHARED/basekit STATIC/' libs/basekit/CMakeLists.txt
sed -i 's/garbagecollector SHARED/garbagecollector STATIC/' libs/garbagecollector/CMakeLists.txt
sed -i 's/coroutine SHARED/coroutine STATIC/' libs/coroutine/CMakeLists.txt
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/io
$out/bin/io_static
'';
# for gcc5; c11 inline semantics breaks the build