Patchwork [0/6,V3] Share gcc work directories

login
register
mail settings
Submitter Robert Yang
Date June 18, 2011, 12:41 p.m.
Message ID <cover.1308391365.git.liezhi.yang@windriver.com>
Download mbox
Permalink /patch/6093/
State New, archived
Headers show

Pull-request

git://git.pokylinux.org/poky-contrib robert/share_gcc

Comments

Robert Yang - June 18, 2011, 12:41 p.m.
Changes of V3:

1) Use --with-headers to replace the:

   sed -i 's:^\([ ]*\)glibc_header_dir=\"${with_build_sysroot}/usr/include\": ...

2) Fix the build of gcc-cross-canadian

3) Fix gcc-crosssdk which make the source incompatible during its
   building.

4) Test "bitbake meta-toolchain", and also do run test for the
   pokysdk(unpack the toolchain to /opt, setup the env by sourcing
   environment-setup-armv5te-poky-linux-gnueabi, and build some pkgs
   out of poky, then use command file to check the binary file type.

5) Make sure that no gcc build would make the source incompatible,
   except gcc-cross_csl-arm-2008q1.bb, but I think this is fine, its
   BINV = "4.2.3", not 4.5.1 or 4.6.0.

Thanks for Richard's great help.

// Robert


The following changes since commit 2163461ec94528ecf046a04edc5db3d2dd3a6b8b:

  systemtap: remove non-core COMPATIBLE_MACHINES (2011-06-16 22:14:06 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/share_gcc
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/share_gcc

Robert Yang (6):
  bitbake: share source directory
  Share gcc work directories
  gcc-4.5.1: share work directories
  gcc-4.6.0: share work directories
  gcc-crosssdk: share work directories
  gcc-cross-canadian: share work directories

 bitbake/lib/bb/build.py                            |    4 +-
 bitbake/lib/bb/cache.py                            |    3 +
 bitbake/lib/bb/runqueue.py                         |   10 +++
 meta/recipes-devtools/gcc/gcc-4.5.1.inc            |    1 +
 .../gcc-4.5.1/use-defaults.h-and-t-oe-in-B.patch   |   57 ++++++++++++++
 meta/recipes-devtools/gcc/gcc-4.6.0.inc            |    1 +
 .../gcc-4.6.0/use-defaults.h-and-t-oe-in-B.patch   |   80 ++++++++++++++++++++
 meta/recipes-devtools/gcc/gcc-common.inc           |   32 +++++++-
 meta/recipes-devtools/gcc/gcc-configure-common.inc |   33 ++++-----
 meta/recipes-devtools/gcc/gcc-configure-cross.inc  |    4 +-
 meta/recipes-devtools/gcc/gcc-configure-sdk.inc    |    8 ++
 meta/recipes-devtools/gcc/gcc-crosssdk.inc         |   13 +++-
 12 files changed, 220 insertions(+), 26 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.5.1/use-defaults.h-and-t-oe-in-B.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/use-defaults.h-and-t-oe-in-B.patch
Koen Kooi - June 18, 2011, 12:50 p.m.
Op 18 jun 2011, om 14:41 heeft Robert Yang het volgende geschreven:

> Changes of V3:
> 
> 1) Use --with-headers to replace the:
> 
>   sed -i 's:^\([ ]*\)glibc_header_dir=\"${with_build_sysroot}/usr/include\": ...
> 
> 2) Fix the build of gcc-cross-canadian
> 
> 3) Fix gcc-crosssdk which make the source incompatible during its
>   building.
> 
> 4) Test "bitbake meta-toolchain", and also do run test for the
>   pokysdk(unpack the toolchain to /opt, setup the env by sourcing
>   environment-setup-armv5te-poky-linux-gnueabi, and build some pkgs
>   out of poky, then use command file to check the binary file type.
> 
> 5) Make sure that no gcc build would make the source incompatible,
>   except gcc-cross_csl-arm-2008q1.bb, but I think this is fine, its
>   BINV = "4.2.3", not 4.5.1 or 4.6.0.


How does this interact with rm_work?

regards,

Koen
Robert Yang - June 20, 2011, 1:48 a.m.
On 06/18/2011 08:50 PM, Koen Kooi wrote:
>
> Op 18 jun 2011, om 14:41 heeft Robert Yang het volgende geschreven:
>
>> Changes of V3:
>>
>> 1) Use --with-headers to replace the:
>>
>>    sed -i 's:^\([ ]*\)glibc_header_dir=\"${with_build_sysroot}/usr/include\": ...
>>
>> 2) Fix the build of gcc-cross-canadian
>>
>> 3) Fix gcc-crosssdk which make the source incompatible during its
>>    building.
>>
>> 4) Test "bitbake meta-toolchain", and also do run test for the
>>    pokysdk(unpack the toolchain to /opt, setup the env by sourcing
>>    environment-setup-armv5te-poky-linux-gnueabi, and build some pkgs
>>    out of poky, then use command file to check the binary file type.
>>
>> 5) Make sure that no gcc build would make the source incompatible,
>>    except gcc-cross_csl-arm-2008q1.bb, but I think this is fine, its
>>    BINV = "4.2.3", not 4.5.1 or 4.6.0.
>
>
> How does this interact with rm_work?
>

The rm_work does not delete anything in work-shared, I think this is fine,
otherwise the source can not be shared.

// Robert

> regards,
>
> Koen
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Khem Raj - June 20, 2011, 9:01 p.m.
On Sun, Jun 19, 2011 at 6:48 PM, Robert Yang <liezhi.yang@windriver.com> wrote:
>> How does this interact with rm_work?
>>
>
> The rm_work does not delete anything in work-shared, I think this is fine,
> otherwise the source can not be shared.
>

it also limits the possibility of patching the sources differently if need be.
Can it do that easily suppose gcc intermediate needs a patch for a given arch
and others don't then can it make gcc cross intermediate not use shared source
Robert Yang - June 21, 2011, 1:27 a.m.
On 06/21/2011 05:01 AM, Khem Raj wrote:
> On Sun, Jun 19, 2011 at 6:48 PM, Robert Yang<liezhi.yang@windriver.com>  wrote:
>>> How does this interact with rm_work?
>>>
>>
>> The rm_work does not delete anything in work-shared, I think this is fine,
>> otherwise the source can not be shared.
>>
>
> it also limits the possibility of patching the sources differently if need be.
> Can it do that easily suppose gcc intermediate needs a patch for a given arch


Yes, the source must be the same if they want to use the shared source. When we
want to patch the source, I think proper way is try to patch them general(not
only for a given arch).

> and others don't then can it make gcc cross intermediate not use shared source

Yes, when the following variables are not defined(or defined to other value)
for gcc intermediate, then it would not use the shared source.


S = "${TMPDIR}/work-shared/gcc-${PV}/gcc-${PV}"
B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"

# SS means Shared Stamps directory
SS = "${TMPDIR}/stamps/work-shared/gcc-${PV}"
do_fetch[stamp-base] = "${SS}"
do_unpack[stamp-base] = "${SS}"
do_patch[stamp-base] = "${SS}"

# SW means Shared Work directory
SW = "${TMPDIR}/work-shared/gcc-${PV}"
WORKDIR_task-unpack = "${SW}"
WORKDIR_task-patch = "${SW}"

// Robert

>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>