2006-11-10 11:01:51

by Ludovic Drolez

[permalink] [raw]
Subject: 2.6.18.2: cannot compile with gcc 3.0.4

Hi !

When I try to compile the latest kernel with 3.0.4, I get a parse error:

In file included from include/asm/suspend.h:7,
from include/linux/suspend.h:5,
from arch/i386/kernel/asm-offsets.c:11:
include/asm/i387.h:55: warning: `always_inline' attribute directive ignored
include/asm/i387.h: In function `__save_init_fpu':
include/asm/i387.h:58: parse error before '[' token
include/asm/i387.h:68: parse error before '[' token
include/asm/i387.h: At top level:
include/asm/i387.h:96: warning: `always_inline' attribute directive ignored

With gcc 2.95.4, I get a "compiler too old" errors, and the same parsing
error... so, gcc 3.0.4 (Debian Woody) will be also in the compiler blacklist,
or can it be fixed ?

Cheers,

--
Ludovic DROLEZ Linbox / Free&ALter Soft
http://lrs.linbox.org - Free disk imaging and asset management


2006-11-10 11:28:33

by Jesper Juhl

[permalink] [raw]
Subject: Re: 2.6.18.2: cannot compile with gcc 3.0.4

On 10/11/06, Ludovic Drolez <[email protected]> wrote:
> Hi !
>
> When I try to compile the latest kernel with 3.0.4, I get a parse error:
>

If you had bothered to read Documentation/Changes then you would have
seen that the current minimal required gcc version is 3.2 :

"
...
Current Minimal Requirements
============================

Upgrade to at *least* these software revisions before thinking you've
encountered a bug! If you're unsure what version you're currently
running, the suggested command should tell you.

...

o Gnu C 3.2 # gcc --version
...
"

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

2006-11-10 11:56:11

by Ludovic Drolez

[permalink] [raw]
Subject: Re: 2.6.18.2: cannot compile with gcc 3.0.4

Jesper Juhl wrote:
> If you had bothered to read Documentation/Changes then you would have
> seen that the current minimal required gcc version is 3.2 :

Ok sorry, I didn't see the change between 2.6.15 and 2.6.16.
Maybe a test should be added in linux/compiler-gcc3.h, to have the same
warning as with gcc 2.xx ?

Cheers,

--
Ludovic DROLEZ Linbox / Free&ALter Soft
http://www.linbox.com http://www.linbox.org tel: +33 3 87 50 87 90
152 rue de Grigy - Technopole Metz 2000 57070 METZ

2006-11-10 15:22:44

by Alistair John Strachan

[permalink] [raw]
Subject: Re: 2.6.18.2: cannot compile with gcc 3.0.4

On Friday 10 November 2006 11:56, Ludovic Drolez wrote:
> Jesper Juhl wrote:
> > If you had bothered to read Documentation/Changes then you would have
> > seen that the current minimal required gcc version is 3.2 :
>
> Ok sorry, I didn't see the change between 2.6.15 and 2.6.16.
> Maybe a test should be added in linux/compiler-gcc3.h, to have the same
> warning as with gcc 2.xx ?

Untested, but something like this should do it.

The kernel doesn't compile with GCC <3.2, do not allow it to succeed if GCC
3.0.x or 3.1.x are used.

Signed-off-by: Alistair John Strachan <[email protected]>

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 538423d..aca6698 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -40,7 +40,7 @@ #if __GNUC__ > 4
#error no compiler-gcc.h file for this gcc version
#elif __GNUC__ == 4
# include <linux/compiler-gcc4.h>
-#elif __GNUC__ == 3
+#elif __GNUC__ == 3 && __GNUC_MINOR__ >= 2
# include <linux/compiler-gcc3.h>
#else
# error Sorry, your compiler is too old/not recognized.

--
Cheers,
Alistair.

Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.