diff --git a/ChangeLog b/ChangeLog index 84dd6e4..916f581 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-09-01 Vladimir Serbinenko
+ + Remove gcc < 4.2 support. + + * configure.ac (grub_cv_cc_recent): New check. + 2009-08-30 Vladimir Serbinenko * kern/file.c (grub_file_read): Spelling fix diff --git a/configure.ac b/configure.ac index cddd9fe..cb389a5 100644 --- a/configure.ac +++ b/configure.ac @@ -213,6 +213,15 @@ CPPFLAGS="$TARGET_CPPFLAGS" LDFLAGS="$TARGET_LDFLAGS" LIBS="" +AC_CACHE_CHECK([whether gcc is recent enough], grub_cv_cc_recent, [ + CFLAGS= + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#if defined (__GNUC__) && (__GNUC__ < 4 || __GNUC_MINOR__ < 2) +#error Use at least GCC 4.2 +#endif +]], [[]])],[grub_cv_cc_recent=yes],[grub_cv_cc_recent=no]) ]) +test "x$grub_cv_cc_recent" = xyes || AC_MSG_ERROR([GCC >= 4.2 is required]) + if test "x$TARGET_CFLAGS" = x; then # debug flags. TARGET_CFLAGS="-Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes \