[poky] question re gcc-runtime vs libgcc
Angus Lees
guslees at gmail.com
Wed Jan 5 05:44:24 PST 2011
On Sat, Jan 1, 2011 at 12:21, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
>> ok, but where should libgcc be during the linking of libstdc++?
>>
>> As far as I can see, at this point in a clean build libgcc only exists
>> in the temporary gcc-build-internal-* directory, which isn't in the
>> gcc search path. libgcc doesn't make it out into the sysroot until
>> _after_ libstdc++, libssp, etc are built and gcc-runtime is installed.
>> Where should gcc-cross be finding libgcc when linking libstdc++ and
>> friends?
>
> This is a good point. Its finding the libgcc installed by
> gcc-cross-intermediate. This happens to work out ok but its not a good
> design.
I finally got to the bottom of this:
gcc-runtime depends on virtual/${TARGET_PREFIX}gcc (aka gcc-cross) -
even though that compiler isn't functional until after gcc-runtime is
installed (due to missing libgcc).
This usually works by accident because gcc-runtime also depends on
virtual/${TARGET_PREFIX}libc-for-gcc, and {,e}glibc in turn depend on
virtual/${TARGET_PREFIX}gcc-intermediate (aka gcc-cross-intermediate).
gcc-cross-intermediate doesn't play the same libgcc games, so has a
working libgcc without gcc-runtime's cooperation.
This didn't work for me, since my libc-for-gcc arrives precompiled and
so doesn't have the same gcc-intermediate dependency.
My fix was to add a dependency on
virtual/${TARGET_PREFIX}gcc-intermediate to gcc-runtime, as I believe
it should have had originally.
(laverne-4.0)
- Gus
More information about the poky
mailing list