-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile.sh
executable file
·40 lines (32 loc) · 780 Bytes
/
compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
set -e
HERE=$(realpath $(dirname $0))
. "${HERE}/setup.sh"
JOBS=4
_params=
while (( "$#" )); do
case "$1" in
-j)
JOBS=$2
shift
;;
*) # preserve positional arguments
_params="${_params} $1"
shift
;;
esac
done
eval set -- ${_params}
make JOBS=$JOBS -C openj9-openjdk-jdk11 all
arch="${TARGET%%-*}"
builddir="${HERE}/openj9-openjdk-jdk11/build/$(ls "${HERE}/openj9-openjdk-jdk11/build" | grep "linux-${arch}-*")"
if test "${HOST}" != "${TARGET}"; then
qemu=$(type -P qemu-${arch}-static)
if [[ -z "${qemu}" ]]; then
"WARN: no ${qemu} found, cannot test / output 'java -version'!"
else
${qemu} -L "${SYSROOT}" "${builddir}/images/jdk/bin/java" -version
fi
else
"${builddir}/images/jdk/bin/java" -version
fi