[2.4 patch] document that gcc 4 is not supported

From: Adrian Bunk (bunk_at_stusta.de)
Date: 05/30/05

  • Next message: Andi Kleen: "Re: [RFC] x86-64: Use SSE for copy_page and clear_page"
    Date:	Mon, 30 May 2005 21:28:36 +0200
    To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
    
    

    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.

    Signed-off-by: Adrian Bunk <bunk@stusta.de>

    ---
     Documentation/Changes |    2 ++
     README                |    1 +
     init/main.c           |    7 +++++++
     3 files changed, 10 insertions(+)
    --- linux-2.4.31-rc1-full/init/main.c.old	2005-05-30 21:20:00.000000000 +0200
    +++ linux-2.4.31-rc1-full/init/main.c	2005-05-30 21:21:19.000000000 +0200
    @@ -84,6 +84,13 @@
     #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;
     
    --- linux-2.4.31-rc1-full/README.old	2005-05-30 21:21:29.000000000 +0200
    +++ linux-2.4.31-rc1-full/README	2005-05-30 21:21:59.000000000 +0200
    @@ -152,6 +152,7 @@
     
      - 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.
     
    --- linux-2.4.31-rc1-full/Documentation/Changes.old	2005-05-30 21:22:10.000000000 +0200
    +++ linux-2.4.31-rc1-full/Documentation/Changes	2005-05-30 21:22:41.000000000 +0200
    @@ -91,6 +91,8 @@
     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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Andi Kleen: "Re: [RFC] x86-64: Use SSE for copy_page and clear_page"

    Relevant Pages

    • Re: ALSA vs. OSS
      ... Loading the kernel version of the modules always fails with: ... perhaps from the compiler, which I compiled myself: ... gcc 2.95.3) and binutils 2.14. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: system gets stuck in a lock during boot
      ... on the latest kernel and seeing whether that fixes the lockup? ... 'backtrack' the bisection, ... At the moment I don't have a problem applying a patch to the ... gcc version: 4.5.0 20090730 ...
      (Linux-Kernel)
    • Re: [2.6 patch] fix DECSTATION depends
      ... And I'm actually using a 64-bit kernel on my R4k DECstations routinely -- ... currently I'm torturing it on my 5000/260 with gcc 3.4 bootstraps and it ... DECstation if it had an R4400 rev.2.0 or later. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH 1/3] Separate IRQ-stacks from 4K-stacks option
      ... Please specify exactly what gcc version you are talking about. ... 2.95.4, if I remember correctly, contained fixes that went onto the gcc ... > fix the kernel or drop gcc2 support. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: system gets stuck in a lock during boot
      ... on the latest kernel and seeing whether that fixes the lockup? ... 'backtrack' the bisection, ... At the moment I don't have a problem applying a patch to the ... gcc version: 4.5.0 20090730 ...
      (Linux-Kernel)