Bug 2524 - building meta-toolchain for armv7ahf failed
Summary: building meta-toolchain for armv7ahf failed
Status: RESOLVED OBSOLETE
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: configuration (show other bugs)
Version: 1.1.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5
Assignee: Khem Raj
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-05-30 21:45 UTC by Vladimir Redzhepoff
Modified: 2013-12-05 16:04 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Fix for armv7ahf machine (1.19 KB, patch)
2012-08-21 13:13 UTC, Vladimir Redzhepoff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Redzhepoff 2012-05-30 21:45:05 UTC
I've created armv7ahf configuration file

#@TYPE: Machine
#@NAME: armv7ahf machine
#@DESCRIPTION: Machine configuration for armv7ahf based boards

DEFAULTTUNE = "armv7ahf"

require conf/machine/include/arm/arch-armv7a.inc

# variable needed for compilation
MACHINE_FEATURES ?= ""

PREFERRED_PROVIDER_virtual/kernel ?= "linux"
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-lite"

KERNEL_IMAGETYPE = "uImage"

SERIAL_CONSOLE = "115200 console"

Then I've run MACHINE=armv7ahf bitbake meta-toolchain but it failed with error

rm-oe-linux-gnueabi/4.6.4/ld: failed to merge target specific data of file emutls_s.o
| /opt/work/vredzhepoff/builds/meta-toolchain-armv7ahf/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/armv7ahf-vfp-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.6.4/ld: error: ./libgcc_s.so.1.tmp uses VFP register arguments, ./crtendS.o does not
| /opt/work/vredzhepoff/builds/meta-toolchain-armv7ahf/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/armv7ahf-vfp-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.6.4/ld: failed to merge target specific data of file ./crtendS.o
| collect2: ld returned 1 exit status
| make[1]: *** [libgcc_s.so] Error 1
| make[1]: Leaving directory `/opt/work/vredzhepoff/builds/meta-toolchain-armv7ahf/tmp-eglibc/work/x86_64-nativesdk-oesdk-linux/gcc-cross-canadian-arm-4.6.3+svnr184847-r25/gcc-4_6-branch/build.x86_64-oesdk-linux.arm-oe-linux-gnueabi/arm-oe-linux-gnueabi/libgcc'
| make: *** [all-target-libgcc] Error 2
| ERROR: oe_runmake failed
NOTE: package gcc-cross-canadian-arm-4.6.3+svnr184847-r25: task do_compile: Failed
ERROR: Task 714 (/home/vredzhepoff/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_4.6.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1843 tasks of which 1842 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/vredzhepoff/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_4.6.bb, do_compile

The attributes of object files in directory

readelf -A /opt/work/vredzhepoff/builds/meta-toolchain-armv7ahf/tmp-eglibc/work/x86_64-nativesdk-oesdk-linux/gcc-cross-canadian-arm-4.6.3+svnr184847-r25/gcc-4_6-branch/build.x86_64-oesdk-linux.arm-oe-linux-gnueabi/arm-oe-linux-gnueabi/libgcc
unordsf2_s.o

File Attributes
  Tag_CPU_name: "ARM10TDMI"
  Tag_CPU_arch: v5T
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_optimization_goals: Aggressive Size
  Tag_DIV_use: Not allowed

And the task try to link to generate a library by following command


arm-linux-gnueabi-gcc --sysroot=/opt/work/vredzhepoff/builds/meta-toolchain-armv7ahf/tmp-eglibc/work/sysroots/armv7ahf  -O2  -g -Os -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -Wno-missing-prototypes -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -g -Os -B./ _thumb1_case_sqi_s.o _thumb1_case_uqi_s.o _thumb1_case_shi_s.o _thumb1_case_uhi_s.o _thumb1_case_si_s.o _udivsi3_s.o _divsi3_s.o _umodsi3_s.o _modsi3_s.o _bb_init_func_s.o _call_via_rX_s.o _interwork_call_via_rX_s.o _lshrdi3_s.o _ashrdi3_s.o _ashldi3_s.o _arm_negdf2_s.o _arm_addsubdf3_s.o _arm_muldivdf3_s.o _arm_cmpdf2_s.o _arm_unorddf2_s.o _arm_fixdfsi_s.o _arm_fixunsdfsi_s.o _arm_truncdfsf2_s.o _arm_negsf2_s.o _arm_addsubsf3_s.o _arm_muldivsf3_s.o _arm_cmpsf2_s.o _arm_unordsf2_s.o _arm_fi
 xsfsi_s.o _arm_fixunssfsi_s.o _arm_floatdidf_s.o _arm_floatdisf_s.o _arm_floatundidf_s.o _arm_floatundisf_s.o _clzsi2_s.o _clzdi2_s.o _aeabi_lcmp_s.o _aeabi_ulcmp_s.o _aeabi_ldivmod_s.o _aeabi_uldivmod_s.o _dvmd_lnx_s.o _clear_cache_s.o _muldi3_s.o _negdi2_s.o _cmpdi2_s.o _ucmpdi2_s.o _enable_execute_stack_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _fixunstfdi_s.o _floatdisf_s.o _floatdidf_s.o
 _floatdixf_s.o _floatditf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o bpabi_s.o unaligned-funcs_s.o addsf3_s.o divsf3_s.o eqsf2_s.o gesf2_s.o lesf2_s.o mulsf3_s.o negsf2_s.o subsf3_s.o unordsf2_s.o fixsfsi_s.o floatsisf_s.o floatunsisf_s.o adddf3_s.o divdf3_s.o eqdf2_s.o gedf2_s.o ledf2_s.o muldf3_s.o negdf2_s.o subdf3_s.o unorddf2_s.o fixdfsi_s.o floatsidf_s.o floatunsidf_s.o extendsfdf2_s.o truncdfsf2_s.o unwind-arm_s.o libunwind_s.o pr-support_s.o unwind-c_s.o emutls_s.o -lc

The attributes of libraries in the specified sysroot directory

Attribute Section: aeabi
File Attributes
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_VFP_arch: VFP
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align8_needed: Yes
Tag_ABI_align8_preserved: Yes, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_HardFP_use: SP and DP
Tag_ABI_VFP_args: VFP registers
Tag_ABI_optimization_goals: Aggressive Speed
Tag_CPU_unaligned_access: v6

I think this is caused by not correctly specifying cpu and vfp options in ecessary config file.
Comment 1 Vladimir Redzhepoff 2012-08-21 13:13:46 UTC
Created attachment 710 [details]
Fix for armv7ahf machine
Comment 2 Vladimir Redzhepoff 2012-08-21 13:16:54 UTC
After applying this patch I've managed to build meta-toolchain for armv7hf machine.
Comment 3 Khem Raj 2012-08-24 21:18:13 UTC
can you reproduce it on master as well. From what it looks like you are using either denzil or old snapshot of master
Comment 4 Saul Wold 2013-04-30 22:45:29 UTC
Any update on this, otherwise we might close it out.
Comment 5 Paul Eggleton 2013-12-05 16:04:59 UTC
Marking this as resolved due to lack of info and the belief that it's fixed in master. If this is still reproducible with a recent version of the build system, please re-open.