Re: 2.6.18.2: cannot compile with gcc 3.0.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux