Current gcc 4.6-11.09 tip fails to build kernel
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Android |
Fix Released
|
High
|
Bernhard Rosenkraenzer | ||
Linaro GCC |
Fix Released
|
Critical
|
Richard Sandiford |
Bug Description
Building the iMX53 kernel with current gcc 4.6-11.09 tip results in:
arch/arm/
io.c:(.
io.c:(.
io.c:(.
arch/arm/
vfpdouble.
kernel/built-in.o: In function `update_
crash_dump.
kernel/
make[1]: *** [.tmp_vmlinux1] Error 1
The same kernel compiles fine with the 4.6-11.08 toolchain, and compiled with 4.6-11.09 tip from a couple of days ago (probably before the last upstream merge).
Also affects other kernels (at least Snowball) - IMO this needs to be fixed before the release
Changed in linaro-android: | |
status: | New → Confirmed |
assignee: | nobody → Bernhard Rosenkraenzer (berolinux) |
summary: |
- Current gcc 4.6-11.09 tip fails to build iMX53 kernel + Current gcc 4.6-11.09 tip fails to build kernel |
description: | updated |
Changed in gcc-linaro: | |
status: | Confirmed → Triaged |
Changed in gcc-linaro: | |
status: | Fix Committed → Fix Released |
Changed in linaro-android: | |
status: | Confirmed → Fix Released |
Thank you for the bug report. I've confirmed this with the gcc-linaro- 4.6-2011. 09 RC on ARM:
michaelh@ leo1:~/ linaro/ bugs$ /tools/ toolchains/ arch/armv7l/ gcc-linaro- 4.6-2011. 09-armv7l- natty-cbuild181 -ursa4- cortexa9r1/ bin/gcc -O2 -marm -S lp850099.c leo1:~/ linaro/ bugs$ cat lp850099.s
michaelh@
test:
stmfd sp!, {r3, r4, r5, lr}
rsbs r4, r0, #0
rsc r5, r1, #0
mov r3, r5
ldrd r0, [r2]
mov r2, r4
bl __aeabi_lcmp
cmp r0, #0
movgt r0, #0
movle r0, #1
ldmfd sp!, {r3, r4, r5, pc}
Due to the memory reference, the compiler generates a call to the 64
bit signed compare helper function. Previous versions inlined the
compare:
test:
stmfd sp!, {r4, r5}
ldrd r4, [r2]
rsbs r2, r0, #0
rsc r3, r1, #0
cmp r2, r4
sbcs r1, r3, r5
movlt r0, #0
movge r0, #1
ldmfd sp!, {r4, r5}
bx lr
The cmp r2, r4; sbcs r1, r3, r5 sequence is from the *arm_cmpdi_insn
pattern.
This is a performance regression. It is exposed in the kernel as the
kernel doesn't have a implementation of __aeabi_lcmp, although it does
have __aeabi_ulcmp.
Changing the flags to -O2, -O3, or -mthumb doesn't work around the 4.6-2011. 08, or upstream r178624.
problem. The issue does not exist in gcc-4.5.3, gcc-4.6.1,
gcc-linaro-
I've set it to medium priority as it is a ftbfs and a performance
regression.