#!/bin/bash
MCF="-march=armv7ve -mfloat-abi=hard -mfpu=neon-vfpv4 -mtune=cortex-a17"
target="--target=armv7l-unknown-linux-gnueabihf"
sysroot="--sysroot=/mnt/armlfs"
CPPLIBS="-stdlib++-isystem /mnt/armlfs/usr/include/c++/12.3.0/armv7l-unknown-linux-gnueabihf \
-stdlib++-isystem /mnt/armlfs/usr/include/c++/12.3.0"
arr=()
for arg; do
if [[ $arg = *-target* ]]; then
target=
fi
if [[ $arg = --target=aarch64* ]]; then
sysroot=
MCF=
CPPLIBS=
continue
fi
if [ "$arg" == "--target=armv7-unknown-linux-gnueabihf" ]; then
arg="--target=armv7l-unknown-linux-gnueabihf"
fi
arr+=("$arg")
done
exec /usr/bin/clang++ $target $sysroot $MCF $CPPLIBS \
"${arr[@]}"
#-isystem $sysroot/usr/lib/gcc/armv7l-unknown-linux-gnueabihf/12.3.0/include \