kernel/tools/testing/selftests/x86/check_cc.sh
.. .. @@ -1,13 +1,13 @@ 1 1 #!/bin/sh 2 +# SPDX-License-Identifier: GPL-2.0-only2 3 # check_cc.sh - Helper to test userspace compilation support 3 4 # Copyright (c) 2015 Andrew Lutomirski 4 -# GPL v25 5 6 6 CC="$1" 7 7 TESTPROG="$2" 8 8 shift 2 9 9 10 -if "$CC" -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then10 +if [ -n "$CC" ] && $CC -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then11 11 echo 1 12 12 else 13 13 echo 0