From: Mark Wooding Date: Wed, 22 Apr 2020 21:46:50 +0000 (+0100) Subject: src/crosstool.in: Introduce new tools to invoke the chosen compiler. X-Git-Url: https://git.distorted.org.uk/~mdw/mdw-cross/commitdiff_plain/3578ba96ec5ce320a7bfe3ce0c63fdcec9c4bb3e src/crosstool.in: Introduce new tools to invoke the chosen compiler. --- diff --git a/src/crosstool.in b/src/crosstool.in index 955358d..001f5e2 100644 --- a/src/crosstool.in +++ b/src/crosstool.in @@ -1,6 +1,12 @@ #! /bin/sh -e tool=${0##*/cross-} +case $tool,${CROSS_COMPILER-gcc} in + cc,gcc) tool=gcc ;; + c++,gcc) tool=g++ ;; + cc,clang) tool=clang ;; + c++,clang) tool=clang++ ;; +esac xtool=$(printf %s "$tool" | tr -c a-zA-Z0-9 x) eval flags=\$CROSS_${xtool}_FLAGS diff --git a/tools/cross-c++ b/tools/cross-c++ new file mode 120000 index 0000000..ee678c4 --- /dev/null +++ b/tools/cross-c++ @@ -0,0 +1 @@ +../bin/crosstool \ No newline at end of file diff --git a/tools/cross-cc b/tools/cross-cc new file mode 120000 index 0000000..ee678c4 --- /dev/null +++ b/tools/cross-cc @@ -0,0 +1 @@ +../bin/crosstool \ No newline at end of file