I have built a nice core-image-x11 for Colibri T20 using Poky jethro distribution. All worked fine.
Now I need to compile our project for this platform.
Firstly, I chose to get the gcc-linaro (gnueabihf) compiler.
But actually I need to link the application with X11, gtk etc.
I understand that I need an SDK sysroot with the requested libs (x11 etc.)
But gcc-linaro does not provide a sysroot as it’s only a toolchain.
Finally, I’ve downloaded the poky toolchain installer 2.0.1 which provides a cross compilation tools and a sysroot. Perfect.
But it appears that the poky-linux-gnueabi compiler does not support hard float (compilation errors).
Does anybody already experienced this issue ?
Is there an existing workaround ?
I thought about using gcc-linary compiler with the sysroots provided in Poky SDK ?
Hi Marcel, yes that was also part of my question. There is indeed no reason that I can’t use the sysroot with any existing cross-compiler.
That’s what I will test right now.
Not recommended but cheap:
You install the development headers of your build host and link against the rootfs created with bitbake.
Better, but more initial work:
You create your image with bitbake and use the resulting target sysroot to get the development headers for compiling and the target libraries for linking against.
Often passing --sysroot= is enough to tell the compiler and linker were to look for stuff.
One can use the cross toolchain that OE built or a 3rd party, e.g. Linaro toolchain.
Even better, but again more initial work:
Using bitbake to create an SDK tailered to your image. bitbake <image-name> -c populate-sdk
and install the resulting SDK, source the environment script start using the toolchain and sysroot.
For the first two option we have various setup variants on the Hello World page, for the last one you could have a look at the following presentation.
I chose the 3rd option with success.
In a production context, it appears to be the most reliable even though the 2nd option might be considered in a simple “dev” / “prototyping” context.