I have manually added the flags from CC (-march=armv7-a -marm -mfpu=neon  
-mfloat-abi=hard -mcpu=cortex-a8) to the OECMAKE_C_FLAGS and then it works. I 
try to find a way, where CMAKE works out of the Box with yocto-plugin. I think 
the plugin is the problem for this issue.

-----Ursprüngliche Nachricht-----
Von: Khem Raj [mailto:raj.k...@gmail.com] 
Gesendet: Freitag, 29. Juli 2016 20:46
An: Hartwig, Guido <g.hart...@kostal.com>
Cc: yocto@yoctoproject.org
Betreff: Re: [yocto] Trouble with yocto sdk in collaboration with eclipse and 
cmake


> On Jul 29, 2016, at 1:27 AM, Hartwig, Guido <g.hart...@kostal.com> wrote:
> 
> Hi,
> I have some trouble with the yocto sdk in collaboration with eclipse and 
> yocto CMake project. I have install all necessary eclipse plugins and linked 
> my sdk with the yocto-plugin as described in the manual. When I try to build 
> the "Hello World" yocto cmake project it fails with following message:
> 
> ..
> CMake Error at 
> /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C 
> compiler 
> "/opt/puck/1.0.0/sysroots/x86_64-pucksdk-linux/usr/bin/arm-kostal-linux-gnueabi/arm-kostal-linux-gnueabi-gcc"
>  is not able to compile a simple test program ...
> 
> This error occurs because the compiler is called with the wrong flags.
> The SDK environment-setup script export the following environment 
> variables export CC="arm-kostal-linux-gnueabi-gcc  -march=armv7-a -marm 
> -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a8 --sysroot=$SDKTARGETSYSROOT"
> export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types 
> -fdebug-prefix-map=/home/hartwig02/Workspace/build-puck/build/tmp/work/x86_64-nativesdk-pucksdk-linux/meta-environment-scb/1.0-r8=/usr/src/debug/meta-environment-scb/1.0-r8
>  
> -fdebug-prefix-map=/home/hartwig02/Workspace/build-puck/build/tmp/sysroots/x86_64-linux=
>  
> -fdebug-prefix-map=/home/hartwig02/Workspace/build-puck/build/tmp/sysroots/x86_64-nativesdk-pucksdk-linux=
>  "
> 
> The eclipse environment (set by the yocto plugin) shows the following 
> environment:
> CC = arm-kostal-linux-gnueabi-gcc  -march=armv7-a -marm -mfpu=neon  
> -mfloat-abi=hard -mcpu=cortex-a8 
> --sysroot=/opt/puck/1.0.0/sysroots/cortexa8hf-neon-kostal-linux-gnueab
> i CFLAGS =  
> --sysroot=/opt/puck/1.0.0/sysroots/cortexa8hf-neon-kostal-linux-gnueab
> i OECMAKE_C_COMPILER = arm-kostal-linux-gnueabi-gcc
> OECMAKE_C_FLAGS =    
> --sysroot=/opt/puck/1.0.0/sysroots/cortexa8hf-neon-kostal-linux-gnueabi
> 
> I assume that yocto cmake uses the OECMAKE* variables to build the program.
> The error occurs because the following compiler options (Tunes) are missing 
> "-march=armv7-a -marm -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a8"
> 
> Now my questions
> 1.    Is it right that the yocto plugin cuts off the tunes from the 
> OECMAKE_C_COMPILER?
> 2.    Is there a reason that this compiler options are not appended to the 
> CFLAGS?

CFLAGS should be passed down to cmake build system. That seems to be the 
problem you are seeing. Have you tried to append CFLAGS to OECMAKE_C_FLAGS ?

> 
> Thank you for your help
> 
> 
> 
> Mit freundlichen Grüßen / Kind regards
> 
> KOSTAL Industrie Elektrik GmbH
> 
> Dipl.-Ing.
> Guido Hartwig
> IE1 Entwicklung Elektronik
> R & D Electronics
> 
> Lange Eck 11, 58099 Hagen
> Deutschland / Germany
> Telefon: +49 2331 8040 - 688
> Telefax: +49 2331 8040 - 4660
> E-Mail: g.hart...@kostal.com
> 
> Internet: http://www.kostal.com/industrie
> 
> 
> 
> KOSTAL Industrie Elektrik GmbH - Sitz Lüdenscheid, Registergericht 
> Iserlohn HRB 3924 - USt-Id-Nr./Vat No.: DE 813742170
> Postanschrift: An der Bellmerei 10, D-58513 Lüdenscheid * Telefon: +49  
> 2351 16-0 * Telefax: +49  2351 16-2400
> Werksanschrift: Lange Eck 11, D-58099 Hagen * Tel. +49 2331 8040-601 * 
> Fax +49 2331 8040-602
> Geschäftsführung: Axel Zimmermann, Dipl.-Ing. Marwin Kinzl, Dipl.-Oec. 
> Andreas Kostal
> 
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to