make/toolchain.sh

changeset 289
237cb9038109
parent 285
dc13730ff1ec
equal deleted inserted replaced
288:8796f03aac26 289:237cb9038109
22 unset TOOLCHAIN_CC 22 unset TOOLCHAIN_CC
23 unset TOOLCHAIN_CXX 23 unset TOOLCHAIN_CXX
24 24
25 check_c_compiler() 25 check_c_compiler()
26 { 26 {
27 if ! command -v "$1" >/dev/null 2>&1 ; then 27 if command -v "$1" >/dev/null 2>&1 ; then
28 :
29 else
28 return 1 30 return 1
29 fi 31 fi
30 cat > "$TEMP_DIR/test.c" << __EOF__ 32 cat > "$TEMP_DIR/test.c" << __EOF__
31 /* test file */ 33 /* test file */
32 #include <stdio.h> 34 #include <stdio.h>
53 $1 -o "$TEMP_DIR/checkcc" $CFLAGS $LDFLAGS "$TEMP_DIR/test.c" 2> /dev/null 55 $1 -o "$TEMP_DIR/checkcc" $CFLAGS $LDFLAGS "$TEMP_DIR/test.c" 2> /dev/null
54 } 56 }
55 57
56 check_cpp_compiler() 58 check_cpp_compiler()
57 { 59 {
58 if ! command -v "$1" >/dev/null 2>&1 ; then 60 if command -v "$1" >/dev/null 2>&1 ; then
61 :
62 else
59 return 1 63 return 1
60 fi 64 fi
61 cat > "$TEMP_DIR/test.cpp" << __EOF__ 65 cat > "$TEMP_DIR/test.cpp" << __EOF__
62 /* test file */ 66 /* test file */
63 #include <iostream> 67 #include <iostream>

mercurial