Skip to contentSkip to conversation

2.6.18.2: cannot compile with gcc 3.0.4

DISCUSSION Ludovic Drolez 3 participants 4 messages Nov 10, 2006 Sparse checker

lore
Share & tools
lore
#0 lore raw

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,

Signature · 2 lines
Ludovic DROLEZ                              Linbox / Free&ALter Soft
http://lrs.linbox.org       - Free disk imaging and asset management
#1 lore raw
Quoted 4 lines · Ludovic Drolez

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

Signature · 3 lines
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
#2 lore raw
Quoted 2 lines · Jesper Juhl

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,

Signature · 3 lines
Ludovic DROLEZ                              Linbox / Free&ALter Soft
www.linbox.com www.linbox.org	              tel: +33 3 87 50 87 90
152 rue de Grigy - Technopole Metz 2000                   57070 METZ
#3 lore raw
Quoted 7 lines · Ludovic Drolez
Quoted 2 lines · Jesper Juhl

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.

include/linux/compiler.h +1 -1
index 538423d..aca6698 100644
@@ -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.
Signature · 5 lines
Cheers,
Alistair.

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