[oe-commits] Richard Purdie : gcc-common/gcc-configure-common: Move gnu-configize to its own shared task

git at git.openembedded.org git at git.openembedded.org
Wed Apr 30 15:39:47 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: 55ed9ffbab5118140baac5d0d29dcc919e1f1668
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=55ed9ffbab5118140baac5d0d29dcc919e1f1668

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Sun Apr 27 01:24:31 2014 +0100

gcc-common/gcc-configure-common: Move gnu-configize to its own shared task

This command modifies ${S} and can race against other tasks running do_configure and
having the scripts disappear from under them. To avoid this move to its own
task and work on the shared work directory as a common task.

It needs to be a python task to avoid lots of shell exported variables as
dependencies.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/gcc/gcc-common.inc           |  3 +++
 meta/recipes-devtools/gcc/gcc-configure-common.inc | 10 +++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index a96bcaa..0408e65 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -89,17 +89,20 @@ SS = "${TMPDIR}/stamps/work-shared/gcc-${PV}-${PR}"
 do_fetch[stamp-base] = "${SS}"
 do_unpack[stamp-base] = "${SS}"
 do_patch[stamp-base] = "${SS}"
+do_preconfigure[stamp-base] = "${SS}"
 SSCLEAN = "${TMPDIR}/stamps/work-shared/gcc-[0-9]*-*"
 do_fetch[stamp-base-clean] = "${SSCLEAN}"
 do_unpack[stamp-base-clean] = "${SSCLEAN}"
 do_unpack[umask] = "022"
 do_patch[stamp-base-clean] = "${SSCLEAN}"
+do_preconfigure[stamp-base-clean] = "${SSCLEAN}"
 
 # SW means Shared Work directory
 SW = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
 SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
 WORKDIR_task-unpack = "${SW}"
 WORKDIR_task-patch = "${SW}"
+WORKDIR_task-preconfigure = "${SW}"
 
 target_includedir ?= "${includedir}"
 target_libdir ?= "${libdir}"
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 3cc5efa..12482f8 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -98,6 +98,14 @@ _EOF
 	mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h
 }
 
+python do_preconfigure () {
+    import subprocess
+    cmd = d.expand('PATH=${PATH} cd ${S} && gnu-configize')
+    subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+}
+addtask do_preconfigure after do_patch before do_configure
+do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"
+
 do_configure () {
 	# Setup these vars for cross building only
 	# ... because foo_FOR_TARGET apparently gets misinterpreted inside the
@@ -126,7 +134,7 @@ do_configure () {
 	export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}"
 	export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}"
 	export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}"
-	(cd ${S} && gnu-configize) || die "failure running gnu-configize"
+
 
 	oe_runconf
 }



More information about the Openembedded-commits mailing list