[poky] [PATCH 1/2] libgcc: use the new recipe (rather than gcc-runtime) to install libgcc_s.so* and crt*.o
Cui, Dexuan
dexuan.cui at intel.com
Sat Jan 15 22:13:05 PST 2011
Richard Purdie wrote:
> On Sat, 2011-01-15 at 14:12 +0100, Koen Kooi wrote:
>> Op 15 jan 2011, om 12:55 heeft Cui, Dexuan het volgende geschreven:
>>
>>> Koen Kooi wrote:
>>>> Op 15 jan 2011, om 12:23 heeft Dexuan Cui het volgende geschreven:
>>>>
>>>>> Currently gcc-runtime installs the files, but actually
>>>>> gcc-runtime's do_configure checks if the files are available, so
>>>>> before we build gcc-runtime, we should have some recipe install
>>>>> the files first! -- currently gcc-cross-intermediate actually
>>>>> does that(gcc-cross also installs the files, but it installs into
>>>>> the gcc-build-internal* directory), but gcc-cross-intermediate
>>>>> will have its own sysroot in future, after that, gcc-runtime
>>>>> won't build. So let us add this new target recipe and move the
>>>>> installation of the files from gcc-runtime into it.
>>>>
>>>> I understand the problem, but...
>>>>
>>>>> diff --git a/meta/recipes-devtools/gcc/libgcc_4.5.1.bb
>>>>> b/meta/recipes-devtools/gcc/libgcc_4.5.1.bb
>>>>>
>>>>> +do_install () {
>>>>> + target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` +
>>>>> + # Install libgcc from our gcc-cross saved data
>>>>> + install -d ${D}${base_libdir} ${D}${libdir}
>>>>> + cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/*
>>>>> ${D}
>>>>
>>>> ... why can't gcc-cross create the libgcc(-dev) packages? You're
>>>> using the exact files gcc-cross installs, so why have an extra
>>>> recipe? It feels backwards to have one package grab files from
>>>> another package from sysroots and package those.
>>> I discussed this with Richard in the #yocto IRC channel several
>>> days ago.
>>> Richard thinks the packaging of the files should be in a target
>>> recipe rather than a cross one. Cc Richard for further explanation
>>> why doing the packaging in a gcc-cross is a mistake. :-)
>>
>> I know packaging files from gcc-cross leads to all kinds of problems,
>> but you're not using a target recipe, you are now indirectly
>> packaging files from gcc-cross instead of directly.
>
> Looking at the patch, isn't libgcc a target recipe?
>
> The underlying problem here, highlighted when we dived into the
> separate sysroots for the toolchain bootstrap is that gcc-runtime
> builds libstdc ++ against the gcc-cross-intermediate libgcc as its
> the one in the sysroot, not the one from gcc-cross as it should.
>
> I do think we should package things in the target recipe context and I
> think this is what Dexuan's patch is doing.
>
>> Since the files are exactly the same, why is this work around better
>> than just packaging them directly. Or the other options, just
>> building a new libgcc with a "real" recipe.
>
> Building libgcc by itself turns out to be quite horrible to do. I live
> in hope the gcc guys clean it up but until then...
>
> Cheers,
>
> Richard
Hi Richard, Thanks a lot for the explanation!
BTW: after careful checking, I found the crt*.o files are actually not packaged properly into the target image (the log is below) :-(
Looks my patch missed something? But looks the original gcc-runtime recipe also hasn't any special?
I'm debugging this. Any quick hint is appreciate!
NOTE: the following files were installed but not shipped in any package:
/lib/libgcc_s.so
NOTE: /lib/libgcc_s.so
/usr/lib/i586-poky-linux/4.5.1/crtbeginS.o
NOTE: /usr/lib/i586-poky-linux/4.5.1/crtbeginS.o
/usr/lib/i586-poky-linux/4.5.1/crtfastmath.o
NOTE: /usr/lib/i586-poky-linux/4.5.1/crtfastmath.o
/usr/lib/i586-poky-linux/4.5.1/libgcc.a
NOTE: /usr/lib/i586-poky-linux/4.5.1/libgcc.a
/usr/lib/i586-poky-linux/4.5.1/libgcov.a
NOTE: /usr/lib/i586-poky-linux/4.5.1/libgcov.a
/usr/lib/i586-poky-linux/4.5.1/crtend.o
NOTE: /usr/lib/i586-poky-linux/4.5.1/crtend.o
/usr/lib/i586-poky-linux/4.5.1/crtbeginT.o
NOTE: /usr/lib/i586-poky-linux/4.5.1/crtbeginT.o
/usr/lib/i586-poky-linux/4.5.1/crtbegin.o
NOTE: /usr/lib/i586-poky-linux/4.5.1/crtbegin.o
/usr/lib/i586-poky-linux/4.5.1/crtendS.o
NOTE: /usr/lib/i586-poky-linux/4.5.1/crtendS.o
/usr/lib/i586-poky-linux/4.5.1/crtprec32.o
NOTE: /usr/lib/i586-poky-linux/4.5.1/crtprec32.o
/usr/lib/i586-poky-linux/4.5.1/libgcc_eh.a
NOTE: /usr/lib/i586-poky-linux/4.5.1/libgcc_eh.a
/usr/lib/i586-poky-linux/4.5.1/crtprec80.o
NOTE: /usr/lib/i586-poky-linux/4.5.1/crtprec80.o
/usr/lib/i586-poky-linux/4.5.1/crtprec64.o
NOTE: /usr/lib/i586-poky-linux/4.5.1/crtprec64.o
Thanks,
-- Dexuan
More information about the poky
mailing list