[yocto] Best way to custom recipe to build c++ sources

Karim ATIKI karim_atiki at hotmail.com
Thu Jan 5 00:32:25 PST 2017


I'm currently writing a custom recipe that builds a c++ program developped by our team.

It is  a huge c++ program with many contrib dependencies. It's supposed to run on many platforms, including Rpi.


The recipe is really simply, it fetches sources, launches makefiles and install binaries.


Firslty, on my linux, I have created the SDK (with populate_sdk) in order to test the compilation (I installed it into /opt/poky)

So in my makefiles, I have added some compilation flags for the sysroot, ld flags etc.

But for this purpose I was obliged to "source" the environment script provided by the SDK to have the variables such as SDKTARGETSYSROOT, PATH, TARGET_PREFIX correctly set.


My question is:

when I'm writing my final recipe myprog_1.0.bb, I'm not suposed to have a proper SDK installed into /opt/poky ?

When a poky environment is sourced before launching bitbake, are the SDKTARGETSYSROOT set with any value ?


What's the best way to achieve it ?


Thanks.


Z.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170105/f1ad0a91/attachment.html>


More information about the yocto mailing list