Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 # SPDX-License-Identifier: GPL-2.0-only
0003 # check_cc.sh - Helper to test userspace compilation support
0004 # Copyright (c) 2015 Andrew Lutomirski
0005 
0006 CC="$1"
0007 TESTPROG="$2"
0008 shift 2
0009 
0010 if [ -n "$CC" ] && $CC -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then
0011     echo 1
0012 else
0013     echo 0
0014 fi
0015 
0016 exit 0