• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/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', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
20cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
21c_ld = 'lld'
22cpp_ld = 'lld'
23strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-strip'
24pkgconfig = ['/usr/bin/pkg-config']
25
26[host_machine]
27system = 'linux'
28cpu_family = '$cpu_family'
29cpu = '$cpu'
30endian = 'little'
31
32[properties]
33needs_exe_wrapper = true
34
35EOF
36