1 #!/bin/sh 1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0-only 2 # SPDX-License-Identifier: GPL-2.0-only 3 # check_cc.sh - Helper to test userspace compi 3 # check_cc.sh - Helper to test userspace compilation support 4 # Copyright (c) 2015 Andrew Lutomirski 4 # Copyright (c) 2015 Andrew Lutomirski 5 5 6 CC="$1" 6 CC="$1" 7 TESTPROG="$2" 7 TESTPROG="$2" 8 shift 2 8 shift 2 9 9 10 if [ -n "$CC" ] && $CC -o /dev/null "$TESTPROG 10 if [ -n "$CC" ] && $CC -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then 11 echo 1 11 echo 1 12 else 12 else 13 echo 0 13 echo 0 14 fi 14 fi 15 15 16 exit 0 16 exit 0
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.