summaryrefslogtreecommitdiff
path: root/lib/mesa/.gitlab-ci/container/debian/android_build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/.gitlab-ci/container/debian/android_build.sh')
-rw-r--r--lib/mesa/.gitlab-ci/container/debian/android_build.sh50
1 files changed, 48 insertions, 2 deletions
diff --git a/lib/mesa/.gitlab-ci/container/debian/android_build.sh b/lib/mesa/.gitlab-ci/container/debian/android_build.sh
index 88c05af4e..121976f1b 100644
--- a/lib/mesa/.gitlab-ci/container/debian/android_build.sh
+++ b/lib/mesa/.gitlab-ci/container/debian/android_build.sh
@@ -3,6 +3,7 @@
set -ex
EPHEMERAL="\
+ autoconf \
rdfind \
unzip \
"
@@ -29,7 +30,7 @@ sh .gitlab-ci/container/create-android-cross-file.sh /$ndk arm-linux-androideabi
# Not using build-libdrm.sh because we don't want its cleanup after building
# each arch. Fetch and extract now.
-export LIBDRM_VERSION=libdrm-2.4.102
+export LIBDRM_VERSION=libdrm-2.4.110
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.xz
tar -xf $LIBDRM_VERSION.tar.xz && rm $LIBDRM_VERSION.tar.xz
@@ -50,11 +51,56 @@ for arch in \
-Detnaviv=false \
-Dfreedreno=false \
-Dintel=false \
- -Dcairo-tests=false
+ -Dcairo-tests=false \
+ -Dvalgrind=false
ninja -C build-$arch install
cd ..
done
rm -rf $LIBDRM_VERSION
+export LIBELF_VERSION=libelf-0.8.13
+wget https://fossies.org/linux/misc/old/$LIBELF_VERSION.tar.gz
+
+# Not 100% sure who runs the mirror above so be extra careful
+if ! echo "4136d7b4c04df68b686570afa26988ac ${LIBELF_VERSION}.tar.gz" | md5sum -c -; then
+ echo "Checksum failed"
+ exit 1
+fi
+
+tar -xf ${LIBELF_VERSION}.tar.gz
+cd $LIBELF_VERSION
+
+# Work around a bug in the original configure not enabling __LIBELF64.
+autoreconf
+
+for arch in \
+ x86_64-linux-android \
+ i686-linux-android \
+ aarch64-linux-android \
+ arm-linux-androideabi ; do
+
+ ccarch=${arch}
+ if [ "${arch}" == 'arm-linux-androideabi' ]
+ then
+ ccarch=armv7a-linux-androideabi
+ fi
+
+ export CC=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ar
+ export CC=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}29-clang
+ export CXX=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${ccarch}29-clang++
+ export LD=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ld
+ export RANLIB=/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch}-ranlib
+
+ # The configure script doesn't know about android, but doesn't really use the host anyway it
+ # seems
+ ./configure --host=x86_64-linux-gnu --disable-nls --disable-shared \
+ --libdir=/usr/local/lib/${arch}
+ make install
+ make distclean
+done
+
+cd ..
+rm -rf $LIBELF_VERSION
+
apt-get purge -y $EPHEMERAL