[YBA] kernel compile errors with GCC >= 4.6
Oleg Goldshmidt
pub at goldshmidt.org
Wed Apr 4 14:01:19 IDT 2012
On Wed, Apr 4, 2012 at 1:16 PM, Jonathan Ben Avraham <yba at tkos.co.il> wrote:
> Hi Oleg,
> Thanks.
> The quesiton relates to this problem:
> http://unix.stackexchange.com/**questions/35607/cross-lfs-ppc-**
> error-while-compiling/35621#**35621<http://unix.stackexchange.com/questions/35607/cross-lfs-ppc-error-while-compiling/35621#35621>
>
Ah, -Wunused-but-set-variable ;-) This is quite common (with gcc-4.6) in
userspace code as well. :-(
So the same link tells you how you can configure kbuild to ignore it.
What I ususally do if it happens in one or two files only (of 3rd party
code that I have) is add something like
foo.o: CFLAGS += -Wno-error=unused-but-set-variable
or
foo.o: CFLAGS += -Wno-unused-but-set-variable
This does not switch -Werror globally or anything of the kind.
I am fairly sure that this can be done in the kernel in a similar manner.
--
Oleg Goldshmidt | oleg at goldshmidt.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20120404/57f66821/attachment.html>
More information about the Linux-il
mailing list