blob: 4590ce172a9836cb5d6f655b824a0393acd25fd9 [file] [log] [blame]
Eric Anholt0767af32020-09-09 16:37:54 -07001#!/bin/bash
2
3ndk=$1
4arch=$2
5cpu_family=$3
6cpu=$4
7cross_file="/cross_file-$arch.txt"
8
9# armv7 has the toolchain split between two names.
10arch2=${5:-$2}
11
12# Note that we disable C++ exceptions, because Mesa doesn't use exceptions,
13# and allowing it in code generation means we get unwind symbols that break
14# the libEGL and driver symbol tests.
15
16cat >$cross_file <<EOF
17[binaries]
18ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-ar'
19c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang', '-fuse-ld=lld', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
20cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang++', '-fuse-ld=lld', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
21strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-strip'
22pkgconfig = ['/usr/bin/pkg-config']
23
24[host_machine]
25system = 'linux'
26cpu_family = '$cpu_family'
27cpu = '$cpu'
28endian = 'little'
29
30[properties]
31needs_exe_wrapper = true
32
33EOF