Current gcc 4.6-11.09 tip fails to build kernel

Bug #850099 reported by Bernhard Rosenkraenzer
12
This bug affects 1 person
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/kernel/built-in.o: In function `armpmu_event_set_period':
io.c:(.text+0x7d3c): undefined reference to `__aeabi_lcmp'
io.c:(.text+0x7d74): undefined reference to `__aeabi_lcmp'
io.c:(.text+0x7dcc): undefined reference to `__aeabi_lcmp'
arch/arm/vfp/built-in.o: In function `vfp_compare.isra.1':
vfpdouble.c:(.text+0x30f0): undefined reference to `__aeabi_lcmp'
kernel/built-in.o: In function `update_min_vruntime':
crash_dump.c:(.text+0x1a4): undefined reference to `__aeabi_lcmp'
kernel/built-in.o:crash_dump.c:(.text+0x9d4): more undefined references to `__aeabi_lcmp' follow
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

Tags: size speed
Changed in linaro-android:
status: New → Confirmed
assignee: nobody → Bernhard Rosenkraenzer (berolinux)
Revision history for this message
Michael Hope (michaelh1) wrote :
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
Revision history for this message
Michael Hope (michaelh1) wrote :

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
michaelh@leo1:~/linaro/bugs$ cat lp850099.s
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
problem. The issue does not exist in gcc-4.5.3, gcc-4.6.1,
gcc-linaro-4.6-2011.08, or upstream r178624.

I've set it to medium priority as it is a ftbfs and a performance
regression.

tags: added: size speed
Changed in gcc-linaro:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Michael Hope (michaelh1) wrote :

This was introduced by r106803 "Backport fix for PR49030."

Changed in gcc-linaro:
assignee: nobody → Richard Sandiford (rsandifo)
Revision history for this message
Michael Hope (michaelh1) wrote :

Richard, could you have a look into this please?

Revision history for this message
Michael Hope (michaelh1) wrote :

I've started an incident report at:
 https://wiki.linaro.org/WorkingGroups/ToolChain/Incidents/2011.09-armel

so we can track the decision.

Revision history for this message
Fathi Boudra (fboudra) wrote :

> I've set it to medium priority as it is a ftbfs and a performance regression.

Kernel FTBFS and regression sounds like a high priority to me. We don't have a work around proposed and can't build LInaro Android kernel with this toolchain.

Add linaro-release to track the issue.

Changed in gcc-linaro:
status: Triaged → Confirmed
Changed in linaro-android:
importance: Undecided → High
milestone: none → 11.09
Revision history for this message
Michael Hope (michaelh1) wrote :

Yeah, I agree. No work around on a major program. I have a patch that reverts the change testing.

Changed in gcc-linaro:
importance: Medium → Critical
Loïc Minier (lool)
Changed in gcc-linaro:
status: Confirmed → Triaged
Revision history for this message
Michael Hope (michaelh1) wrote :

Reverted in the 2011.09-1 respin.

Changed in gcc-linaro:
status: Triaged → Fix Committed
Michael Hope (michaelh1)
Changed in gcc-linaro:
status: Fix Committed → Fix Released
Changed in linaro-android:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.