[meta-freescale] ADT Installer produces bad compiler?

Paul Sievers p.sievers at ms-ag.de
Tue Nov 21 00:33:39 PST 2017



-----Ursprüngliche Nachricht-----
Von: Otavio Salvador [mailto:otavio.salvador at ossystems.com.br] 
Gesendet: Montag, 20. November 2017 11:56
An: Paul Sievers
Cc: meta-freescale at yoctoproject.org
Betreff: Re: [meta-freescale] ADT Installer produces bad compiler?

On Mon, Nov 20, 2017 at 5:43 AM, Paul Sievers <p.sievers at ms-ag.de> wrote:
>
>
> -----Ursprüngliche Nachricht-----
> Von: Otavio Salvador [mailto:otavio.salvador at ossystems.com.br]
> Gesendet: Freitag, 17. November 2017 17:16
> An: Paul Sievers
> Cc: meta-freescale at yoctoproject.org
> Betreff: Re: [meta-freescale] ADT Installer produces bad compiler?
>
> On Fri, Nov 17, 2017 at 12:31 PM, Paul Sievers <p.sievers at ms-ag.de> wrote:
>> Could this be a hard fload/soft float problem?
>>
>> root at imx6ulevk:~# readelf -h tt
>> ELF Header:
>>   Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
>>   Class:                             ELF32
>>   Data:                              2's complement, little endian
>>   Version:                           1 (current)
>>   OS/ABI:                            UNIX - System V
>>   ABI Version:                       0
>>   Type:                              EXEC (Executable file)
>>   Machine:                           ARM
>>   Version:                           0x1
>>   Entry point address:               0x82b8
>>   Start of program headers:          52 (bytes into file)
>>   Start of section headers:          35308 (bytes into file)
>>   Flags:                             0x5000202, has entry point, Version5 EABI, soft-float ABI
>
> Yes. You found it :-)
>
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
>
> How is this supposed to work?
>
> Just adding the appropriate compiler option does not seem to help:
> paul at VBox:~/DataExchange/workspace/tt$ $CC -mfloat-abi=hard -o tt 
> src/tt.c In file included from /home/paul/test-yocto/qemuarm/usr/include/features.h:389:0,
>                  from /home/paul/test-yocto/qemuarm/usr/include/stdio.h:27,
>                  from src/tt.c:11:
> /home/paul/test-yocto/qemuarm/usr/include/gnu/stubs.h:10:29: fatal 
> error: gnu/stubs-hard.h: No such file or directory  # include <gnu/stubs-hard.h>
>                              ^
> compilation terminated.
> paul at VBox:~/DataExchange/workspace/tt$
>
> Does the ADT Installer support hard float?
> Or do I have to build the toolchain manually using "bitbake meta-toolchain"? In this case, how can I configure it for hard float?

You need to build your custom toolchain.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

I could get it to work, but I needed to do 2 things that I did not really understand:
1. I used the ISA (Instruction Set Architecture) "armv7a". But there are variants of this like "armv7athf". Do you know any documentation where I could look up the "right" ISA-value for my processor (i.MX6UL)?
2. I used build/tmp/environment-setup-cortexa7hf-neon-poky-linux-gnueabi , but there were other files named "environment-setup..." with different contents. Did I use the right one?

Here is what I did:
I added
DEFAULTTUNE ?= "armv7a-neon"
to local.conf (after reading https://lists.yoctoproject.org/pipermail/yocto/2013-June/014105.html) , called 
bitbake -c do_cleansstate meta-toolchain 
bitbake  meta-toolchain
Then I looked for a file "environment-setup..." and found build/tmp/environment-setup-cortexa7hf-neon-poky-linux-gnueabi .
I sourced this file, then I could compile my little program using:
$CC -o tt src/tt.c






More information about the meta-freescale mailing list