[poky] [RFC: enhance toolchain bootstrap process: v3: 0/7] enhance the toolchain bootstrap process
Cui, Dexuan
dexuan.cui at intel.com
Mon Jan 24 09:28:19 PST 2011
Richard Purdie wrote:
> Hi Dexuan,
>
> On Tue, 2011-01-18 at 21:57 +0800, Dexuan Cui wrote:
>> Hi Richard and all,
>>
>> The patch set enhances the toolchain bootstrap process by installing
>> a separate sysroot for each step of the process.
>> The purpose is to avoid file overwriting in the current global
>> sysroot, namely, to fix Bug 239:
>> http://bugzilla.pokylinux.org/show_bug.cgi?id=239
>>
>>
>> The basic idea is straightforward:
>> 1) For gcc-cross-initial and -intermediate, by changing
>> MULTIMACH_TARGET_SYS to install the files into new locations; 2) Fix
>> the build of eglibc-initial, eglibc by using the appropriate
>> compilers, libs, headers; 3) Also make proper changes for the
>> crosssdk/nativesdk version.
>>
>> I've split all the changes into small git commits and each commit
>> should be basically self-explanatory. :-)
>
> I've had a look through this and experimented a little with the code
> and
> I've some feedback:
Hi Richard, thanks very much for the review and feedback!
BTW: I was just about to send out my "RFC v5" patches and I saw the mail. :-)
During the past days, I've been busy with testing and fixing & updating my patches.
The v5 patches are at http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=dcui/tcbp-v5 (actually it's the same as dcui/tcbp-test currently)
The attached v3-to-v5.diff shows the difference from v3 to v5:
1) fix several typos for "_prepend_virtclass-nativesdk": previously I used the wrong "_virtclass-nativesdk_prepend"!
2) in eglibc-initial.inc, now the line is
STAGING_BINDIR_TOOLCHAIN_prepend = "${STAGING_DIR_NATIVE}${bindir_native}/${BASEPKG_HOST_SYS}.gcc-cross-initial:"
Previously, I used HOST_SYS rather than BASEPKG_HOST_SYS. Actually HOST_SYS is not ok because this breaks arm/ppc builds.
3) similarly,
in eglibc.inc:
STAGING_BINDIR_TOOLCHAIN_prepend: HOST_SYS --> BASEPKG_HOST_SYS
CPPFLAGS_prepend: TARGET_SYS -> BASEPKG_TARGET_SYS
in gcc-cross-intermediate.inc:
GCC_CROSS_INTERMEDIATE_WITH_BUILD_SYSROOT: TARGET_SYS --> BASEPKG_TARGET_SYS
4) in eglibc-initial.inc:
use a "for t in ..." loop to replace the previous 3 statements.
5) add the code for glibc and glibc-initial similarly.
6) bump PRs accordingly.
I'll send my current test results later.
> sstate.bbclass: allow each step of toolchain bootstrap processes to
> do populate_sysroot independently cross.bbclass: make
> MULTIMACH_TARGET_SYS adjustable for bindir, libdir, libexecdir
>
> These two are fine.
Thanks a lot for your previous great suggestion about MULTIMACH_TARGET_SYS. :-)
>
> gcc-cross-initial, gcc-crosssdk-initial: change
> CROSS_TARGET_SYS_DIR and insall into new locations
>
> This change is ok but its incomplete. Why? If I apply this change and
> try a build, things won't work as it needs bits from later commits. To
I split my changes into small commits for easy review. Sorry, I didn't try to ensure every commit should be buildable. :-)
> illustrate this and some other details, take a look at:
>
> http://git.pokylinux.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/tt-bootstrap&id=5512f876b103987b74722a7788a1ebe797852bbe
>
> Here I've updated glibc and eglibc to use the new locations so the
> change will allow a build to succeed in its own right. Notice that
> I've
> simplified the variables quite a bit too.
OK, I'll look at this branch carefully and see if anything in my v3-to-v5.diff should be added into this branch.
> There is also a subsequent commit on the branch to enable this change
> for gcc-cross-intermediate.
>
> eglibc-initial, eglibc-initial-nativesdk: install into individual
> sysroots gcc-cross-intermediate, gcc-crosssdk-intermediate: change
> CROSS_TARGET_SYS_DIR and insall into new locations cross.bbclass:
> modify sysroot_stage_all to allow gcc-{cross,crossdk}-intermediate
> to populate the libgcc_s.so* files eglibc, eglibc-nativesdk: fix the
> build due to changes to eglibc-initial and gcc-cross-intermediate
>
> These other changes need separating out more cleanly. For example,
> adding a patch to gcc should be a separate commit, the update to use a
> new sysroot directory should probably be one commit so builds work
> before and after it.
OK, I'll think about how to organize the changes properly. Thanks for the suggestions!
>
> I'm also wondering if there isn't a neater way to handle the target
> sysroot problem instead of the prefixes you're using. I'll send an
> update as and when I've experimented a little to determine if this is
> possible.
Thanks a lot for the help!
Thanks,
-- Dexuan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3-to-v5.diff
Type: application/octet-stream
Size: 9913 bytes
Desc: v3-to-v5.diff
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20110125/6743e262/attachment.obj>
More information about the poky
mailing list