Ticket #180 (closed enhancement: fixed)
uboot build broken for EABI
| Reported by: | koen@… | Owned by: | mickey@… |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | OE bitbake recipes / build system | Version: | current svn head |
| Severity: | minor | Keywords: | |
| Cc: | laforge@…, buglog@…, werner@… | Blocked By: | |
| Blocking: | Estimated Completion (week): | ||
| HasPatchForReview: | PatchReviewResult: | ||
| Reproducible: |
Description
|
/data/build/koen/OE/build/tmp/angstrom/work/armv4t-angstrom-linux-gnueabi/gcc-cross-4.1.1-r10/gcc-4.1.1/gcc/config/arm/lib1funcs.asm:730:
multiple definition of `udivsi3'
|
lib_arm/libarm.a(_udivsi3.o):/data/build/koen/OE/build/tmp/angstrom/work/armv4t-angstrom-linux-gnueabi/uboot-gta01-1.2.0+svn20070214-r2/git/lib_arm/_udivsi3.S:17:
first defined here
| arm-angstrom-linux-gnueabi-ld: Warning: size of symbol `udivsi3' changed
from 152 in lib_arm/libarm.a(_udivsi3.o) to 252 in
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1/libgcc.a(_udivsi3.o)
| arm-angstrom-linux-gnueabi-ld: ERROR: Source object
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1/libgcc.a(_udivdi3.o)
has EABI version 4, but target u-boot has EABI version 0
| arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1/libgcc.a(_udivdi3.o)
| arm-angstrom-linux-gnueabi-ld: ERROR: Source object
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1/libgcc.a(_udivsi3.o)
has EABI version 4, but target u-boot has EABI version 0
| arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1/libgcc.a(_udivsi3.o)
| arm-angstrom-linux-gnueabi-ld: ERROR: Source object
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1/libgcc.a(_clz.o)
has EABI version 4, but target u-boot has EABI version 0
| arm-angstrom-linux-gnueabi-ld: failed to merge target specific data of file
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1/libgcc.a(_clz.o)
|
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
undefined reference to `aeabi_unwind_cpp_pr0'
| make: * [u-boot] Error 1
The u-boot present in OE doesn't have that problem, since the omap people are
building eabi images as well.
Attachments
Change History
comment:2 Changed 6 years ago by koen@…
--- /tmp/config.mk 2007-02-14 17:23:15.000000000 +0100+++
git/cpu/arm920t/config.mk 2007-02-14 17:23:38.475251000 +0100@@ -30,5 +30,5 @@
# Supply options according to compiler version # #
=========================================================================-PLATFORM_CPPFLAGS
+=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)+PLATFORM_CPPFLAGS +=$(call
cc-option) PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call
cc-option,-malignment-traps,))
gets around one problem, the unwind problem is still there, though
comment:3 Changed 6 years ago by koen@…
It seems to be a gcc/glibc misfeature:
http://sources.redhat.com/ml/crossgcc/2006-04/msg00071.html
comment:4 Changed 6 years ago by koen@…
Ok, uboot doesn't link to gcc_eh.a which has the missing symbols, after fixing that:
undefined reference to `exidx_start
which is because uboot uses a custom, and hence broken linker script. See
http://www.codesourcery.com/archives/arm-gnu/msg00580.html for details
comment:5 Changed 6 years ago by laforge@…
- Cc laforge@… added
can you provide a patch against makefile/linkerscript, something that we can
quilt on top of the current patchset?
We will try to merge this to u-boot once we merge our changes.
Changed 6 years ago by koen@…
- Attachment fix-arm920t-eabi.patch added
Don't hardcode apcs abi for arm920t
comment:6 Changed 6 years ago by koen@…
can you provide a patch against makefile/linkerscript, something that we can
quilt on top of the current patchset?
patches attached
We will try to merge this to u-boot once we merge our changes.
that would be cool.
I still suffered from undefined reference to 'raise' and 'abort' which google
says it's glibc related, I'll look in to that. I'll also ask Philip Balister
what magic he's using to build uboot/eabi for omap5912osk.
comment:7 Changed 6 years ago by mickey@…
I have worked around this now with the following patch:
I'm at a loss as to how to fix it properly, since there seem to be quite a
number of potential misbehaving subsystems involved, namely
- uboot/linker (arm920t rules / linkerscript being broken)
- uboot/lib_arm (div0 getting defined)
- uboot/Makefile (gcc 4.1.2 needs -lgcc_eh)
- gcc: div0 needs raise and abort which is not in libgcc, but glibc
comment:8 Changed 6 years ago by cesarb@…
I took a different approach; since it doesn't really matter which ABI uboot uses
(it runs as a separate freestanding binary), and there should be is a reason why
it overrides the ABI (probably because the assembly functions are hardcoded to
expect a certain ABI), I built it with a separate cross-compiler toolchain which
uses the old ABI.
I did a detailed write-up on how I made it work at
http://wiki.openmoko.org/wiki/User:CesarB/Compiling_for_EABI
comment:9 Changed 6 years ago by alphaone@…
Is any of the solutions good enough for applying and closing this bug or are we
still waiting for the right solution?
comment:10 Changed 6 years ago by koen@…
I'd vote for mickey's patch
comment:11 Changed 5 years ago by mickey@…
- Severity changed from normal to enhancement
The patch has been applied to OE, but needs to be fixed in a proper way and
submitted upstream. Changing severity and reassigning to component owner.
comment:12 Changed 5 years ago by werner@…
- Cc werner@… added
- Status changed from new to closed
- Resolution set to fixed
eabi-toolchain.patch in revision 3775 fixes this. It seems that upstream has
become a bit cleaner over the long time this bug existed, so the solution is
a bit simpler now.

http://www.codesourcery.com/archives/arm-gnu/msg00668.html seems to have a solution