]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc: Various fixups to ensure consistent gcc builds
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 9 Aug 2011 17:51:44 +0000 (18:51 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Aug 2011 15:28:21 +0000 (16:28 +0100)
We ensure that:
* the shared work directory contains PR and ensure PR values are consistent across gcc builds
* the regexp to handle library directories is in a specific task and run once

This avoids breakage that was seen in incremental builds after commit
be1f70d68b6b75772ebab8bdff683ddd7c42b0cd where the interpretor could
become corrupted. This was due to the sed expression corrupting
the source directory.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
18 files changed:
meta/recipes-devtools/gcc/gcc-4.5.1.inc
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-cross-canadian_4.5.1.bb
meta/recipes-devtools/gcc/gcc-cross-initial_4.5.1.bb
meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.1.bb
meta/recipes-devtools/gcc/gcc-cross_4.5.1.bb
meta/recipes-devtools/gcc/gcc-cross_csl-arm-2008q1.bb
meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.5.1.bb
meta/recipes-devtools/gcc/gcc-crosssdk-intermediate_4.5.1.bb
meta/recipes-devtools/gcc/gcc-crosssdk_4.5.1.bb
meta/recipes-devtools/gcc/gcc-csl-arm-2008q1.inc
meta/recipes-devtools/gcc/gcc-runtime_4.5.1.bb
meta/recipes-devtools/gcc/gcc_4.5.1.bb
meta/recipes-devtools/gcc/gcc_csl-arm-2008q1.bb
meta/recipes-devtools/gcc/libgcc_4.5.1.bb
meta/recipes-devtools/gcc/libgcc_4.6.bb

index 1b21a75eb39ad473f9d7a4d5567a9e77d4f5c0f6..6eb30443f04d63664e224328d95acc62b93d2b61 100644 (file)
@@ -1,5 +1,7 @@
 require gcc-common.inc
 
+PR = "r8"
+
 DEPENDS =+ "mpfr gmp libmpc elfutils"
 NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native elfutils-native"
 
index f952ac88d994daa20311e4d4e286c9a4c4b2187a..0a148b43b71cebdbad3dc66074e2bf2320ec1b1a 100644 (file)
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r4"
+PR = "r7"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.6.0
@@ -73,7 +73,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
 
 #S = "${WORKDIR}/${BRANCH}"
-S = "${TMPDIR}/work-shared/gcc-${PV}/${BRANCH}"
+S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${BRANCH}"
 B = "${WORKDIR}/${BRANCH}/build.${HOST_SYS}.${TARGET_SYS}"
 
 # Language Overrides
index 1684e78febd420029f40cd1650d137e320ca96ff..52431fa4f2500bbd2f57edcfb939d689e8c491a2 100644 (file)
@@ -40,17 +40,18 @@ ${GNU_MIRROR}/gcc/  http://gcc.get-software.com/releases/ \n \
 gcclibdir = "${libdir}/gcc"
 BINV = "${PV}"
 #S = "${WORKDIR}/gcc-${PV}"
-S = "${TMPDIR}/work-shared/gcc-${PV}/gcc-${PV}"
+S = "${TMPDIR}/work-shared/gcc-${PV}/gcc-${PV}-${PR}"
 B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
 
 # SS means Shared Stamps directory
-SS = "${TMPDIR}/stamps/work-shared/gcc-${PV}"
+SS = "${TMPDIR}/stamps/work-shared/gcc-${PV}-${PR}"
 do_fetch[stamp-base] = "${SS}"
 do_unpack[stamp-base] = "${SS}"
+do_headerfix[stamp-base] = "${SS}"
 do_patch[stamp-base] = "${SS}"
 
 # SW means Shared Work directory
-SW = "${TMPDIR}/work-shared/gcc-${PV}"
+SW = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
 WORKDIR_task-unpack = "${SW}"
 WORKDIR_task-patch = "${SW}"
 
@@ -61,7 +62,7 @@ target_prefix ?= "${prefix}"
 
 CLEANFUNCS += "workshared_clean"
 # The do_clean should be exclusive since share ${S}
-do_clean[lockfiles] = "${TMPDIR}/stamps/work-shared/gcc-${PV}.clean.lock"
+do_clean[lockfiles] = "${SW}.clean.lock"
 
 python workshared_clean () {
        """clear the source directory"""
index 869d1b6d60535c826a8200f366e86611c15e7258..2ddc3d7c9f2ea4f6fe6b34d9c78e9a5c386c3b08 100644 (file)
@@ -61,9 +61,9 @@ SYSTEMHEADERS = "${target_includedir}"
 SYSTEMLIBS = "${target_base_libdir}/"
 SYSTEMLIBS1 = "${target_libdir}/"
 
-do_configure_prepend () {
-       # Change the default dynamic linker path, only useful for SDK, other's value
-       # are not changed according to the SYSTEMLIBS_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"
@@ -72,7 +72,11 @@ do_configure_prepend () {
        #
        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
        echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe
index 92708d44e7db04525066dc29b0ca84a81011e9bd..da3210fc3511f0c457ca70767740ea032b0e4b44 100644 (file)
@@ -5,8 +5,6 @@ require gcc-cross-canadian.inc
 require gcc-configure-sdk.inc
 require gcc-package-sdk.inc
 
-PR = "r4"
-
 DEPENDS += "gmp-nativesdk mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
 RDEPENDS_${PN} += "mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
 
index 081b7d60fb5946d582bc1423e1e549b731972787..16d8181774d11183752a5012c50f9d30d1fbd1c4 100644 (file)
@@ -1,5 +1,3 @@
 require gcc-cross_${PV}.bb
 require gcc-cross-initial.inc
 
-PR = "r4"
-
index a8473b0ebe7b7b3ea493f632ae1a4f0876095631..42fd0f0f5907946c8311e8b30ffe045e0e0d046a 100644 (file)
@@ -1,4 +1,3 @@
 require gcc-cross_${PV}.bb
 require gcc-cross-intermediate.inc
-PR = "r5"
 
index af6daf41bdc6f1ff532ac592a7778aff26f1e179..97a0c8192085b34eba665e05dd565b5cf397e0cf 100644 (file)
@@ -1,5 +1,3 @@
-PR = "r4"
-
 require gcc-${PV}.inc
 require gcc-cross4.inc
 
index 3c9a7f85b4ceba246cb868ad887a8e1fce87d518..58eba46ddd57fad7c36f666f98f98add108f84d0 100644 (file)
@@ -1,5 +1,3 @@
-PR = "r5"
-
 require gcc-csl-arm-2008q1.inc
 require gcc-cross4.inc
 require gcc-configure-cross.inc
index 970824805fcf196ab312bb41663eea8b01a25db8..0c9fdd3449f558933223d8a41315029aa8aa0ff5 100644 (file)
@@ -1,4 +1,2 @@
 require gcc-cross-initial_${PV}.bb
 require gcc-crosssdk-initial.inc
-
-PR = "r4"
index d23596959139503c9115e70b81ef1649eeae1bb7..1aa588ac9fa04d69e0a3a1e2e7e5c084a5a73265 100644 (file)
@@ -1,4 +1,2 @@
 require gcc-cross-intermediate_${PV}.bb
 require gcc-crosssdk-intermediate.inc
-
-PR = "r4"
index bae238970a6a365598961a98016946407bd58ed1..7430888ed766b2fa9a93d73c237b8159f7036d80 100644 (file)
@@ -1,4 +1,2 @@
 require gcc-cross_${PV}.bb
 require gcc-crosssdk.inc
-
-PR = "r4"
index cb5b087286a4668f819ba8e53a799b3244fb7c90..062f1c5a47ae405142c4b80abadc702cf3d91e5f 100644 (file)
@@ -2,6 +2,7 @@ require gcc-common.inc
 
 BINV = "4.2.3"
 PV = "4.2.3+csl-arm-2008q1-126"
+PR = "r6"
 
 FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
 
index 0a7056c228aff2d97e138ac14f2d0afc28457e0d..bd3bacfe3a8c71f71badf8827cdd2ceb5b52c0bf 100644 (file)
@@ -1,5 +1,3 @@
-PR = "r6"
-
 require gcc-${PV}.inc
 require gcc-configure-runtime.inc
 require gcc-package-runtime.inc
index f036cb146b936baca885926be377119b1e3e0104..4dfb12e82e182e2cbefc198600311769a97876f8 100644 (file)
@@ -1,4 +1,3 @@
-PR = "r8"
 require gcc-${PV}.inc
 require gcc-configure-target.inc
 require gcc-package-target.inc
index 9fd2b0acc311b6b33f4a9737ef054c63ca1e79dc..5bb8e58dcdf50911d614e1537ece5213be0611b7 100644 (file)
@@ -1,5 +1,3 @@
-PR = "r5"
-
 require gcc-${PV}.inc
 require gcc-configure-target.inc
 require gcc-package-target.inc
index b0523c78acfc3762ac7ff6f1d1b687bf9a8e3e6b..49555377c9e0813744d1c9fd703eaaaa314b30e3 100644 (file)
@@ -1,7 +1,5 @@
 require gcc-${PV}.inc
 
-PR = "r0"
-
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
 
index a6e1146be9d9213056ac607f3808bf6251234adf..81664e3465f4d914dda0f6b5425d750b6e5ca7bd 100644 (file)
@@ -1,7 +1,5 @@
 require gcc-${PV}.inc
 
-PR = "r1"
-
 INHIBIT_DEFAULT_DEPS = "1"
 DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"