OSDN Git Service

[PATCH] document that gcc 4 is not supported
authorAdrian Bunk <bunk@stusta.de>
Fri, 6 Jan 2006 20:37:27 +0000 (21:37 +0100)
committerMarcelo Tosatti <marcelo@dmt.cnet>
Tue, 17 Jan 2006 10:03:11 +0000 (08:03 -0200)
gcc 4 is not supported for compiling kernel 2.4, and I don't see any
compelling reason why kernel 2.4 should ever be adapted to gcc 4.

This patch documents this fact.

Without this patch, your screen is flooded with warnings and errors when
accidentially trying to compile kernel 2.4 with gcc 4.

With this patch, the same happens, but the last lines contain the
explanation
  #error Sorry, your GCC is too recent for kernel 2.4

If someone makes a patch to fix all issues with gcc 4, adding the
removal of this #error should be the most trivial part of the patch.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Documentation/Changes
README
init/main.c

index 8f84822..fce16f7 100644 (file)
@@ -91,6 +91,8 @@ The Red Hat gcc 2.96 compiler subtree can also be used to build this tree.
 You should ensure you use gcc-2.96-74 or later. gcc-2.96-54 will not build
 the kernel correctly.
 
+gcc 4 is not supported.
+
 In addition, please pay attention to compiler optimization.  Anything
 greater than -O2 may not be wise.  Similarly, if you choose to use gcc-2.95.x
 or derivatives, be sure not to use -fstrict-aliasing (which, depending on
diff --git a/README b/README
index 9cf6bbf..437f460 100644 (file)
--- a/README
+++ b/README
@@ -152,6 +152,7 @@ COMPILING the kernel:
 
  - Make sure you have gcc 2.95.3 available.  gcc 2.91.66 (egcs-1.1.2) may
    also work but is not as safe, and *gcc 2.7.2.3 is no longer supported*.
+   gcc 4 is *not* supported.
    Also remember to upgrade your binutils package (for as/ld/nm and company)
    if necessary. For more information, refer to ./Documentation/Changes.
 
index a1d0841..dea01bf 100644 (file)
@@ -84,6 +84,13 @@ extern int irda_device_init(void);
 #error Sorry, your GCC is too old. It builds incorrect kernels.
 #endif
 
+/*
+ * gcc >= 4 is not supported by kernel 2.4
+ */
+#if __GNUC__ > 3
+#error Sorry, your GCC is too recent for kernel 2.4
+#endif
+
 extern char _stext, _etext;
 extern char *linux_banner;