All of lore.kernel.org
 help / color / mirror / Atom feed
* Require at least gcc 4.2
@ 2009-09-01 13:44 Vladimir 'phcoder' Serbinenko
  2009-09-01 14:04 ` Bean
  2009-09-01 16:07 ` Robert Millan
  0 siblings, 2 replies; 17+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-09-01 13:44 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

It looks like grub2's codebase triggers bugs in old compiler. I don't
feel like we should support these compilers at all. Hence this patch.
If someone wants to use older compiler he's free to patch this check
out but this way he's aware that we don't support gcc prior to 4.2

-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git

[-- Attachment #2: gcc42.diff --]
[-- Type: text/plain, Size: 1043 bytes --]

diff --git a/ChangeLog b/ChangeLog
index 84dd6e4..916f581 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-01  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	Remove gcc < 4.2 support.
+
+	* configure.ac (grub_cv_cc_recent): New check.
+
 2009-08-30  Vladimir Serbinenko  <phcoder@gmail.com>
 
 	* 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 \

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-09-06 15:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-01 13:44 Require at least gcc 4.2 Vladimir 'phcoder' Serbinenko
2009-09-01 14:04 ` Bean
2009-09-01 14:12   ` Vladimir 'phcoder' Serbinenko
2009-09-01 14:19     ` Bean
2009-09-01 17:02       ` Vladimir 'phcoder' Serbinenko
2009-09-01 18:11         ` Seth Goldberg
2009-09-01 22:25         ` David Miller
2009-09-01 22:23     ` David Miller
2009-09-03 14:21       ` Robert Millan
2009-09-06 15:03         ` Neil Cafferkey
2009-09-06 15:19           ` Robert Millan
2009-09-01 16:07 ` Robert Millan
2009-09-03 14:58   ` Robert Millan
2009-09-05 21:01     ` Vladimir 'phcoder' Serbinenko
2009-09-05 21:26       ` Robert Millan
2009-09-05 22:12         ` David Miller
2009-09-06 15:05           ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.