Add a check for GCC >= 4.2 and refuse to use it. It miscompiles
kernel 2.4 in a very nasty way, and it's hard to identify faulty
modules.
#endif
#endif
+#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 2
+#error "GCC >= 4.2 miscompiles kernel 2.4, do not use it!"
+#error "While the resulting kernel may boot, you will encounter random bugs"
+#error "at runtime. Only versions 2.95.3 to 4.1 are known to work reliably."
+#error "To build with another version, for instance 3.3, please do"
+#error " make bzImage CC=gcc-3.3 "
+#endif
+
/* no checker support, so we unconditionally define this as (null) */
#define __user
#define __iomem