17ec681f3Smrg#!/bin/bash
27ec681f3Smrg
37ec681f3Smrgndk=$1
47ec681f3Smrgarch=$2
57ec681f3Smrgcpu_family=$3
67ec681f3Smrgcpu=$4
77ec681f3Smrgcross_file="/cross_file-$arch.txt"
87ec681f3Smrg
97ec681f3Smrg# armv7 has the toolchain split between two names.
107ec681f3Smrgarch2=${5:-$2}
117ec681f3Smrg
127ec681f3Smrg# Note that we disable C++ exceptions, because Mesa doesn't use exceptions,
137ec681f3Smrg# and allowing it in code generation means we get unwind symbols that break
147ec681f3Smrg# the libEGL and driver symbol tests.
157ec681f3Smrg
167ec681f3Smrgcat >$cross_file <<EOF
177ec681f3Smrg[binaries]
187ec681f3Smrgar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-ar'
197ec681f3Smrgc = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
207ec681f3Smrgcpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
217ec681f3Smrgc_ld = 'lld'
227ec681f3Smrgcpp_ld = 'lld'
237ec681f3Smrgstrip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-strip'
247ec681f3Smrgpkgconfig = ['/usr/bin/pkg-config']
257ec681f3Smrg
267ec681f3Smrg[host_machine]
277ec681f3Smrgsystem = 'linux'
287ec681f3Smrgcpu_family = '$cpu_family'
297ec681f3Smrgcpu = '$cpu'
307ec681f3Smrgendian = 'little'
317ec681f3Smrg
327ec681f3Smrg[properties]
337ec681f3Smrgneeds_exe_wrapper = true
347ec681f3Smrg
357ec681f3SmrgEOF
36