The modern glibc from 2.34 had two breaking changes: move all api in lib{pthread,dl,rt}.so into libc.so, new static start up code breaking the runtime compatibility for old glibc (<2.34). See https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread for more info.
This commit has 3 changes to overcome these changes:
- override gcc path to redefine glibc symbols on the fly in the generated .o by graalvm when linking
- provide a dynamic startup code to support both old and modern runtime glibc
- add needed dynamic libraries: lib{pthread,rt,dl}.so.
* Add script mvnd-auto to auto select native or pure java mvnd
* Move fallback logic into main entry script
1. rename native binary to 'mvnd-native-<os>-<arch>'
2. add environment switch MVND_ENTRY_FALLBACK, default 'true' enables
the fallback logic, set to 'false' to force execute the native mvnd.
3. rename mvnd.sh to mvnd
* change entry name on windows
* Add script mvnd-persist-native for moving the native image to the default entry path
* improve platform detect
* fix error on dash
* rollback default entry to the native image
* use MVND_CLIENT switch to control the selection of mvnd client
* improve comment docs as suggestion
* Use muti-release jar to fallback mvnd-client to original maven
The mvnd-client is built to a muti-release jar. The default version of
DefaultClient is compiled against the same target version as the
embedded maven (4.x, so JDK 1.8) which only invoke the MavenCli.main().
The java-11 version is the full qualified mvnd-client.
* update cmd scripts
* embedded maven now works under JDK 1.8
Build SimpleAppender for JDK 1.8 since it is the log appender only
for the embedded maven
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
* Improve reproducibility of builds by using digest on docker images
* Inline the manifest Multi-Release entry
* Remove unused files
* Switch the groupId to org.apache.maven.daemon and use maven parent pom
* Fix distribution
* Fix ITs
* Fix native build for windows