From fc41d4bec00198b5bd14a55ce7a533d69596e19c Mon Sep 17 00:00:00 2001 From: Marc Date: Mon, 21 Feb 2022 11:33:38 +0100 Subject: [PATCH] static compilation --- nodejs/build.sh | 9 +++++++-- osLoader/build.sh | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nodejs/build.sh b/nodejs/build.sh index 40d28d3..dcba376 100755 --- a/nodejs/build.sh +++ b/nodejs/build.sh @@ -5,7 +5,7 @@ then echo "Please don't run this as root" exit fi -VERSION=17.1.0 +VERSION=17.5.0 if [ ! -f src/node-$VERSION/Makefile ] then @@ -18,8 +18,13 @@ unzip $VERSION.zip || exit 1 cd - fi +echo "building" +#LD_LIBRARY_PATH=$(pwd)/../rootfs/lib:$(pwd)/../rootfs/lib64:$(pwd)/../rootfs/usr/lib:$(pwd)/../rootfs/usr/lib32:$(pwd)/../rootfs/usr/lib64:/lib:$(pwd)/lib64:$(pwd)/usr/lib:$(pwd)/usr/lib32:$(pwd)/usr/lib64 cd src/node-$VERSION -./configure --prefix=/usr || exit 1 +#https://github.com/nodejs/node/issues/41497 +./configure --prefix=/usr --fully-static --enable-static || exit 1 +for i in out/tools/v8_gypfiles/gen-regexp-special-case.target.mk out/test_crypto_engine.target.mk; do +sed -i 's/\-static//g' $i || echo "nevermind"; done make -j$(nproc) || exit 1 cd - diff --git a/osLoader/build.sh b/osLoader/build.sh index a2595c6..10b9465 100755 --- a/osLoader/build.sh +++ b/osLoader/build.sh @@ -4,4 +4,4 @@ then echo "Please don't run this as root" exit fi -gcc osLoader.c -O3 -o init +gcc osLoader.c -static -O3 -o init