<br><br>On Monday, July 25, 2016, <a href="mailto:thilo.cestonaro@ts.fujitsu.com">thilo.cestonaro@ts.fujitsu.com</a> &lt;<a href="mailto:thilo.cestonaro@ts.fujitsu.com">thilo.cestonaro@ts.fujitsu.com</a>&gt; 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>
&gt; &gt; <br>
&gt; &gt; 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 &quot;armv7athf-neon&quot;, hardfp.<br>
&gt; &gt;<br>
&gt; &gt; But the TARGET_SYS in the bitbake header always tells me, that the toolchain it uses is &quot;...-gnueabi&quot;. Not &quot;hf&quot; in there?!<br>
&gt; &gt; Thats the first thing what I can&#39;t figure out.<br>
&gt; We do not rely on target triplet. calling convention is determined by<br>
&gt; -mfloat-abi switch that is what OE relies on.<br>
&gt;<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&#39;t do ldd helloworld on the target. <br>
<br>
<br>
<br>
&gt; &gt;<br>
&gt; &gt; 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>
&gt; &gt; But even when I compile with -mfloat-abi=hard, the executable which I get, segfaults on the target and ldd tells me &quot;not a dynamic executable&quot;.<br>
&gt; &gt; But readelf (on the target or host) tells me, that &quot;Tag_ABI_VFP_args: VFP registers&quot; (which is detection for hardfp, right?).<br>
&gt; &gt; And I miss the &quot;hf&quot; at the gnueabi in the sdk toolchain.<br>
&gt; Is target running the image build by you as well ? and prefereably<br>
&gt; build in same sandbox as the SDK<br>
&gt; if not then you need to figure out how the image was built.  what is<br>
&gt; output of ls /lib/ld-*<br>
<br>
It&#39;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 &quot;Build&quot; 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 -&gt; <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: &quot;7-A&quot;<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&#39;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&#39;s wrong here??<br>
I don&#39;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>