New: Checking external toolchain for eabihf
https://bugs.busybox.net/show_bug.cgi?id=6842
Summary: Checking external toolchain for eabihf
Product: buildroot
Version: 2014.02
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: syntheticpp at gmx.net
CC: buildroot at uclibc.org
Estimated Hours: 0.0
http://lists.busybox.net/pipermail/buildroot/2014-January/087860.html
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
https://bugs.busybox.net/show_bug.cgi?id=6842
--- Comment #1 from Thomas De Schampheleire <[email protected]> 2014-02-07 08:30:47 UTC --- Thomas Petazzoni, could you shine your light on this patch?
Copy/pasted here for convenience:
toolchain/helpers.mk +0 -2
@@ -284,8 +284,8 @@ check_arm_abi = \ echo "External toolchain uses the unsuported OABI" ; \ exit 1 ; \ fi ; \ - EXT_TOOLCHAIN_CRT1=`LANG=C $${__CROSS_CC} -print-file-name=crt1.o` ; \ - if $${__CROSS_READELF} -A $${EXT_TOOLCHAIN_CRT1} | grep -q
"Tag_ABI_VFP_args:" ; then \
+ EXT_TOOLCHAIN_LIBM=LANG=C $${__CROSS_CC} -print-file-name=libm.so ; \
+ if $${__CROSS_READELF} -A $${EXT_TOOLCHAIN_LIBM} | grep -q
"Tag_ABI_VFP_args:" ; then \
EXT_TOOLCHAIN_ABI="eabihf" ; \
else \
EXT_TOOLCHAIN_ABI="eabi" ; \Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
--- Comment #2 from Thomas De Schampheleire <[email protected]> 2014-02-21 07:50:06 UTC --- Patch resubmitted to the list: http://patchwork.ozlabs.org/patch/320459/
Discussion started, but needs followup.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
--- Comment #3 from syntheticpp at gmx.net 2014-02-23 16:32:24 UTC --- Investigated it further: there are no problems when eglibc is used, only with uclibc.
A grep for 'hard' or "EABI" in the uclibc-0.9.33.2 sources shows nothing relevant, so I assume eabihf is not supported by uclibc.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
--- Comment #4 from Thomas Petazzoni <[email protected]> 2014-02-23 17:37:22 UTC --- (In reply to comment #3)
Quoted 2 lines
Investigated it further: there are no problems when eglibc is used, only with uclibc.
Correct.
Quoted 3 lines
A grep for 'hard' or "EABI" in the uclibc-0.9.33.2 sources shows nothing relevant, so I assume eabihf is not supported by uclibc.
I don't think the C library needs anything to "support" eabihf. eabihf is all about a change in the calling convention of functions taking floating point arguments.
I haven't got the bottom of this problem yet, but I have indeed reproduced it, and I continue to believe that the fix is *not* to change the external toolchain check, but instead to investigate *why* the uClibc crt1.o does not have those flags when built with the internal toolchain backend.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
--- Comment #5 from syntheticpp at gmx.net 2014-02-23 18:22:52 UTC ---
Quoted 2 lines
the fix is *not* to change the external toolchain check,
Yes, the patch should not be applied.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
--- Comment #6 from syntheticpp at gmx.net 2014-02-23 20:03:10 UTC --- command line for crtl1.o looks like this:
$ /opt/testgcc4.8.2/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gcc -c libc/sysdeps/linux/arm/crt1.S -o lib/crt1.o -include ./include/libc-symbols.h -Wall -Wstrict-prototypes -Wstrict-aliasing -funsigned-char -fno-builtin -fno-asm -mlittle-endian -fno-stack-protector -nostdinc -I./include -I./include -I. -I./libc/sysdeps/linux -I./libc/sysdeps/linux/arm -Os -funit-at-a-time -fmerge-all-constants -fstrict-aliasing -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -DHAVE_FORCED_UNWIND -I./libpthread/nptl -I./libpthread/nptl -I./libpthread/nptl/sysdeps/unix/sysv/linux/arm/ -I./libpthread/nptl/sysdeps/unix/sysv/linux/arm -I./libpthread/nptl/sysdeps/arm -I./libpthread/nptl/sysdeps/arm -I./libpthread/nptl/sysdeps/unix/sysv/linux -I./libpthread/nptl/sysdeps/unix/sysv/linux -I./libpthread/nptl/sysdeps/pthread -I./libpthread/nptl/sysdeps/pthread/bits -I./libpthread/nptl/sysdeps/generic -I./ldso/ldso/arm -I./ldso/include -I./libc/sysdeps/linux/common -I/opt/testgcc4.8.2/usr/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/ -isystem /opt/testgcc4.8.2/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabihf/4.8.2/include-fixed -isystem /opt/testgcc4.8.2/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabihf/4.8.2/include -DNDEBUG -D__USE_STDIO_FUTEXES__ -MT lib/crt1.o -MD -MP -MF lib/.crt1.o.dep -D__ASSEMBLER__ -Wa,--noexecstack -DL_crt1
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
--- Comment #7 from Stefan S?rensen <[email protected]> 2014-02-24 08:24:25 UTC --- (In reply to comment #4)
Quoted 4 lines
I haven't got the bottom of this problem yet, but I have indeed reproduced it, and I continue to believe that the fix is *not* to change the external toolchain check, but instead to investigate *why* the uClibc crt1.o does not have those flags when built with the internal toolchain backend.
The attributes are added by the compiler, not the assembler. glibc has both c and assembler source for crt1.o while uclibc has only assembler source.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
--- Comment #8 from Thomas De Schampheleire <[email protected]> 2014-02-28 13:01:10 UTC --- Config file for toolchain:
BR2_arm=y
BR2_cortex_a8=y
BR2_ARM_EABIHF=y
BR2_ARM_FPU_VFPV3=y
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_BINUTILS_VERSION_2_24=y
BR2_GCC_VERSION_4_8_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_ENABLE_LOCALE_PURGE=y
BR2_ENABLE_LOCALE_WHITELIST="C en_US de "
I can indeed confirm that uClibc builds crt1.o from crt1.S, using the command line as specified in comment #7.
Looking in the binutils sources (that creates the assembler), I do find references to ABI_VFP, but I don't see places where it is actually emitted in the build, unless the source assembly file contains a statement .eabi_attribute.
So the statements made by the submitter seem to be valid.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
--- Comment #9 from Thomas De Schampheleire <[email protected]> 2014-05-05 12:14:23 UTC --- Alternative patch submitted by Stefan S?rensen, updated and tested today by me:
http://patchwork.ozlabs.org/patch/345703/
This patch compiles a temporary object instead of using libm or crt1.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
Thomas De Schampheleire <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |2014.05
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6842] Checking external toolchain for eabihf
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6842
Thomas De Schampheleire <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED--- Comment #10 from Thomas De Schampheleire <[email protected]> 2014-05-11 19:33:22 UTC --- Fixed with
http://git.buildroot.net/buildroot/commit/?id=3787592063b0f30c69d074534a5a437bb458fbd7
Thanks for reporting!
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.