Skip to content

Commit a622a1e

Browse files
committed
build.sh: Update check for cross-compilation
Fixes: 9039d44 ("build: Move -Werror-implicit-function-declaration from make to build.sh") Signed-off-by: Petr Vorel <[email protected]>
1 parent a8d2d58 commit a622a1e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ build_native()
3636
build_cross()
3737
{
3838
local host="${CC%-gcc}"
39-
[ -n "$host" ] || \
40-
{ echo "Missing CC variable, pass it with -c option." >&2; exit 1; }
39+
if [ "$host" = "gcc" ]; then
40+
echo "Invalid CC variable for cross compilation: $CC (clang not supported)" >&2
41+
exit 1
42+
fi
4143

4244
echo "===== cross-compile ${host} ${1}-tree build into $PREFIX ====="
4345
build $1 $2 "--host=$host" CROSS_COMPILE="${host}-"

0 commit comments

Comments
 (0)