| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | cat << EOF | "$STAGING_DIR_HOST/bin/g++" -c -x c++ -o /dev/null - >/dev/null 2>&1 |
| 2 | #if __clang__ | ||||
| 3 | #if __clang_major__ < $3 | ||||
| 4 | #error "clang too old" | ||||
| 5 | #endif | ||||
| 6 | #else | ||||
| 7 | #if __GNUC__ < $1 || (__GNUC__ == $1 && (__GNUC_MINOR__ < $2)) | ||||
| 8 | #error "gcc too old" | ||||
| 9 | #endif | ||||
| 10 | #endif | ||||
| 11 | EOF | ||||
| 12 | [ $? -eq 0 ] && echo y || echo n | ||||