From 097dc86c45cc2f20cf98ec0385dbb57aaba419ec Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Tue, 16 Mar 2021 18:21:08 -0700 Subject: use toolchain to determine aarch64 sysroot path --- tools/test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/test.sh b/tools/test.sh index 937974b..b4e7470 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -23,12 +23,15 @@ init() { for p in aarch64-linux-musl aarch64-linux-gnu do cc="$p-gcc -no-pie" - qemu="qemu-aarch64 -L /usr/$p" + qemu="qemu-aarch64" if $cc -v >/dev/null 2>&1 && - $qemu -version >/dev/null 2>&1 && - test -d /usr/$p + $qemu -version >/dev/null 2>&1 then + if sysroot=$($cc -print-sysroot) && test -n "$sysroot" + then + qemu="$qemu -L $sysroot" + fi break fi cc= -- cgit 1.4.1