Openembedded Core Discussions
 help / color / mirror / Atom feed
* [RFC] gcc-cross.inc: Add depedency on BUILD_ARCH
@ 2011-11-23  9:40 Matthew McClintock
  2011-11-24  3:28 ` Khem Raj
  2011-11-24 23:56 ` McClintock Matthew-B29882
  0 siblings, 2 replies; 17+ messages in thread
From: Matthew McClintock @ 2011-11-23  9:40 UTC (permalink / raw)
  To: openembedded-core

Without some sort of dependency on the HOST arch this "fake"
target package will be reused on a 32bit system even if it was
built on a 64bit system.

This new dependecy should prevent that from occuring.

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
Comments? I still this this is VERY BAD since it will trigger
all TARGET cache to be rebuilt just because we changed ARCH.
However, it should generate working sstate-cache. Might
address this issue:

| checking for /home/liut/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/gcc-cross-intermediate-4.6.1+svnr175454-r10/gcc-4_6-branch/build.i686-linux.powerpc-fsl-linux/./gcc/xgcc -B/home/liut/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/gcc-cross-intermediate-4.6.1+svnr175454-r10/gcc-4_6-branch/build.i686-linux.powerpc-fsl-linux/./gcc/ -m32 -mhard-float  -mcpu=e500mc -isystem/home/liut/poky/build_p4080ds_release/tmp/sysroots/p4080ds/usr/include -B/home/liut/poky/build_p4080ds_release/tmp/sysroots/i686-linux/usr/powerpc-fsl-linux/bin/ -B/home/liut/poky/build_p4080ds_release/tmp/sysroots/i686-linux/usr/powerpc-fsl-linux/lib/ -isystem /home/liut/poky/build_p4080ds_release/tmp/sysroots/i686-linux/usr/powerpc-fsl-linux/include -isystem /home/liut/poky/build_p4080ds_release/tmp/sysroots/i686-linux/usr/powerpc-fsl-linux/sys-include --sysroot=/home/liut/poky/build_p4080ds_release/tmp/sysroots/p4080ds-tcbootstrap   option to accept ISO C89... none needed
| checking how to run the C preprocessor... /home/liut/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/gcc-cross-intermediate-4.6.1+svnr175454-r10/gcc-4_6-branch/build.i686-linux.powerpc-fsl-linux/./gcc/xgcc -B/home/liut/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/gcc-cross-intermediate-4.6.1+svnr175454-r10/gcc-4_6-branch/build.i686-linux.powerpc-fsl-linux/./gcc/ -E
| configure: error: in `/home/liut/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/gcc-cross-intermediate-4.6.1+svnr175454-r10/gcc-4_6-branch/build.i686-linux.powerpc-fsl-linux/powerpc-fsl-linux/libgcc':
| configure: error: C preprocessor "/home/liut/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/gcc-cross-intermediate-4.6.1+svnr175454-r10/gcc-4_6-branch/build.i686-linux.powerpc-fsl-linux/./gcc/xgcc -B/home/liut/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/gcc-cross-intermediate-4.6.1+svnr175454-r10/gcc-4_6-branch/build.i686-linux.powerpc-fsl-linux/./gcc/ -E" fails sanity check
| See `config.log' for more details.
| make[1]: *** [configure-target-libgcc] Error 1
| make[1]: Leaving directory `/home/liut/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/gcc-cross-intermediate-4.6.1+svnr175454-r10/gcc-4_6-branch/build.i686-linux.powerpc-fsl-linux'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
| ERROR: Function 'do_compile' failed (see /home/liut/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl-linux/gcc-cross-intermediate-4.6.1+svnr175454-r10/temp/log.do_compile.27393 for further information)

 meta/recipes-devtools/gcc/gcc-4.6.inc   |    2 +-
 meta/recipes-devtools/gcc/gcc-cross.inc |   11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
index f7bcf30..ee42fa7 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r10"
+PR = "r11"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.6.0
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index 5a796bc..9f6d6ad 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -10,3 +10,14 @@ do_compile () {
 	oe_runmake all-host all-target-libgcc
 }
 
+# gcc-cross is special since it builds a HOST binary on
+# as a TARGET recipe. This is a hack to pull in the
+# BUILD_ARCH to the recipe so the sstate-cache is
+# different if the HOST ARCH has changed. By expanding
+# right now we assure it's going to be in the sig
+BUILD_ARCH_EXPANDED := "${BUILD_ARCH}"
+
+# we also add this to the PV so its clear in filenames
+# that this is arch specific even though it's labeled as
+# a target package
+PV .= "+${BUILD_ARCH_EXPANDED}"
-- 
1.7.6.1





^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-11-28 22:57 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23  9:40 [RFC] gcc-cross.inc: Add depedency on BUILD_ARCH Matthew McClintock
2011-11-24  3:28 ` Khem Raj
2011-11-24  3:35   ` McClintock Matthew-B29882
2011-11-24  3:37     ` Khem Raj
2011-11-24  3:55       ` McClintock Matthew-B29882
2011-11-24  3:55         ` McClintock Matthew-B29882
2011-11-24  7:21           ` Khem Raj
2011-11-24  7:29             ` McClintock Matthew-B29882
2011-11-24 10:40               ` Richard Purdie
2011-11-24 10:54               ` Phil Blundell
2011-11-24 18:03                 ` Khem Raj
2011-11-24 18:08                   ` Phil Blundell
2011-11-24 18:29                     ` Khem Raj
2011-11-24 23:56 ` McClintock Matthew-B29882
2011-11-25  0:17   ` Richard Purdie
2011-11-25  1:52     ` McClintock Matthew-B29882
2011-11-28 22:50       ` McClintock Matthew-B29882

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox