-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added portable musl build for jvmti-library (#315)
- Loading branch information
Showing
5 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM elastic_jni_build_java_includes:latest AS java_includes | ||
|
||
FROM dockcross/linux-arm64-musl@sha256:b3b564d2696217bb41a08228d7a0683aa8ee5f62f3cc1d4e635b35d02dbd9870 | ||
COPY --from=java_includes /java_linux /java_linux | ||
|
||
CMD $CXX -I /java_linux/include -I /java_linux/include/linux $BUILD_ARGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM elastic_jni_build_java_includes:latest AS java_includes | ||
|
||
# This image is based on the corresponding linux-musl-arm64 image definition: | ||
# https://github.com/dockcross/dockcross/blob/master/linux-arm64-musl/Dockerfile.in | ||
FROM dockcross/base@sha256:f319badff9234699e1f83b7b032deada5c69b54fc526cd848edac4b377547356 | ||
|
||
ENV XCC_PREFIX /usr/xcc | ||
ENV CROSS_TRIPLE x86_64-linux-musl | ||
ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}-cross | ||
|
||
RUN mkdir -p ${XCC_PREFIX} | ||
RUN curl --max-time 60 --retry 5 -LO http://musl.cc/${CROSS_TRIPLE}-cross.tgz | ||
|
||
# Verify that the downloaded file has not been altered via sha256 checksum | ||
RUN test "$(sha256sum -b ${CROSS_TRIPLE}-cross.tgz)" = "c5d410d9f82a4f24c549fe5d24f988f85b2679b452413a9f7e5f7b956f2fe7ea *${CROSS_TRIPLE}-cross.tgz" | ||
|
||
RUN tar -C ${XCC_PREFIX} -xvf ${CROSS_TRIPLE}-cross.tgz | ||
|
||
ENV CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ | ||
|
||
# Linux kernel cross compilation variables | ||
ENV PATH ${PATH}:${CROSS_ROOT}/bin | ||
|
||
COPY --from=java_includes /java_linux /java_linux | ||
|
||
CMD $CXX -I /java_linux/include -I /java_linux/include/linux $BUILD_ARGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters