@ -130,37 +130,51 @@ let
unpack_jar '' ${ arr [ 4 ] }
'' ;
installPhase = {
" 8 - l i n u x - a m d 6 4 " = ''
outputs = [ " o u t " " l i b " ] ;
installPhase = let
nativePRNGWorkaround = path : ''
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
substituteInPlace $ out/jre/lib/security/java.security \
substituteInPlace $ { path } \
- - replace file:/dev/random file:/dev/./urandom \
- - replace NativePRNGBlocking SHA1PRNG
'' ;
copyClibrariesToOut = basepath : ''
# provide libraries needed for static compilation
for f in $ { glibc } /lib /* $ { g l i b c . s t a t i c } / l i b / * $ { z l i b . s t a t i c } / l i b / * ; d o
ln - s $ f $ out/jre/lib/svm/clibraries / $ { platform } / $ ( basename $ f )
ln - s $ f $ { basepath } / $ { platform } / $ ( basename $ f )
done
'' ;
copyClibrariesToLib = ''
# add those libraries to $lib output too, so we can use them with
# `native-image -H:CLibraryPath=''${graalvm11-ce.lib}/lib ...` and reduce
# closure size by not depending on GraalVM $out (that is much bigger)
mkdir - p $ lib/lib
for f in $ { glibc } /lib /* ; d o
ln - s $ f $ lib/lib / $ ( basename $ f )
done
'' ;
in {
" 8 - l i n u x - a m d 6 4 " = ''
$ { nativePRNGWorkaround " $ o u t / j r e / l i b / s e c u r i t y / j a v a . s e c u r i t y " }
$ { copyClibrariesToOut " $ o u t / j r e / l i b / s v m / c l i b r a r i e s " }
$ { copyClibrariesToLib }
# allow using external truffle-api.jar and languages not included in the distrubution
rm $ out/jre/lib/jvmci/parentClassLoader.classpath
'' ;
" 1 1 - l i n u x - a m d 6 4 " = ''
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
substituteInPlace $ out/conf/security/java.security \
- - replace file:/dev/random file:/dev/./urandom \
- - replace NativePRNGBlocking SHA1PRNG
$ { nativePRNGWorkaround " $ o u t / c o n f / s e c u r i t y / j a v a . s e c u r i t y " }
# provide libraries needed for static compilation
for f in $ { glibc } /lib /* $ { g l i b c . s t a t i c } / l i b / * $ { z l i b . s t a t i c } / l i b / * ; d o
ln - s $ f $ out/lib/svm/clibraries / $ { platform } / $ ( basename $ f )
done
$ { copyClibrariesToOut " $ o u t / l i b / s v m / c l i b r a r i e s " }
$ { copyClibrariesToLib }
'' ;
" 1 1 - d a r w i n - a m d 6 4 " = ''
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
substituteInPlace $ out/conf/security/java.security \
- - replace file:/dev/random file:/dev/./urandom \
- - replace NativePRNGBlocking SHA1PRNG
$ { nativePRNGWorkaround " $ o u t / c o n f / s e c u r i t y / j a v a . s e c u r i t y " }
'' ;
} . ${ javaVersionPlatform } + ''
# jni.h expects jni_md.h to be in the header search path.