git » mk-builders.git » main » tree

[main] / bc64-usr-a32 / rustc

#!/bin/bash
target_next=
sysroot=/usr
A7F="-C target-cpu=cortex-a17"
FLAGS=
for arg; do
	if [ -n "$target_next" ]; then
		if [[ $arg = armv7* ]]; then
			sysroot=/mnt/armlfs/usr
			FLAGS="$A7F"
		fi
		target_next=
		continue
	fi
	if [ "$arg" = "--target" ]; then
		target_next=1
		continue
	fi
	if [[ $arg = --target=armv7* ]]; then
		sysroot=/mnt/armlfs/usr
		FLAGS="$A7F"
	fi
done
exec /usr/bin/rustc --sysroot=$sysroot $FLAGS "$@"