[YBA] kernel compile errors with GCC >= 4.6
Jonathan Ben Avraham
yba at tkos.co.il
Wed Apr 4 13:56:20 IDT 2012
CC arch/powerpc/kernel/align.o
arch/powerpc/kernel/align.c: In function 'fix_alignment':
arch/powerpc/kernel/align.c:704:33: error: variable 'instruction' set but
not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [arch/powerpc/kernel/align.o] Error 1
make: *** [arch/powerpc/kernel] Error 2
On Wed, 4 Apr 2012, Baruch Siach wrote:
> Date: Wed, 4 Apr 2012 13:54:49 +0300
> From: Baruch Siach <baruch at tkos.co.il>
> To: Jonathan Ben Avraham <yba at tkos.co.il>
> Cc: Oleg Goldshmidt <pub at goldshmidt.org>, ILUG <linux-il at cs.huji.ac.il>
> Subject: Re: [YBA] kernel compile errors with GCC >= 4.6
>
> Hi Yonatan,
>
> On Wed, Apr 04, 2012 at 01:48:15PM +0300, Jonathan Ben Avraham wrote:
>> Problem still seems to be in 3.3 unless defined CONFIG_VSX.
>
> What does the warning say?
>
>> Should I submit a patch?
>
> Probably. Although you should base your patch on v3.4-rc1.
>
> baruch
>
>> On Wed, 4 Apr 2012, Baruch Siach wrote:
>>> Date: Wed, 4 Apr 2012 13:22:59 +0300
>>> From: Baruch Siach <baruch at tkos.co.il>
>>> To: Oleg Goldshmidt <pub at goldshmidt.org>
>>> Cc: Jonathan Ben Avraham <yba at tkos.co.il>, ILUG <linux-il at cs.huji.ac.il>
>>> Subject: Re: [YBA] kernel compile errors with GCC >= 4.6
>>>
>>> Hi Oleg,
>>>
>>> On Wed, Apr 04, 2012 at 12:49:44PM +0300, Oleg Goldshmidt wrote:
>>>> On Wed, Apr 4, 2012 at 10:03 AM, Jonathan Ben Avraham <yba at tkos.co.il>wrote:
>>>>
>>>>> Dear linux-il colleagues,
>>>>> GCC 4.6 introduced many new warnings that cause -Werror to stop the
>>>>> compilation for some platforms, such as powerpc, in various files.
>>>>
>>>> Oh, I didn't even know they finally introduced -Werror... Good.
>>>
>>> This in the default only for PowerPC specific code, i.e. code under
>>> arch/powerpc.
>>>
>>>> If it is in the way maybe KCFLAGS=-Wno-error or similar may serve as a
>>>> workaround? Or KBUILD_ENABLE_EXTRA_GCC_CHECKS="" ?
>>>
>>> This behaviour can be disabled by setting CONFIG_PPC_DISABLE_WERROR, find
>>> under "Kernel hacking".
>>>
>>>> Cf. Documentation/kbuild/kbuild.txt
>>>>
>>>> You didn't say what kernel version - I just went to LXR for the latest.
>>>>
>>>>> My question is in general, is there somewhere where the relationship
>>>>> between kernel version and gcc version (or other compiler version) is made
>>>>> explicit?
>>>>
>>>> Not that I know of. The minimal versions of everything needed are in
>>>> Documentation/Changes. I guess you are not interested in "minimal".
>>>>
>>>> I would be very much surprised if the kernel could not be built with
>>>> gcc-4.6 - this is stock on Fedora, so lots of people must be using it.
>>>> Maybe not on PowerPC, though
>>>
>>> Recent kernel versions surely have all these warnings fixed. The kernel in
>>> question, I suppose, is quite ancient.
>>>
>>> baruch
>
>
--
EE 77 7F 30 4A 64 2E C5 83 5F E7 49 A6 82 29 BA ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- yba at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
More information about the Linux-il
mailing list