test/make/toolchain.sh

changeset 31
4c6060dad560
parent 15
971ac4f0f1df
child 35
57ea620a54ac
equal deleted inserted replaced
30:d4c38bb71fa0 31:4c6060dad560
61 return 1 61 return 1
62 fi 62 fi
63 return 0 63 return 0
64 } 64 }
65 65
66 check_lib()
67 {
68 if [ -z "$TOOLCHAIN_LD" ]; then
69 return 1
70 fi
71 cat > $TEMP_DIR/test.c << __EOF__
72 /* libtest file */
73 int main(int argc, char **argv) {
74 return 0;
75 }
76 __EOF__
77 rm -f $TEMP_DIR/checklib
78 $TOOLCHAIN_LD -o $TEMP_DIR/checklib $CFLAGS $LDFLAGS "-l$1" $TEMP_DIR/test.c 2> /dev/null
79
80 if [ $? -ne 0 ]; then
81 return 1
82 fi
83 return 0
84 }
85
66 printf "detect C compiler... " 86 printf "detect C compiler... "
67 87
68 for COMP in $C_COMPILERS 88 for COMP in $C_COMPILERS
69 do 89 do
70 check_c_compiler $COMP 90 check_c_compiler $COMP

mercurial