summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2023-11-08 00:56:53 +0100
committerAndreas Fankhauser hiddenalpha.ch2023-11-08 00:56:53 +0100
commitb6f61c252329ed222fcf7a254b4e83beb78fa0ce (patch)
treedcbc01e1c0056bc8d880d60d6e809a440b6834df
parentbf32886848adf2a455fe0533e57632fd6b8f13eb (diff)
downloadUnspecifiedGarbage-b6f61c252329ed222fcf7a254b4e83beb78fa0ce.zip
UnspecifiedGarbage-b6f61c252329ed222fcf7a254b4e83beb78fa0ce.tar.gz
Add some notes about jssc build (but see github jssc)
-rw-r--r--doc/note/qemu/build-jssc.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/note/qemu/build-jssc.txt b/doc/note/qemu/build-jssc.txt
new file mode 100644
index 0000000..3acdf6e
--- /dev/null
+++ b/doc/note/qemu/build-jssc.txt
@@ -0,0 +1,41 @@
+
+This is only another copy. Likely we should use the one at
+https://github.com/hiddenalpha/jssc/blob/master/contrib/hiddenalpha-buildEnv-one
+.
+
+true `# Configure for debian 9` \
+ && CXX="g++" \
+ && CFLAGS="-fPIC -Wall -pedantic -Werror \
+ -Wno-error=long-long \
+ -Wno-error=sign-compare \
+ -Wno-error=variadic-macros \
+ -Wno-long-long" \
+ && targets="linux_64" \
+ && SUDO= \
+ && true
+
+true `# Setup` \
+ && $SUDO apt install -y --no-install-recommends \
+ git openjdk-8-jdk-headless g++ maven \
+ && true
+
+true `# Make` \
+ && cat contrib/hiddenalpha-buildEnv-one/res/pom.patch | git apply \
+ && mvn clean \
+ && mvn -PnoCmake compile \
+ && printf '%s "%s"\n' "#define JSSC_VERSION" "$(git describe --tags|sed 's,^v,,')" \
+ > src/main/cpp/version.h \
+ && mkdir -p src/main/resources-precompiled/natives/linux_64 \
+ && g++ $CFLAGS -shared \
+ -o src/main/resources-precompiled/natives/linux_64/libjssc.so \
+ src/main/cpp/_nix_based/jssc.cpp \
+ -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include \
+ -I/usr/lib/jvm/java-1.8.0-openjdk-amd64/include/linux \
+ -Isrc/main/cpp \
+ && for T in ${targets:?}; do
+ && mvn -PnoCmake -PnoJavah -PnativeJar -P"${T:?}" package \
+ ;done \
+ && mvn -PnoCmake -PnoJavah -PnoNatives -PwithTestClasspath verify \
+ && true
+
+