[OE-core] kernel miscompilation with gcc 4.8 for ARMv5

Mike Looijmans mike.looijmans at topic.nl
Thu Jul 11 05:38:49 UTC 2013


On 07/10/2013 03:25 PM, Mark Hatle wrote:
> On 7/10/13 8:15 AM, Mike Looijmans wrote:
>> On 07/10/2013 02:34 PM, Enrico Scholz wrote:
>>> Enrico Scholz
>>> <enrico.scholz-wttK6gPy29v+Hn7q9Vec/7NAH6kLmebB at public.gmane.org>
>>> writes:
>>>
>>>> is it expected that recent gcc 4.8[1] compiles the kernel correctly?
>>>> Kernels for ARMv5 platforms (PXA168 -> 3.4.52, MX28 -> 3.8.13) fail
>>>> here
>>>> 100% at early boot with
>>>
>>> Applying two upstream kernel commits
>>> 455bd4c430b0c0a361f38e8658a0d6cb469942b5 (ARM: 7668/1: fix
>>> memset-related crashes caused by recent GCC (4.7.2) optimizations) and
>>> 418df63adac56841ef6b0f1fcf435bc64d4ed177 (ARM: 7670/1: fix the memset
>>> fix) seem to fix the problem for me.
>>>
>>
>> I encountered a compilation problem for MIPS kernels (version 3.3 and
>> below) with the new GCC compiler:
>>
>>
>>    arch/mips/mm/page.c:89:6: error: 'clear_page' alias in between
>> function and variable is not supported
>> void clear_page(void *page) __attribute__((alias("clear_page_array")));
>>          ^
>> arch/mips/mm/page.c:84:12: error: 'clear_page_array' aliased declaration
>> [-Werror]
>> static u32 clear_page_array[0x120 / 4];
>>                ^
>> arch/mips/mm/page.c:108:6: error: 'copy_page' alias in between function
>> and variable is not supported
>> void copy_page(void *to, void *from)
>> __attribute__((alias("copy_page_array")));
>>         ^
>> arch/mips/mm/page.c:102:12: error: 'copy_page_array' aliased declaration
>> [-Werror]
>> static u32 copy_page_array[0x540 / 4];
>>
>>
>> So I'll probably have to go and look for backports to apply here. Anyone
>> happen to come across this one already?
>> (Looking in the git history for that file suggests applying
>> c022630633624a75b3b58f43dd3c6cc896a56cff from upstream)
>>
>> A 3.8 kernel is running just fine with gcc 4.8.
>
> The following commit fixed the issue in 3.4.  I assume it'll work in
> other versions.
>
> kernel.org commit: c022630633624a75b3b58f43dd3c6cc896a56cff
>
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c022630633624a75b3b58f43dd3c6cc896a56cff

Indeed, patching that into the kernels fixed it.

Mike.




More information about the Openembedded-core mailing list