]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc: Ensure that the shared source directory shared the same sstate hashes
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Jan 2012 19:22:44 +0000 (19:22 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 23 Jan 2012 08:58:21 +0000 (08:58 +0000)
The fetch/unpack/patch/headerfix tasks are shared and hence their sstate hashes
should also match. Sadly this is not the case since:

a) gcc-runtime applies an additional patch
b) The do_headerfix task was missing from libgcc
c) The do_headerfix task is a shell task and hence depends
   on all exported variables which can vary between cross and target
   recipes.

To fix this, the patch moves the patch to the common code, adds
the headerfix task to a common include file and disabled shell
dependencies on the do_headerfix task since its clear in this case
we don't need thsoe dependencies since we just call sed.

With this patch applied, all these recipes now share common sstate checksums.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-4.6.inc
meta/recipes-devtools/gcc/gcc-common.inc
meta/recipes-devtools/gcc/gcc-configure-common.inc
meta/recipes-devtools/gcc/gcc-runtime_4.6.bb

index 4bbb2d22dc0cc83a5d3e3e4baa6f6ac3b86a6b63..a76fa0b4cef9cd092a1362d35d639d9088569ac0 100644 (file)
@@ -73,6 +73,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
           file://pr47551.patch \
           file://gcc-arm-set-cost.patch \
           file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
+          file://fortran-cross-compile-hack.patch \
          "
 
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch "
index fe112d9d0a37bed2c1beaba53256db4ca6881359..ed41b0ff8a2a162ec9b2aa75e14eb560644e4597 100644 (file)
@@ -88,3 +88,20 @@ python workshared_clean () {
        bb.note("Removing " + dir)
        oe.path.remove(dir)
 }
+
+do_headerfix () {
+       # Change the default dynamic linker path, in case $base_liddir is non-standard
+       # (e.g. in multilib or sdk cases)
+       #
+       # We want something like the following:
+       #       #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+       # becomes
+       #       #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
+       #
+       sed -i ${S}/gcc/config/*/linux*.h -e \
+               's#\(GLIBC_DYNAMIC_LINKER[^ ]*\) \( *"/lib.*\)/\(.*\)#\1 SYSTEMLIBS_DIR "\3#'
+}
+
+addtask headerfix after do_unpack before do_patch
+
+do_headerfix[vardepvalue] = "PATH"
index d0149801dbb26b7de26d5d325addd274d1d77131..c4b6ac1111b454404a513056e575cd95c4e29629 100644 (file)
@@ -62,21 +62,6 @@ SYSTEMHEADERS = "${target_includedir}"
 SYSTEMLIBS = "${target_base_libdir}/"
 SYSTEMLIBS1 = "${target_libdir}/"
 
-do_headerfix () {
-       # Change the default dynamic linker path, in case $base_liddir is non-standard
-       # (e.g. in multilib or sdk cases)
-       #
-       # We want something like the following:
-       #       #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
-       # becomes
-       #       #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
-       #
-       sed -i ${S}/gcc/config/*/linux*.h -e \
-               's#\(GLIBC_DYNAMIC_LINKER[^ ]*\) \( *"/lib.*\)/\(.*\)#\1 SYSTEMLIBS_DIR "\3#'
-}
-
-addtask headerfix after do_unpack before do_patch
-
 do_configure_prepend () {
        # teach gcc to find correct target includedir when checking libc ssp support
        mkdir -p ${B}/gcc
index 568b5afaa99a537a1d0b87111c6d257ae359b590..97468db29f0c06e08fa03fdd6dacd327e488ecde 100644 (file)
@@ -2,8 +2,6 @@ require gcc-${PV}.inc
 require gcc-configure-runtime.inc
 require gcc-package-runtime.inc
 
-SRC_URI_append = "file://fortran-cross-compile-hack.patch"
-
 ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
 
 EXTRA_OECONF += "--disable-libunwind-exceptions"