[yocto] How to include libstdc++ in an image?
Koen Kooi
koen at dominion.thruhere.net
Sat Jun 30 14:56:18 PDT 2012
Op 28 jun. 2012, om 12:56 heeft Paul Eggleton het volgende geschreven:
> On Tuesday 26 June 2012 19:22:20 maniacbug wrote:
>> Hi. I am using denzil, trying to build a core-image-minimal with
>> libstdc++ installed. I want to cross-develop in c++, and run the
>> resulting apps on the image. For now, I am using qemu-arm as the
>> machine. I've been able to build and run core-image-minimal out of the
>> box. build the cross tools, and build apps using the cross tools (and
>> even add ssh to the image). What I cannot figure out how to do is get
>> libstdc++ (and libgcc1 and libc6) onto the target machine.
>>
>> The task-core-standalone-sdk-target looks super promising,
>> seeming to contain the exact pieces I need. I thought I could add this
>> to the IMAGE_INSTALL line in core-image-minimal.bb, and have the libs
>> show up. This didn't happen, so clearly I have some more to learn about
>> poky.
>>
>> Can anyone advise the appropriate way to inject libsdtc++ (and its
>> dependencies) into a poky image? Please note that I do not need to
>> compile/link apps on the target, only run them.
>
> Adding libstdc++ to IMAGE_INSTALL should work - in fact I just tried it and it
> worked here (although I used the alternative of adding it to
> CORE_IMAGE_EXTRA_INSTALL in local.conf, but the result should be the same).
But do note that if you ship libstdc++ without anything linking to it you forego on the linking exception to the GPL. That is general is a Very Bad Thing(TM), so ship a helloword.cpp binary to keep the fsf happy. As an added bonus the helloworld will drag in the lib automatically.
More information about the yocto
mailing list