[meta-freescale] Porting ltib project to yocto by creating a recipe - link questions

Philip Craig phil at blackmoth.com.au
Sat Apr 20 17:54:59 PDT 2013


On Sun, Apr 21, 2013 at 9:41 AM, Ashwin Kirpalani <akcooper8 at gmail.com> wrote:
> Questions:
> 1. So it seems that some basic linking is not being done (like glibc
> (operator new) as well as linking the GL symbols). Where do I specify these
> libraries in the recipe?

Your makefile needs to specify libraries. You should write your
makefile so that it works without changes, whether building for
OpenEmbedded or not. So the first step is to make sure you can type
'make' in your git tree and have it build correctly natively.

> 2.Also, if you note above, I had to manually include the -I include paths in
> the CXXFLAGS flags inside the makefile. Can this be done automatically in
> the recipe? Isn't that what the DEPENDS variable is for?

You need to specify nonstandard include paths, but not like you have
done. If it works for native builds, then there shouldn't be anything
additional that you need to do. I included these lines in the Makefile
for a gstreamer application I wrote that used appsrc/appsink:

PKG_CONFIG ?= pkg-config
CFLAGS += `$(PKG_CONFIG) --cflags gstreamer-app-0.10`
LDLIBS += `$(PKG_CONFIG) --libs gstreamer-app-0.10`

The DEPENDS variable makes sure that the recipes it depends on have
been built and installed, but it can't automatically add them to
CFLAGS etc if they are installed outside the normal search path.

> 3. The above took a long time for me to figure out. I am still learning the
> ins and outs of writing recipes. If I want to compile a quick program
> natively on the imx6q running yocto, what recipes should I build to give me
> the native gcc toolchain on the imx6Q

I don't know that sorry. But note that if you just want to test
compilation, then you can try using 'bitbake <recipe> -c devshell'.
This will open a new terminal with the environment variables set up
for cross compilation.



More information about the meta-freescale mailing list