blob: 442f4cfb40803bf1d485083ee69b22b87d9d4602 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001cat << 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
11EOF
12[ $? -eq 0 ] && echo y || echo n