Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] gcc: Ensure that the shared source directory shared the same sstate hashes
Date: Thu, 19 Jan 2012 19:38:40 +0000	[thread overview]
Message-ID: <1327001920.23015.1.camel@ted> (raw)

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>
---
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
index 4bbb2d2..a76fa0b 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
@@ -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 "
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index fe112d9..ed41b0f 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -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"
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index d014980..c4b6ac1 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -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
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.6.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.6.bb
index 568b5af..97468db 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime_4.6.bb
+++ b/meta/recipes-devtools/gcc/gcc-runtime_4.6.bb
@@ -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"





             reply	other threads:[~2012-01-19 19:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 19:38 Richard Purdie [this message]
2012-01-20  8:19 ` [PATCH] gcc: Ensure that the shared source directory shared the same sstate hashes Saul Wold
2012-01-20  8:49   ` Lu, Lianhao
2012-01-20 13:38     ` Richard Purdie
2012-01-20 17:04   ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1327001920.23015.1.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox