gcc: Various fixups to ensure consistent gcc builds

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
be1f70d68b where the interpretor could
become corrupted. This was due to the sed expression corrupting
the source directory.

(From OE-Core rev: 970af6b09e1d69041b0d82fa56ace19543405eb1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-08-09 18:51:44 +01:00
parent 6697ce2885
commit 8f8facbed4
18 changed files with 17 additions and 33 deletions

View 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"

View 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

View 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"""

View 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

View 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"

View File

@ -1,5 +1,3 @@
require gcc-cross_${PV}.bb
require gcc-cross-initial.inc
PR = "r4"

View File

@ -1,4 +1,3 @@
require gcc-cross_${PV}.bb
require gcc-cross-intermediate.inc
PR = "r5"

View File

@ -1,5 +1,3 @@
PR = "r4"
require gcc-${PV}.inc
require gcc-cross4.inc

View File

@ -1,5 +1,3 @@
PR = "r5"
require gcc-csl-arm-2008q1.inc
require gcc-cross4.inc
require gcc-configure-cross.inc

View File

@ -1,4 +1,2 @@
require gcc-cross-initial_${PV}.bb
require gcc-crosssdk-initial.inc
PR = "r4"

View File

@ -1,4 +1,2 @@
require gcc-cross-intermediate_${PV}.bb
require gcc-crosssdk-intermediate.inc
PR = "r4"

View File

@ -1,4 +1,2 @@
require gcc-cross_${PV}.bb
require gcc-crosssdk.inc
PR = "r4"

View 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"

View File

@ -1,5 +1,3 @@
PR = "r6"
require gcc-${PV}.inc
require gcc-configure-runtime.inc
require gcc-package-runtime.inc

View File

@ -1,4 +1,3 @@
PR = "r8"
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc

View File

@ -1,5 +1,3 @@
PR = "r5"
require gcc-${PV}.inc
require gcc-configure-target.inc
require gcc-package-target.inc

View File

@ -1,7 +1,5 @@
require gcc-${PV}.inc
PR = "r0"
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"

View File

@ -1,7 +1,5 @@
require gcc-${PV}.inc
PR = "r1"
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"