<br><br>On Monday, July 25, 2016, <a href="mailto:thilo.cestonaro@ts.fujitsu.com">thilo.cestonaro@ts.fujitsu.com</a> <<a href="mailto:thilo.cestonaro@ts.fujitsu.com">thilo.cestonaro@ts.fujitsu.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey Khem!<br>
<br>
Thanks for your answer!<br>
<br>
> > <br>
> > I want to build my own dist and a sdk for it. The dist is working and is as expected by the DEFAULT_TUNE of "armv7athf-neon", hardfp.<br>
> ><br>
> > But the TARGET_SYS in the bitbake header always tells me, that the toolchain it uses is "...-gnueabi". Not "hf" in there?!<br>
> > Thats the first thing what I can't figure out.<br>
> We do not rely on target triplet. calling convention is determined by<br>
> -mfloat-abi switch that is what OE relies on.<br>
><br>
<br>
Ok. Understood. But even when I build with -mfloat-abi=hard (and the VFP Register Entry is there with readelf, on build machine and target).<br>
I can't do ldd helloworld on the target. <br>
<br>
<br>
<br>
> ><br>
> > The other thing is, when I now use the sdk, after successfully populating it, the toolchain in there has the default -mfloat-abi=softfp ...<br>
> > But even when I compile with -mfloat-abi=hard, the executable which I get, segfaults on the target and ldd tells me "not a dynamic executable".<br>
> > But readelf (on the target or host) tells me, that "Tag_ABI_VFP_args: VFP registers" (which is detection for hardfp, right?).<br>
> > And I miss the "hf" at the gnueabi in the sdk toolchain.<br>
> Is target running the image build by you as well ? and prefereably<br>
> build in same sandbox as the SDK<br>
> if not then you need to figure out how the image was built. what is<br>
> output of ls /lib/ld-*<br>
<br>
It's a krogoth build with callconvention-hard enabled via DEFAULTTUNE.<br>
And I have one recipe for the image and one for the sdk toolchain. So the "Build" are two bitbake calls.<br>
<br>
HOST with SDK:<br>
$ . /opt/amana-sdk/sdk-environment<br>
$ echo $CXX<br>
arm-magna-linux-gnueabi-g++ -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard --sysroot=/opt/amana-sdk/4.0-1469450812/sysroots/armv7ahf-neon-magna-linux-gnueabi<br>
$ ${CXX} -o helloworld helloworld.cpp <br>
$ scp helloworld target:/usr/bin<br>
<br>
<br>
TARGET:<br>
# ldd /lib/libc.so.6 <br>
/lib/ld-linux-armhf.so.3 (0xb6f41000)<br>
# ls -l /lib/ld-*<br>
-rwxr-xr-x 1 root root 134396 Jul 22 10:56 /lib/<a href="http://ld-2.23.so" target="_blank">ld-2.23.so</a><br>
lrwxrwxrwx 1 root root 10 Jul 22 10:56 /lib/ld-linux-armhf.so.3 -> <a href="http://ld-2.23.so" target="_blank">ld-2.23.so</a><br>
<br>
# /usr/bin/helloworld<br>
Segmentation fault<br>
<br>
# ldd /usr/bin/helloworld <br>
not a dynamic executable<br>
<br>
# readelf -A /usr/bin/helloworld <br>
Attribute Section: aeabi<br>
File Attributes<br>
Tag_CPU_name: "7-A"<br>
Tag_CPU_arch: v7<br>
Tag_CPU_arch_profile: Application<br>
Tag_ARM_ISA_use: Yes<br>
Tag_THUMB_ISA_use: Thumb-2<br>
Tag_FP_arch: VFPv3<br>
Tag_Advanced_SIMD_arch: NEONv1<br>
Tag_ABI_PCS_wchar_t: 4<br>
Tag_ABI_FP_rounding: Needed<br>
Tag_ABI_FP_denormal: Needed<br>
Tag_ABI_FP_exceptions: Needed<br>
Tag_ABI_FP_number_model: IEEE 754<br>
Tag_ABI_align_needed: 8-byte<br>
Tag_ABI_align_preserved: 8-byte, except leaf SP<br>
Tag_ABI_enum_size: int<br>
Tag_ABI_VFP_args: VFP registers<br>
Tag_CPU_unaligned_access: v6<br>
<br>
# readelf -h /usr/bin/helloworld <br>
ELF Header:<br>
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 <br>
Class: ELF32<br>
Data: 2's complement, little endian<br>
Version: 1 (current)<br>
OS/ABI: UNIX - System V<br>
ABI Version: 0<br>
Type: EXEC (Executable file)<br>
Machine: ARM<br>
Version: 0x1<br>
Entry point address: 0x85f4<br>
Start of program headers: 52 (bytes into file)<br>
Start of section headers: 42264 (bytes into file)<br>
Flags: 0x5000400, Version5 EABI, hard-float ABI<br>
Size of this header: 52 (bytes)<br>
Size of program headers: 32 (bytes)<br>
Number of program headers: 8<br>
Size of section headers: 40 (bytes)<br>
Number of section headers: 39<br>
Section header string table index: 36<br>
<br>
<br>
Any idea what's wrong here??<br>
I don't get it.</blockquote><div><br></div><div>Seems steps are all ok. Can you upload your hello world somewhere. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Thilo</blockquote>