Home | History | Annotate | Download | only in x86
      1 #!/bin/sh
      2 # check_cc.sh - Helper to test userspace compilation support
      3 # Copyright (c) 2015 Andrew Lutomirski
      4 # GPL v2
      5 
      6 CC="$1"
      7 TESTPROG="$2"
      8 shift 2
      9 
     10 if "$CC" -o /dev/null "$TESTPROG" -O0 "$@" 2>/dev/null; then
     11     echo 1
     12 else
     13     echo 0
     14 fi
     15 
     16 exit 0
     17