Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 366579

Summary: sys-kernel/*-sources: Silence gcc-4.6.0 -Wunused-but-set-variable warning
Product: Gentoo Linux Reporter: Stratos Psomadakis (RETIRED) <psomas>
Component: [OLD] Core systemAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED FIXED    
Severity: enhancement CC: hwoarang, nelchael, wired, xbox, xen
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://git.kernel.org/?p=linux/kernel/git/mmarek/kbuild-2.6.git;a=commit;h=af0e5d565d2fffcd97d1e2d89669d627cc04e8b8
Whiteboard: gentoo-sources-2.6.37-r6
Package list:
Runtime testing required: ---
Attachments: silence -Wunused-but-set-variable GCC warnings
silence -Wunused-but-set-variable GCC warnings
silence -Wunused-but-set-variable GCC warnings for 2.6.39

Description Stratos Psomadakis (RETIRED) gentoo-dev 2011-05-09 11:19:18 UTC
Created attachment 272601 [details, diff]
silence -Wunused-but-set-variable GCC warnings

GCC-4.6.0 has enabled -Wunused-but-set-variable warning by default, which can lead to very 'noisy' output when compiling Linux sources, and it can lead to compilation failure if -Werror flag is enabled (default for serveral archs). (bug 363935)

I'm not sure if this bug should block GCC 4.6 Porting (bug 346809).

This patch will probably be merged in 2.6.40, and maybe GCC-4.6.0 will still be masked, but if anyone wants to test it, they may have problems when compiling the kernel.

Btw, @QA: 
-Werror is enabled by default (and in many places without a CONFIG option to disable it) for compiling quite a lot of kernel code. Should I file a relevant bug to be tracked by bug 260867 ?.

Thanks.
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2011-05-09 23:17:05 UTC
I don't think this is related to either QA or gcc-porting teams. I am CCing all the kernel sources maintainers. They may be interested in this patch.
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2011-05-15 11:28:13 UTC
As for openvz sources they are based on 2.6.32 kernel so I guess general suggestion will be not to use newer gcc-4.6 (like for 2.6.18 kernels only gcc-4.1 is supported). So currently I'm include to keep things as they are.
Comment 3 Stratos Psomadakis (RETIRED) gentoo-dev 2011-05-18 18:10:32 UTC
Created attachment 273859 [details, diff]
silence -Wunused-but-set-variable GCC warnings
Comment 4 Stratos Psomadakis (RETIRED) gentoo-dev 2011-05-18 18:11:45 UTC
Created attachment 273861 [details, diff]
silence -Wunused-but-set-variable GCC warnings for 2.6.39

This one applies to 2.6.39 kernels, while the previous one applies to all the kernels currently in portage(2.6.32 - 2.6.38).
Comment 5 Mike Pagano gentoo-dev 2011-05-19 11:25:38 UTC
This will be in gentoo-sources-2.6.39 very soon(tm) and I will bring it to future releases of gentoo-sources .38 and .37 and .32

Thanks, Stratos!
Comment 6 Mike Pagano gentoo-dev 2011-05-24 17:53:58 UTC
Can be closed when gentoo-sources-2.6.37-r6 is released
Comment 7 Mike Pagano gentoo-dev 2011-05-26 16:30:44 UTC
Release in gentoo-sources-2.6.37-r6