public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.4 patch] document that gcc 4 is not supported
@ 2005-05-30 19:28 Adrian Bunk
  2005-05-30 19:53 ` Mikael Pettersson
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2005-05-30 19:28 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel

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


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

* Re: [2.4 patch] document that gcc 4 is not supported
  2005-05-30 19:28 [2.4 patch] document that gcc 4 is not supported Adrian Bunk
@ 2005-05-30 19:53 ` Mikael Pettersson
  2005-05-30 20:13   ` Adrian Bunk
  0 siblings, 1 reply; 6+ messages in thread
From: Mikael Pettersson @ 2005-05-30 19:53 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Marcelo Tosatti, linux-kernel

Adrian Bunk writes:
 > 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.
...
 > --- 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;
 >  

This is redundant. Any attempt to compile vanilla 2.4 with gcc4
will fail with compilation errors. (And except for one issue on
x86-64 which actually was a kernel bug, those are the only known
issues with using gcc4 for 2.4.)

OTOH, for those of us that do use gcc4, this just gets in the way
and forces the gcc4 fixes kit for 2.4 to be even larger.

Since distributors won't use gcc4 for 2.4, and naive users won't
succeed anyway, what's the point?

/Mikael

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

* Re: [2.4 patch] document that gcc 4 is not supported
  2005-05-30 19:53 ` Mikael Pettersson
@ 2005-05-30 20:13   ` Adrian Bunk
  0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2005-05-30 20:13 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: Marcelo Tosatti, linux-kernel

On Mon, May 30, 2005 at 09:53:20PM +0200, Mikael Pettersson wrote:
> Adrian Bunk writes:
>  > 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.
> ...
>  > --- 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;
>  >  
> 
> This is redundant. Any attempt to compile vanilla 2.4 with gcc4
> will fail with compilation errors. (And except for one issue on
> x86-64 which actually was a kernel bug, those are the only known
> issues with using gcc4 for 2.4.)

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

> OTOH, for those of us that do use gcc4, this just gets in the way
> and forces the gcc4 fixes kit for 2.4 to be even larger.
>...

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.

> /Mikael

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* [2.4 patch] document that gcc 4 is not supported
@ 2006-01-06 20:37 Adrian Bunk
  2006-01-06 21:11 ` Willy Tarreau
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2006-01-06 20:37 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel

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 |    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



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

* Re: [2.4 patch] document that gcc 4 is not supported
  2006-01-06 20:37 Adrian Bunk
@ 2006-01-06 21:11 ` Willy Tarreau
  2006-01-06 21:54   ` Adrian Bunk
  0 siblings, 1 reply; 6+ messages in thread
From: Willy Tarreau @ 2006-01-06 21:11 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Marcelo Tosatti, linux-kernel

Hi Adrian,

On Fri, Jan 06, 2006 at 09:37:27PM +0100, Adrian Bunk wrote:
> 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

Well, why not putting this into include/linux/compiler.h instead ? It
would shout earlier and will be easier to find.

> 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 |    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.

I would even explicitly state that gcc-3.3 and 3.4 should work in most
cases, while gcc 4 will definitely not work. It's important IMHO to
give the answers that most users will be looking for, and 3.3/3.4 are
fairly common.

>     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.
> +

Same here.

>  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
> 

Thanks,
Willy


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

* Re: [2.4 patch] document that gcc 4 is not supported
  2006-01-06 21:11 ` Willy Tarreau
@ 2006-01-06 21:54   ` Adrian Bunk
  0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2006-01-06 21:54 UTC (permalink / raw)
  To: Willy Tarreau; +Cc: Marcelo Tosatti, linux-kernel

On Fri, Jan 06, 2006 at 10:11:15PM +0100, Willy Tarreau wrote:
> Hi Adrian,
> 
> On Fri, Jan 06, 2006 at 09:37:27PM +0100, Adrian Bunk wrote:
> > 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
> 
> Well, why not putting this into include/linux/compiler.h instead ? It
> would shout earlier and will be easier to find.
>...
 
init/main.c is the first file that gets compiled, and therefore the 
traditional place for such compiler checks.

> > --- 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.
> 
> I would even explicitly state that gcc-3.3 and 3.4 should work in most
> cases, while gcc 4 will definitely not work. It's important IMHO to
> give the answers that most users will be looking for, and 3.3/3.4 are
> fairly common.
>...

gcc 2.95 is still the recommended compiler for kernel 2.4.

But if you want to improve the text, feel free to send a patch.  :-)

> Thanks,
> Willy

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2006-01-06 21:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-30 19:28 [2.4 patch] document that gcc 4 is not supported Adrian Bunk
2005-05-30 19:53 ` Mikael Pettersson
2005-05-30 20:13   ` Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2006-01-06 20:37 Adrian Bunk
2006-01-06 21:11 ` Willy Tarreau
2006-01-06 21:54   ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox