|
|
@@ -1146,10 +1146,16 @@ check_func_headers(){ |
|
|
|
for hdr in $headers; do |
|
|
|
print_include $hdr |
|
|
|
done |
|
|
|
echo "#include <stdint.h>" |
|
|
|
for func in $funcs; do |
|
|
|
echo "long check_$func(void) { return (long) $func; }" |
|
|
|
done |
|
|
|
echo "int main(void) { return 0; }" |
|
|
|
echo "int main(void) { int ret = 0;" |
|
|
|
# LTO could optimize out the test functions without this |
|
|
|
for func in $funcs; do |
|
|
|
echo " ret |= ((intptr_t)check_$func) & 0xFFFF;" |
|
|
|
done |
|
|
|
echo "return ret; }" |
|
|
|
} | check_ld "cc" "$@" && enable $funcs && enable_safe $headers |
|
|
|
} |
|
|
|
|
|
|
|