All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
@ 2010-07-21 18:04 Khem Raj
  2010-07-21 18:04 ` [PATCH 1/4] classes, bitbake.conf: " Khem Raj
                   ` (7 more replies)
  0 siblings, 8 replies; 35+ messages in thread
From: Khem Raj @ 2010-07-21 18:04 UTC (permalink / raw)
  To: openembedded-devel

Hi

The following 4 patches are based on  Jushua's work in poky to get rid of
cross dir and install the toolchain in  native sysroot.

I have done native-sdk-builds for uclibc and eglibc. It could build the images
and the images booted fine in qemu on mips and arm.

I would  appreciate if someone could lend a hand in testing these patches

And as we have changed tmpdir layout with this patch I have also bumped ABI
which means tmp has to be nuked before you try these patches.

Please review/ack/nack

Thanks
-Khem






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

* [PATCH 1/4] classes, bitbake.conf: Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-21 18:04 [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Khem Raj
@ 2010-07-21 18:04 ` Khem Raj
  2010-07-21 21:52   ` Tom Rini
  2010-07-21 18:04 ` [PATCH 2/4] toolchain: Remove references to CROSS_DIR Khem Raj
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 35+ messages in thread
From: Khem Raj @ 2010-07-21 18:04 UTC (permalink / raw)
  To: openembedded-devel

* Update references to CROSS_DIR in classes and bitbake.conf.
* This patch is based on Joshua Lock's work in poky.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 classes/cmake.bbclass            |    2 +-
 classes/cross.bbclass            |    8 ++++----
 classes/glibc-package.bbclass    |    8 ++++----
 classes/icecc.bbclass            |    6 +++---
 classes/nativesdk.bbclass        |    2 --
 classes/packaged-staging.bbclass |    5 -----
 conf/bitbake.conf                |    7 ++-----
 7 files changed, 14 insertions(+), 24 deletions(-)

diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass
index 2047b58..2376012 100644
--- a/classes/cmake.bbclass
+++ b/classes/cmake.bbclass
@@ -37,7 +37,7 @@ cmake_do_generate_toolchain_file() {
 
 # only search in the paths provided (from openembedded) so cmake doesnt pick
 # up libraries and tools from the native build machine
-  echo "set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} )" >> ${WORKDIR}/toolchain.cmake
+  echo "set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${STAGING_DIR_NATIVE}${prefix_native} )" >> ${WORKDIR}/toolchain.cmake
   echo "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )" >> ${WORKDIR}/toolchain.cmake
   echo "set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )" >> ${WORKDIR}/toolchain.cmake
   echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )" >> ${WORKDIR}/toolchain.cmake
diff --git a/classes/cross.bbclass b/classes/cross.bbclass
index 4cf2b4c..75b2abe 100644
--- a/classes/cross.bbclass
+++ b/classes/cross.bbclass
@@ -1,5 +1,5 @@
 # Disabled for now since the relocation paths are too long
-#inherit relocatable
+inherit relocatable
 
 # Cross packages are built indirectly via dependency,
 # no need for them to be a direct target of 'world'
@@ -44,9 +44,9 @@ target_base_libdir := "${base_libdir}"
 target_prefix := "${prefix}"
 
 # Overrides for paths
-prefix = "${CROSS_DIR}"
-base_prefix = "${prefix}"
-exec_prefix = "${prefix}"
+prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
+base_prefix = "${STAGING_DIR_NATIVE}"
+exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
 base_sbindir = "${base_prefix}/bin"
 sbindir = "${exec_prefix}/bin"
 
diff --git a/classes/glibc-package.bbclass b/classes/glibc-package.bbclass
index d47c914..36424d5 100644
--- a/classes/glibc-package.bbclass
+++ b/classes/glibc-package.bbclass
@@ -104,11 +104,11 @@ do_prep_locale_tree() {
 		gunzip $i
 	done
 	ls -d ${PKGD}${base_libdir}/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
-	if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so ]; then
-		cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
+	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.so ]; then
+		cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.so $treedir/lib
 	fi
-	if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* ]; then
-		cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* $treedir/lib
+	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.so.* ]; then
+		cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.so.* $treedir/lib
 	fi
 	install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin
 }
diff --git a/classes/icecc.bbclass b/classes/icecc.bbclass
index 36cc231..938f199 100644
--- a/classes/icecc.bbclass
+++ b/classes/icecc.bbclass
@@ -46,7 +46,7 @@ def create_cross_env(bb,d):
         return ""
 
     import tarfile, socket, time
-    ice_dir = bb.data.expand('${CROSS_DIR}', d)
+    ice_dir = bb.data.expand('${STAGING_DIR_NATIVE}${prefix_native}', d)
     staging_dir = bb.data.expand('${STAGING_DIR_TARGET}', d)
     prefix  = bb.data.expand('${HOST_PREFIX}' , d)
     distro  = bb.data.expand('${DISTRO}', d)
@@ -96,7 +96,7 @@ def create_cross_env(bb,d):
 
 def create_native_env(bb,d):
     import tarfile, socket, time
-    ice_dir = bb.data.expand('${CROSS_DIR}', d)
+    ice_dir = bb.data.expand('${STAGING_DIR_NATIVE}${prefix_native}', d)
     prefix  = bb.data.expand('${HOST_PREFIX}' , d)
     distro  = bb.data.expand('${DISTRO}', d)
     target_sys = bb.data.expand('${TARGET_SYS}',  d)
@@ -143,7 +143,7 @@ def get_cross_kernel_cc(bb,d):
 
 def create_cross_kernel_env(bb,d):
     import tarfile, socket, time
-    ice_dir = bb.data.expand('${CROSS_DIR}', d)
+    ice_dir = bb.data.expand('${STAGING_DIR_NATIVE}${prefix_native}', d)
     prefix  = bb.data.expand('${HOST_PREFIX}' , d)
     distro  = bb.data.expand('${DISTRO}', d)
     target_sys = bb.data.expand('${TARGET_SYS}',  d)
diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass
index 75f5790..ddaab85 100644
--- a/classes/nativesdk.bbclass
+++ b/classes/nativesdk.bbclass
@@ -18,8 +18,6 @@ python () {
 #STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
 #STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk"
 
-CROSS_DIR = "${TMPDIR}/cross/${HOST_ARCH}"
-
 HOST_ARCH = "${SDK_ARCH}"
 HOST_VENDOR = "${SDK_VENDOR}"
 HOST_OS = "${SDK_OS}"
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index 670fd1c..fda1431 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -130,7 +130,6 @@ def pstage_cleanpackage(pkgname, d):
 	else:
 		bb.debug(1, "Manually removing any installed files from staging...")
 		pstage_manualclean("sysroots", "STAGING_DIR", d)
-		pstage_manualclean("cross", "CROSS_DIR", d)
 		pstage_manualclean("deploy", "DEPLOY_DIR", d)
 
 	bb.utils.unlockfile(lf)
@@ -307,7 +306,6 @@ python packagedstage_stampfixing_eventhandler() {
 populate_sysroot_preamble () {
 	if [ "$PSTAGING_ACTIVE" = "1" ]; then
 		stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true
-		stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u || true
 	fi
 }
 
@@ -323,7 +321,6 @@ populate_sysroot_postamble () {
 		if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
 			exit $exitcode
 		fi
-		stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u -d ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}
 		if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
 			exit $exitcode
 		fi
@@ -334,9 +331,7 @@ populate_sysroot_postamble () {
 packagedstaging_fastpath () {
 	if [ "$PSTAGING_ACTIVE" = "1" ]; then
 		mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/
-		mkdir -p ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}/
 		cp -fpPR ${SYSROOT_DESTDIR}/${STAGING_DIR}/* ${PSTAGE_TMPDIR_STAGE}/sysroots/ || /bin/true
-		cp -fpPR ${SYSROOT_DESTDIR}/${CROSS_DIR}/* ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}/ || /bin/true
 	fi
 }
 
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 69d00e2..748abba 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -410,10 +410,7 @@ EXTRA_IMAGEDEPENDS = ""
 ##################################################################
 # Toolchain info.
 ##################################################################
-
-CROSS_DIR = "${TMPDIR}/cross/${BASE_PACKAGE_ARCH}"
-CROSS_DATADIR = "${CROSS_DIR}/share"
-PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_BINDIR_CROSS_BASEPKG}:${STAGING_SBINDIR_NATIVE}:${STAGING_BINDIR_NATIVE}:${CROSS_DIR}/${bindir_cross}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:"
+PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}/${base_bindir_native}:"
 export PATH
 
 ##################################################################
@@ -422,7 +419,7 @@ export PATH
 
 CCACHE ?= ""
 TOOLCHAIN_OPTIONS = ""
-TOOLCHAIN_PATH ?= "${CROSS_DIR}"
+TOOLCHAIN_PATH ?= "${STAGING_DIR_NATIVE}${prefix_native}"
 TOOLCHAIN_SYSPATH ?= "${TOOLCHAIN_PATH}/${TARGET_SYS}"
 
 export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
-- 
1.7.1




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

* [PATCH 2/4] toolchain: Remove references to CROSS_DIR
  2010-07-21 18:04 [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Khem Raj
  2010-07-21 18:04 ` [PATCH 1/4] classes, bitbake.conf: " Khem Raj
@ 2010-07-21 18:04 ` Khem Raj
  2010-07-21 21:52   ` Tom Rini
  2010-07-21 18:04 ` [PATCH 3/4] recipes: Fix " Khem Raj
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 35+ messages in thread
From: Khem Raj @ 2010-07-21 18:04 UTC (permalink / raw)
  To: openembedded-devel

* Toolchain is installed into native sysroot now.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 recipes/binutils/binutils-cross.inc                |   20 +++++++++---------
 recipes/eglibc/eglibc-package.bbclass              |    4 +-
 recipes/gcc/gcc-configure-sdk.inc                  |   22 ++++++++++----------
 recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb    |    4 +-
 .../gcc/gcc-cross-intermediate_csl-arm-2007q3.bb   |    4 +-
 recipes/gcc/gcc-cross-kernel.inc                   |    2 +-
 recipes/gcc/gcc-cross-sdk_3.4.4.bb                 |    4 +-
 recipes/gcc/gcc-cross_csl-arm-2007q3.bb            |    6 ++--
 recipes/gcc/gcc-cross_csl-arm-2008q1.bb            |    6 ++--
 recipes/gcc/gcc-cross_csl-arm-2008q3.bb            |    6 ++--
 recipes/gcc/gcc-package-cross.inc                  |    8 +++---
 11 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/recipes/binutils/binutils-cross.inc b/recipes/binutils/binutils-cross.inc
index 432e1a7..f3ba5c3 100644
--- a/recipes/binutils/binutils-cross.inc
+++ b/recipes/binutils/binutils-cross.inc
@@ -16,14 +16,14 @@ do_install () {
 	${D}${libdir}/libiberty_pic.a
 
 	# We don't really need these, so we'll remove them...
-	rm -rf ${D}${CROSS_DIR}/lib/ldscripts
-	rm -rf ${D}${CROSS_DIR}/share/info
-	rm -rf ${D}${CROSS_DIR}/share/locale
-	rm -rf ${D}${CROSS_DIR}/share/man
-	rmdir ${D}${CROSS_DIR}/share || :
-	rmdir ${D}${CROSS_DIR}/${libdir}/gcc-lib || :
-	rmdir ${D}${CROSS_DIR}/${libdir}64/gcc-lib || :
-	rmdir ${D}${CROSS_DIR}/${libdir} || :
-	rmdir ${D}${CROSS_DIR}/${libdir}64 || :
-	rmdir ${D}${CROSS_DIR}/${prefix} || :
+	rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/ldscripts
+	rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/info
+	rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/locale
+	rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/man
+	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/share || :
+	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}/gcc-lib || :
+	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64/gcc-lib || :
+	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir} || :
+	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || :
+	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || :
 }
diff --git a/recipes/eglibc/eglibc-package.bbclass b/recipes/eglibc/eglibc-package.bbclass
index 3dc97b4..4e286af 100644
--- a/recipes/eglibc/eglibc-package.bbclass
+++ b/recipes/eglibc/eglibc-package.bbclass
@@ -169,8 +169,8 @@ do_prep_locale_tree() {
 		gunzip $i
 	done
 	ls -d ${PKGD}${base_libdir}/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
-	if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then
-		cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
+	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.* ]; then
+		cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
 	fi
 	install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin
 }
diff --git a/recipes/gcc/gcc-configure-sdk.inc b/recipes/gcc/gcc-configure-sdk.inc
index 205b106..d5a5942 100644
--- a/recipes/gcc/gcc-configure-sdk.inc
+++ b/recipes/gcc/gcc-configure-sdk.inc
@@ -5,23 +5,23 @@ USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibceabi", "no", "", d )}'
 
 EXTRA_OECONF_PATHS = "--with-sysroot=${prefix}/${TARGET_SYS} \
-                      --with-build-time-tools=${CROSS_DIR}/${TARGET_SYS}/bin \
+                      --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
                       --with-build-sysroot=${STAGING_DIR_TARGET}"
 
 #
 # gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
 # for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
 #
-export AR_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ar"
-export AS_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/as"
-export DLLTOOL_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/dlltool"
-export LD_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ld"
-export LIPO_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/lipo"
-export NM_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/nm"
-export OBJDUMP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/objdump"
-export RANLIB_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ranlib"
-export STRIP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/strip"
-export WINDRES_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/windres"
+export AR_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/ar"
+export AS_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/as"
+export DLLTOOL_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/dlltool"
+export LD_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/ld"
+export LIPO_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/lipo"
+export NM_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/nm"
+export OBJDUMP_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/objdump"
+export RANLIB_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/ranlib"
+export STRIP_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/strip"
+export WINDRES_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/windres"
 
 #
 # We need to override this and make sure the compiler can find staging
diff --git a/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb b/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb
index 908b612..dd60164 100644
--- a/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb
+++ b/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb
@@ -5,6 +5,6 @@ S = "${WORKDIR}/gcc-4.2"
 
 # Hack till we fix *libc properly
 do_install_append() {
-	install -d ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
-	ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
+	install -d ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
+	ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
 }
diff --git a/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb b/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb
index 89e6a85..b9b34b6 100644
--- a/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb
+++ b/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb
@@ -5,6 +5,6 @@ S = "${WORKDIR}/gcc-4.2"
 
 # Hack till we fix *libc properly
 do_install_append() {
-	install -d ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include
-	ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
+	install -d ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include
+	ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
 }
diff --git a/recipes/gcc/gcc-cross-kernel.inc b/recipes/gcc/gcc-cross-kernel.inc
index c0a8de7..e6f1fb8 100644
--- a/recipes/gcc/gcc-cross-kernel.inc
+++ b/recipes/gcc/gcc-cross-kernel.inc
@@ -19,5 +19,5 @@ do_compile () {
 do_stage () {
 	cd gcc
 	oe_runmake installdirs install-common install-headers install-libgcc
-	install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
+	install -m 0755 xgcc ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV}
 }
diff --git a/recipes/gcc/gcc-cross-sdk_3.4.4.bb b/recipes/gcc/gcc-cross-sdk_3.4.4.bb
index 16ca9e4..a885c07 100644
--- a/recipes/gcc/gcc-cross-sdk_3.4.4.bb
+++ b/recipes/gcc/gcc-cross-sdk_3.4.4.bb
@@ -7,7 +7,7 @@ SRC_URI += 'file://sdk-libstdc++-includes.patch'
 
 do_compile_prepend () {
 	mkdir -p gcc
-	ln -s ${CROSS_DIR}/bin/${TARGET_PREFIX}as gcc/as 
-	ln -s ${CROSS_DIR}/bin/${TARGET_PREFIX}ld gcc/ld
+	ln -s ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}as gcc/as 
+	ln -s ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}ld gcc/ld
 }
 
diff --git a/recipes/gcc/gcc-cross_csl-arm-2007q3.bb b/recipes/gcc/gcc-cross_csl-arm-2007q3.bb
index 945e8ac..70c869e 100644
--- a/recipes/gcc/gcc-cross_csl-arm-2007q3.bb
+++ b/recipes/gcc/gcc-cross_csl-arm-2007q3.bb
@@ -14,9 +14,9 @@ LDFLAGS = ""
 
 # staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain
 do_compile_prepend() {
-	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/
-	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/
-	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/ 
+	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
+	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
+	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/ 
 	sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure
 
 }
diff --git a/recipes/gcc/gcc-cross_csl-arm-2008q1.bb b/recipes/gcc/gcc-cross_csl-arm-2008q1.bb
index a3edb28..7ed0f51 100644
--- a/recipes/gcc/gcc-cross_csl-arm-2008q1.bb
+++ b/recipes/gcc/gcc-cross_csl-arm-2008q1.bb
@@ -14,9 +14,9 @@ LDFLAGS = ""
 
 # staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain
 do_compile_prepend() {
-	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/
-	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/
-	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/ 
+	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
+	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
+	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/ 
 	sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure
 
 }
diff --git a/recipes/gcc/gcc-cross_csl-arm-2008q3.bb b/recipes/gcc/gcc-cross_csl-arm-2008q3.bb
index 88b222e..9ada568 100644
--- a/recipes/gcc/gcc-cross_csl-arm-2008q3.bb
+++ b/recipes/gcc/gcc-cross_csl-arm-2008q3.bb
@@ -14,9 +14,9 @@ LDFLAGS = ""
 
 # staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain
 do_compile_prepend() {
-	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/
-	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/
-	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/ 
+	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
+	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
+	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/ 
 	sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure
 
 }
diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
index 95936ed..6978340 100644
--- a/recipes/gcc/gcc-package-cross.inc
+++ b/recipes/gcc/gcc-package-cross.inc
@@ -38,12 +38,12 @@ do_install () {
      
 	# Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
 	# gfortran is fully backwards compatible. This is a safe and practical solution.
-	if [ -f ${D}${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
+	if [ -f ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ]; then
 		currdir="$PWD"
-		cd ${D}${CROSS_DIR}/bin/
+		cd ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/
 		ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
-		if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then 
-			cd ${CROSS_DIR}/${TARGET_SYS}/bin/
+		if [ -d ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/ ] ; then 
+			cd ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/
 			ln -sf gfortran g77 || true
 		fi
 		cd $currdir
-- 
1.7.1




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

* [PATCH 3/4] recipes: Fix references to CROSS_DIR
  2010-07-21 18:04 [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Khem Raj
  2010-07-21 18:04 ` [PATCH 1/4] classes, bitbake.conf: " Khem Raj
  2010-07-21 18:04 ` [PATCH 2/4] toolchain: Remove references to CROSS_DIR Khem Raj
@ 2010-07-21 18:04 ` Khem Raj
  2010-07-21 21:53   ` Tom Rini
  2010-07-21 18:04 ` [PATCH 4/4] sanity.bbclass, abi_version.conf: Bump the ABI to inform that cross has died Khem Raj
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 35+ messages in thread
From: Khem Raj @ 2010-07-21 18:04 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 recipes/apex/apex-env_1.5.14.bb                |    6 +++---
 recipes/apex/apex-env_1.5.8.bb                 |    6 +++---
 recipes/apex/apex-nslu2-16mb_1.5.14.bb         |    6 +++---
 recipes/apex/apex-nslu2_1.5.14.bb              |    6 +++---
 recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb |   18 +++++++++---------
 recipes/avr-libc/avr-libc_1.0.3.bb             |    2 +-
 recipes/bl/bl_cvs.bb                           |    2 +-
 recipes/chromium/chromium_svn.bb               |    2 +-
 recipes/dejagnu/dejagnu-qemu_1.0.bb            |    2 +-
 recipes/dietlibc/dietlibc.inc                  |    4 ++--
 recipes/emacs/emacs.inc                        |   10 +++++-----
 recipes/emacs/emacs_cvs.bb                     |    6 +++---
 recipes/gstreamer/gst-ffmpeg_0.10.10.bb        |    2 +-
 recipes/gstreamer/gst-ffmpeg_0.10.2.bb         |    2 +-
 recipes/gstreamer/gst-ffmpeg_0.10.4.bb         |    2 +-
 recipes/gstreamer/gst-ffmpeg_0.10.6.bb         |    2 +-
 recipes/gstreamer/gst-ffmpeg_0.10.7.bb         |    2 +-
 recipes/gstreamer/gst-ffmpeg_0.10.8.bb         |    2 +-
 recipes/iphone/gcc-iphone-cross_git.bb         |    4 ++--
 recipes/klibc/klibc.inc                        |    2 +-
 recipes/led/led_cvs.bb                         |    2 +-
 recipes/mamona/binutils-noemu_2.17.50.0.5.bb   |    2 +-
 recipes/meta/cross-linkage_1.0.bb              |   18 +++++++++---------
 recipes/musicbrainz/libmusicbrainz.inc         |    2 +-
 recipes/openmoko2/openmoko-browser2_svn.bb     |    2 +-
 recipes/perl/perl_5.10.1.bb                    |    2 +-
 recipes/perl/perl_5.8.8.bb                     |    2 +-
 recipes/phoneme/phoneme-advanced.inc           |    2 +-
 recipes/qi/qi.inc                              |    2 +-
 recipes/uclibc/bfin-uclibc_svn.bb              |    2 +-
 recipes/wvstreams/wvstreams_4.2.2.bb           |    2 +-
 recipes/wvstreams/wvstreams_4.4.1.bb           |    2 +-
 recipes/wvstreams/wvstreams_4.6.bb             |    2 +-
 33 files changed, 65 insertions(+), 65 deletions(-)

diff --git a/recipes/apex/apex-env_1.5.14.bb b/recipes/apex/apex-env_1.5.14.bb
index ddd28f3..cb44bd5 100644
--- a/recipes/apex/apex-env_1.5.14.bb
+++ b/recipes/apex/apex-env_1.5.14.bb
@@ -10,11 +10,11 @@ SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \
 	"
 S = ${WORKDIR}/apex-${PV}/usr
 
-EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
+EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
 
 oe_runmake() {
-	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
-	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
+	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@"
+	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
 }
 
 do_install() {
diff --git a/recipes/apex/apex-env_1.5.8.bb b/recipes/apex/apex-env_1.5.8.bb
index b619026..d2cf0b7 100644
--- a/recipes/apex/apex-env_1.5.8.bb
+++ b/recipes/apex/apex-env_1.5.8.bb
@@ -10,11 +10,11 @@ SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \
 	"
 S = ${WORKDIR}/apex-${PV}/usr
 
-EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
+EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
 
 oe_runmake() {
-	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
-	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
+	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@"
+	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
 }
 
 do_install() {
diff --git a/recipes/apex/apex-nslu2-16mb_1.5.14.bb b/recipes/apex/apex-nslu2-16mb_1.5.14.bb
index 8e764dd..1e654df 100644
--- a/recipes/apex/apex-nslu2-16mb_1.5.14.bb
+++ b/recipes/apex/apex-nslu2-16mb_1.5.14.bb
@@ -17,11 +17,11 @@ CMDLINE_ROOT  ?= "root=/dev/mtdblock4 rootfstype=jffs2 rw"
 
 CMDLINE_DEBUG ?= ""
 
-EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
+EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
 
 oe_runmake() {
-	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
-	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
+	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@"
+	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
 }
 
 # Set the correct CONFIG_USER_xxx_ENDIAN and CONFIG_CMDLINE at the head
diff --git a/recipes/apex/apex-nslu2_1.5.14.bb b/recipes/apex/apex-nslu2_1.5.14.bb
index a1d91b7..efab695 100644
--- a/recipes/apex/apex-nslu2_1.5.14.bb
+++ b/recipes/apex/apex-nslu2_1.5.14.bb
@@ -17,11 +17,11 @@ CMDLINE_ROOT  ?= "root=/dev/mtdblock4 rootfstype=jffs2 rw"
 
 CMDLINE_DEBUG ?= ""
 
-EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
+EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
 
 oe_runmake() {
-	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
-	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
+	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@"
+	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
 }
 
 # Set the correct CONFIG_USER_xxx_ENDIAN and CONFIG_CMDLINE at the head
diff --git a/recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb b/recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb
index f02cc95..76e2606 100644
--- a/recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb
+++ b/recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb
@@ -27,7 +27,7 @@ CMDLINE_ROOT_NAS100D = "root=/dev/mtdblock2 rootfstype=jffs2 rootflags=noatime r
 CMDLINE_ROOT_NSLU2   = "root=/dev/mtdblock4 rootfstype=jffs2 rootflags=noatime rw init=/linuxrc"
 # CMDLINE is passed correctly on the Freecom FSG-3 from the bootloader.
 
-EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
+EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
 
 oe_runmake() {
 	mv ${S}/config.h ${S}/config.h.orig
@@ -41,8 +41,8 @@ oe_runmake() {
 	fi
 	echo "#define COMMANDLINE \"${CMDLINE_CONSOLE} ${CMDLINE_ROOT_NSLU2} ${CMDLINE_DEBUG}\"" >> ${S}/config.h
 	rm -f ${S}/main.o
-	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2
-	make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2 || die "oe_runmake failed"
+	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2
+	make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2 || die "oe_runmake failed"
 	# NAS100d
 	if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
 		sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
@@ -53,8 +53,8 @@ oe_runmake() {
 	fi
 	echo "#define COMMANDLINE \"${CMDLINE_CONSOLE} ${CMDLINE_ROOT_NAS100D} ${CMDLINE_DEBUG}\"" >> ${S}/config.h
 	rm -f ${S}/main.o
-	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d
-	make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d || die "oe_runmake failed"
+	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d
+	make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d || die "oe_runmake failed"
 	# DSMG-600
 	if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
 		sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
@@ -65,8 +65,8 @@ oe_runmake() {
 	fi
 	echo "#define COMMANDLINE \"${CMDLINE_CONSOLE} ${CMDLINE_ROOT_DSMG600} ${CMDLINE_DEBUG}\"" >> ${S}/config.h
 	rm -f ${S}/main.o
-	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600
-	make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600 || die "oe_runmake failed"
+	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600
+	make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600 || die "oe_runmake failed"
 	# FSG-3
 	if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
 		sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
@@ -76,8 +76,8 @@ oe_runmake() {
 			${WORKDIR}/config-fsg3.h > ${S}/config.h
 	fi
 	rm -f ${S}/main.o
-	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3
-	make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3 || die "oe_runmake failed"
+	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3
+	make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3 || die "oe_runmake failed"
 	mv ${S}/config.h.orig ${S}/config.h
 }
 
diff --git a/recipes/avr-libc/avr-libc_1.0.3.bb b/recipes/avr-libc/avr-libc_1.0.3.bb
index 052425b..efd2967 100644
--- a/recipes/avr-libc/avr-libc_1.0.3.bb
+++ b/recipes/avr-libc/avr-libc_1.0.3.bb
@@ -18,7 +18,7 @@ B = "${WORKDIR}/build.${BUILD_SYS}.${TARGET_SYS}"
 inherit autotools
 
 export tooldir = "${prefix}"
-prefix = "${CROSS_DIR}"
+prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
 exec_prefix = "${prefix}"
 
 do_stage () {
diff --git a/recipes/bl/bl_cvs.bb b/recipes/bl/bl_cvs.bb
index cdbf2ba..779ff1e 100644
--- a/recipes/bl/bl_cvs.bb
+++ b/recipes/bl/bl_cvs.bb
@@ -21,7 +21,7 @@ do_configure (){
 }
 
 do_compile (){
-	oe_runmake bl CC="${CROSS_DIR}/bin/${TARGET_SYS}-gcc -I{STAGING_INCDIR} -L${STAGING_LIBDIR}" AS=${CROSS_DIR}/bin/${TARGET_SYS}-as LD=${CROSS_DIR}/bin/${TARGET_SYS}-ld
+	oe_runmake bl CC="${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-gcc -I{STAGING_INCDIR} -L${STAGING_LIBDIR}" AS=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-as LD=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-ld
 }
 
 do_install () {
diff --git a/recipes/chromium/chromium_svn.bb b/recipes/chromium/chromium_svn.bb
index a71f947..6aeab44 100644
--- a/recipes/chromium/chromium_svn.bb
+++ b/recipes/chromium/chromium_svn.bb
@@ -100,7 +100,7 @@ TARGET_CC_ARCH += "${LDFLAGS}"
 
 do_compile() {
 	cd ${S}
-	export CROSSTOOL=${CROSS_DIR}/bin/${TARGET_PREFIX}
+	export CROSSTOOL=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}
 	export AR=${CROSSTOOL}ar
 	export AS=${CROSSTOOL}as
 	export RANLIB=${CROSSTOOL}ranlib
diff --git a/recipes/dejagnu/dejagnu-qemu_1.0.bb b/recipes/dejagnu/dejagnu-qemu_1.0.bb
index 2eef27e..89cea80 100644
--- a/recipes/dejagnu/dejagnu-qemu_1.0.bb
+++ b/recipes/dejagnu/dejagnu-qemu_1.0.bb
@@ -13,7 +13,7 @@ do_stage() {
 	install -m 0644 ${WORKDIR}/arm-qemu.exp ${STAGING_DATADIR}/dejagnu/baseboards/
 	cat <<EOF >${STAGING_BINDIR_NATIVE}/${QEMU}-test-wrapper
 #!/bin/sh
-exec ${QEMU} ${CROSS_DIR}/${TARGET_SYS}/${LD_SO} --library-path ${CROSS_DIR}/${TARGET_SYS}/lib:${STAGING_DIR_TARGET}${layout_libdir} \$1
+exec ${QEMU} ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/${LD_SO} --library-path ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib:${STAGING_DIR_TARGET}${layout_libdir} \$1
 EOF
 	chmod 755 ${STAGING_BINDIR_NATIVE}/arm-qemu-test-wrapper
 }
diff --git a/recipes/dietlibc/dietlibc.inc b/recipes/dietlibc/dietlibc.inc
index 624a9ae..a1537e1 100644
--- a/recipes/dietlibc/dietlibc.inc
+++ b/recipes/dietlibc/dietlibc.inc
@@ -29,12 +29,12 @@ do_stage () {
 	DIETLIBC_BUILD_ARCH=`echo ${BUILD_ARCH} | sed -e s'/.86/386/'`
 	DIETLIBC_TARGET_ARCH=`echo ${TARGET_ARCH} | sed -e s'/.86/386/'`
 	rm -rf ${STAGING_DIR_TARGET}/lib/dietlibc || true
-	rm ${CROSS_DIR}/bin/diet || true
+	rm ${STAGING_DIR_NATIVE}${prefix_native}/bin/diet || true
 	install -d ${STAGING_DIR_TARGET}/lib/dietlibc/lib-${DIETLIBC_TARGET_ARCH}
 	install -d ${STAGING_DIR_TARGET}/lib/dietlibc/include
         for i in `find include -name \*.h`; do install -m 644 -D $i ${STAGING_DIR_TARGET}/lib/dietlibc/$i; done
 
-        install -m755 bin-${DIETLIBC_BUILD_ARCH}/diet-i ${CROSS_DIR}/bin/diet
+        install -m755 bin-${DIETLIBC_BUILD_ARCH}/diet-i ${STAGING_DIR_NATIVE}${prefix_native}/bin/diet
 	
 	cd bin-${DIETLIBC_TARGET_ARCH}
 	install -m 644 start.o libm.a libpthread.a librpc.a \
diff --git a/recipes/emacs/emacs.inc b/recipes/emacs/emacs.inc
index 6645f41..893ee9d 100644
--- a/recipes/emacs/emacs.inc
+++ b/recipes/emacs/emacs.inc
@@ -32,7 +32,7 @@ export LOGNAME = "$(whoami)"
 
 do_compile_prepend() {
 	sed -i ':1;s:\(START.* \|LIB_STANDARD.* \|LIBES.* \)/usr/lib:\1${STAGING_LIBDIR}:;t1' ${S}/src/s/gnu-linux.h `find "${S}" -name Makefile`
-	export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${CROSS_DIR}/${TARGET_SYS}/lib"
+	export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
 # Ugly hack, see files/use-qemu.patch for more:
 	ln -sf ../src/emacs lisp/emacs
 	ln -sf ../src/emacs lib-src/emacs
@@ -44,11 +44,11 @@ do_compile_prepend() {
 	fi
 	mkdir $treedir
 	cp -pPR ${STAGING_DIR_TARGET}/* $treedir
-	if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so ]; then
-                cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
+	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so ]; then
+                cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
         fi
-        if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* ]; then
-                cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* $treedir/lib
+        if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so.* ]; then
+                cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so.* $treedir/lib
         fi
 	# stupid hack, but without it, it tries to use /usr/lib/libc.so from host and fails
 	# temacs: error while loading shared libraries: /usr/lib/libc.so: ELF file version does not match current one
diff --git a/recipes/emacs/emacs_cvs.bb b/recipes/emacs/emacs_cvs.bb
index c3a98a3..a2065be 100644
--- a/recipes/emacs/emacs_cvs.bb
+++ b/recipes/emacs/emacs_cvs.bb
@@ -27,12 +27,12 @@ FILES_${PN}-el = "${datadir}/emacs/*/*/*.el.gz \
 FILES_${PN} += "${datadir}/emacs"
 
 QEMU = "qemu-${TARGET_ARCH} -L ${STAGING_DIR_TARGET}"
-LDFLAGS += "-L${CROSS_DIR}/${TARGET_SYS}/lib"
+LDFLAGS += "-L${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
 
 EXTRA_OECONF = "--without-sound --without-x"
 
 do_bootstrap() {
-    cp "${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
+    cp "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
     export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${S}"
     export QEMU="${QEMU}"
 
@@ -46,7 +46,7 @@ do_bootstrap() {
 addtask bootstrap before do_compile after do_configure
 
 do_compile_prepend() {
-    cp "${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
+    cp "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
     export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${S}"
     export QEMU="${QEMU}"
 }
diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.10.bb b/recipes/gstreamer/gst-ffmpeg_0.10.10.bb
index c29e3b6..9b0269c 100644
--- a/recipes/gstreamer/gst-ffmpeg_0.10.10.bb
+++ b/recipes/gstreamer/gst-ffmpeg_0.10.10.bb
@@ -22,7 +22,7 @@ EXTRA_OECONF = " --with-system-ffmpeg "
 
 # We do this because the install program is called with -s which causes it to
 # call "strip" and it then mangles cross compiled stuff..
-PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
+PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
 
 # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
 CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.2.bb b/recipes/gstreamer/gst-ffmpeg_0.10.2.bb
index c835011..f2c2654 100644
--- a/recipes/gstreamer/gst-ffmpeg_0.10.2.bb
+++ b/recipes/gstreamer/gst-ffmpeg_0.10.2.bb
@@ -25,7 +25,7 @@ EXTRA_OECONF = "--disable-sdltest --disable-ffplay --disable-freetypetest \
 
 # We do this because the install program is called with -s which causes it to
 # call "strip" and it then mangles cross compiled stuff..
-PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
+PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
 
 # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
 CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.4.bb b/recipes/gstreamer/gst-ffmpeg_0.10.4.bb
index 19d1bb1..28a753d 100644
--- a/recipes/gstreamer/gst-ffmpeg_0.10.4.bb
+++ b/recipes/gstreamer/gst-ffmpeg_0.10.4.bb
@@ -24,7 +24,7 @@ EXTRA_OECONF = "--disable-sdltest --disable-ffplay --disable-freetypetest \
 
 # We do this because the install program is called with -s which causes it to
 # call "strip" and it then mangles cross compiled stuff..
-PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
+PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
 
 # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
 CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.6.bb b/recipes/gstreamer/gst-ffmpeg_0.10.6.bb
index 0a9b373..9b8ec8d 100644
--- a/recipes/gstreamer/gst-ffmpeg_0.10.6.bb
+++ b/recipes/gstreamer/gst-ffmpeg_0.10.6.bb
@@ -25,7 +25,7 @@ EXTRA_OECONF = "--disable-sdltest --disable-ffplay --disable-freetypetest \
 
 # We do this because the install program is called with -s which causes it to
 # call "strip" and it then mangles cross compiled stuff..
-PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
+PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
 
 # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
 CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.7.bb b/recipes/gstreamer/gst-ffmpeg_0.10.7.bb
index c9e33de..8a1d56e 100644
--- a/recipes/gstreamer/gst-ffmpeg_0.10.7.bb
+++ b/recipes/gstreamer/gst-ffmpeg_0.10.7.bb
@@ -25,7 +25,7 @@ EXTRA_OECONF = "--disable-sdltest --disable-ffplay --disable-freetypetest \
 
 # We do this because the install program is called with -s which causes it to
 # call "strip" and it then mangles cross compiled stuff..
-PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
+PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
 
 # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
 CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.8.bb b/recipes/gstreamer/gst-ffmpeg_0.10.8.bb
index 2e5b84e..2bdc45b 100644
--- a/recipes/gstreamer/gst-ffmpeg_0.10.8.bb
+++ b/recipes/gstreamer/gst-ffmpeg_0.10.8.bb
@@ -21,7 +21,7 @@ EXTRA_OECONF = " --with-system-ffmpeg "
 
 # We do this because the install program is called with -s which causes it to
 # call "strip" and it then mangles cross compiled stuff..
-PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
+PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
 
 # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
 CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
diff --git a/recipes/iphone/gcc-iphone-cross_git.bb b/recipes/iphone/gcc-iphone-cross_git.bb
index ea351cf..3c6a788 100644
--- a/recipes/iphone/gcc-iphone-cross_git.bb
+++ b/recipes/iphone/gcc-iphone-cross_git.bb
@@ -20,8 +20,8 @@ EXTRA_OECONF = "\
 	--enable-sjlj-exceptions \
 	--enable-wchar_t=no  \
 	--with-gxx-include-dir=${STAGING_DIR_TARGET}/${layout_includedir}/c++ \
-	--with-as=${CROSS_DIR}/bin/${TARGET_PREFIX}as \
-	--with-ld=${CROSS_DIR}/bin/${TARGET_PREFIX}ld \
+	--with-as=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}as \
+	--with-ld=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}ld \
 	--with-sysroot=${STAGING_DIR_TARGET} \
 	--with-build-sysroot=${STAGING_DIR_TARGET} \
 	--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
diff --git a/recipes/klibc/klibc.inc b/recipes/klibc/klibc.inc
index 9ae6c5b..d0f8e1c 100644
--- a/recipes/klibc/klibc.inc
+++ b/recipes/klibc/klibc.inc
@@ -13,7 +13,7 @@ do_install() {
 export INST=${STAGING_DIR_TARGET}
 do_stage() {
         oe_runmake  install
-        cp '${STAGING_DIR_TARGET}/bin/klcc'  '${CROSS_DIR}/bin/${TARGET_PREFIX}klcc'
+        cp '${STAGING_DIR_TARGET}/bin/klcc'  '${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}klcc'
 }
 
 PACKAGES = "${PN} ${PN}-dev "
diff --git a/recipes/led/led_cvs.bb b/recipes/led/led_cvs.bb
index 6f303d1..90eb116 100644
--- a/recipes/led/led_cvs.bb
+++ b/recipes/led/led_cvs.bb
@@ -19,7 +19,7 @@ do_configure (){
 }
 
 do_compile (){
-	oe_runmake led CC="${CROSS_DIR}/bin/${TARGET_SYS}-gcc -I${STAGING_INCDIR} -I${STAGING_KERNEL_DIR}/include  -L${STAGING_LIBDIR}" AS=${CROSS_DIR}/bin/${TARGET_SYS}-as LD=${CROSS_DIR}/bin/${TARGET_SYS}-ld
+	oe_runmake led CC="${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-gcc -I${STAGING_INCDIR} -I${STAGING_KERNEL_DIR}/include  -L${STAGING_LIBDIR}" AS=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-as LD=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-ld
 }
 
 do_install () {
diff --git a/recipes/mamona/binutils-noemu_2.17.50.0.5.bb b/recipes/mamona/binutils-noemu_2.17.50.0.5.bb
index f2362ff..c3e2b31 100644
--- a/recipes/mamona/binutils-noemu_2.17.50.0.5.bb
+++ b/recipes/mamona/binutils-noemu_2.17.50.0.5.bb
@@ -16,7 +16,7 @@ SRC_URI = \
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
      "
 
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
+EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS} \
 		--program-prefix=${TARGET_PREFIX} --disable-shared"
 
 HOST_SYS = "${BUILD_SYS}"
diff --git a/recipes/meta/cross-linkage_1.0.bb b/recipes/meta/cross-linkage_1.0.bb
index 9be09aa..a5e456b 100644
--- a/recipes/meta/cross-linkage_1.0.bb
+++ b/recipes/meta/cross-linkage_1.0.bb
@@ -21,15 +21,15 @@ do_install() {
 }
 
 do_stage () {
-	install -d ${CROSS_DIR}/${TARGET_SYS}/
-	if [ -e ${CROSS_DIR}/${TARGET_SYS}/include ]; then
-		cp -pPRr ${CROSS_DIR}/${TARGET_SYS}/include/* ${STAGING_INCDIR}
-		mv ${CROSS_DIR}/${TARGET_SYS}/include/ ${CROSS_DIR}/${TARGET_SYS}/include-oldbackup
+	install -d ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/
+	if [ -e ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include ]; then
+		cp -pPRr ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include/* ${STAGING_INCDIR}
+		mv ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include/ ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include-oldbackup
 	fi
-	ln -s  ${STAGING_INCDIR}/ ${CROSS_DIR}/${TARGET_SYS}/include
-	if [ -e ${CROSS_DIR}/${TARGET_SYS}/lib ]; then
-		cp -pPRr ${CROSS_DIR}/${TARGET_SYS}/lib/* ${STAGING_LIBDIR}
-		mv ${CROSS_DIR}/${TARGET_SYS}/lib/ ${CROSS_DIR}/${TARGET_SYS}/lib-oldbackup
+	ln -s  ${STAGING_INCDIR}/ ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include
+	if [ -e ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib ]; then
+		cp -pPRr ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/* ${STAGING_LIBDIR}
+		mv ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/ ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib-oldbackup
 	fi
-	ln -s  ${STAGING_LIBDIR} ${CROSS_DIR}/${TARGET_SYS}/lib 
+	ln -s  ${STAGING_LIBDIR} ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib 
 }
diff --git a/recipes/musicbrainz/libmusicbrainz.inc b/recipes/musicbrainz/libmusicbrainz.inc
index 010dd23..1838d4e 100644
--- a/recipes/musicbrainz/libmusicbrainz.inc
+++ b/recipes/musicbrainz/libmusicbrainz.inc
@@ -10,7 +10,7 @@ SRC_URI = "ftp://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-${PV}.tar.gz
 inherit cmake pkgconfig
 
 # Fight a compiler/link bug that leaks too many c++ symbols
-TARGET_LDFLAGS += " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib -ldl"
+TARGET_LDFLAGS += " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib -ldl"
 
 do_stage() {
 	autotools_stage_all
diff --git a/recipes/openmoko2/openmoko-browser2_svn.bb b/recipes/openmoko2/openmoko-browser2_svn.bb
index 3d329b7..a4d8164 100644
--- a/recipes/openmoko2/openmoko-browser2_svn.bb
+++ b/recipes/openmoko2/openmoko-browser2_svn.bb
@@ -6,7 +6,7 @@ PV = "0.0.1+svnr${SRCPV}"
 PR = "r2"
 
 inherit openmoko2
-LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib"
+LDFLAGS_append = " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
 
 SRC_URI += "file://webkit-update.patch;minrev=3646;maxrev=4171"
 
diff --git a/recipes/perl/perl_5.10.1.bb b/recipes/perl/perl_5.10.1.bb
index c22ecd7..86b08dc 100644
--- a/recipes/perl/perl_5.10.1.bb
+++ b/recipes/perl/perl_5.10.1.bb
@@ -129,7 +129,7 @@ do_install() {
                    -e "s,${STAGING_LIBDIR},${libdir},g" \
                    -e "s,${STAGING_BINDIR},${bindir},g" \
                    -e "s,${STAGING_INCDIR},${includedir},g" \
-                   -e "s,${CROSS_DIR}${base_bindir}/,,g" \
+                   -e "s,${STAGING_DIR_NATIVE}${prefix_native}${base_bindir}/,,g" \
                 ${D}${bindir}/h2xs \
                 ${D}${bindir}/h2ph \
                 ${D}${datadir}/perl/${PV}/pod/*.pod \
diff --git a/recipes/perl/perl_5.8.8.bb b/recipes/perl/perl_5.8.8.bb
index f09360f..c73fe4e 100644
--- a/recipes/perl/perl_5.8.8.bb
+++ b/recipes/perl/perl_5.8.8.bb
@@ -135,7 +135,7 @@ do_install() {
                    -e "s,${STAGING_LIBDIR},${libdir},g" \
                    -e "s,${STAGING_BINDIR},${bindir},g" \
                    -e "s,${STAGING_INCDIR},${includedir},g" \
-                   -e "s,${CROSS_DIR}${base_bindir}/,,g" \
+                   -e "s,${STAGING_DIR_NATIVE}${prefix_native}${base_bindir}/,,g" \
                 ${D}${bindir}/h2xs \
                 ${D}${bindir}/h2ph \
                 ${D}${datadir}/perl/${PV}/pod/*.pod \
diff --git a/recipes/phoneme/phoneme-advanced.inc b/recipes/phoneme/phoneme-advanced.inc
index a74bc04..9df61a6 100644
--- a/recipes/phoneme/phoneme-advanced.inc
+++ b/recipes/phoneme/phoneme-advanced.inc
@@ -66,7 +66,7 @@ do_configure() {
 
   pmo "# Java toolchain binaries"
   pmo JDK_HOME /dev/null
-  pmo CVM_TARGET_TOOLS_PREFIX ${CROSS_DIR}/bin/
+  pmo CVM_TARGET_TOOLS_PREFIX ${STAGING_DIR_NATIVE}${prefix_native}/bin/
   pmo CVM_JAVA java
   pmo CVM_JAVAC javac
   pmo CVM_JAVADOC true
diff --git a/recipes/qi/qi.inc b/recipes/qi/qi.inc
index 0b5451a..f9d4f2e 100644
--- a/recipes/qi/qi.inc
+++ b/recipes/qi/qi.inc
@@ -21,7 +21,7 @@ BUILD_DATE=\$(shell date --iso-8601=seconds)
 # has been built. If it bails out with something like: "| arm-linux-ld: 4.3.3: No such file or directory"
 # then you need to remove all previously built toolchain directories out of the cross library path.
 GCCV="`${CC} -dumpversion`"
-COMPILER_LIB_PATH_PRE=${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(GCCV)
+COMPILER_LIB_PATH_PRE=${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/$(GCCV)
 COMPILER_LIB_PATH=\$(COMPILER_LIB_PATH_PRE)/\$(shell ls \$(COMPILER_LIB_PATH_PRE))
 
 AS=${AS}
diff --git a/recipes/uclibc/bfin-uclibc_svn.bb b/recipes/uclibc/bfin-uclibc_svn.bb
index 2757fc2..954d10d 100644
--- a/recipes/uclibc/bfin-uclibc_svn.bb
+++ b/recipes/uclibc/bfin-uclibc_svn.bb
@@ -20,7 +20,7 @@ COMPATIBLE_HOST = "bfin.*-uclinux"
 
 #as stated above, uclibc needs real kernel-headers
 #however: we can't depend on virtual/kernel when nptl hits due to depends deadlocking ....
-KERNEL_SOURCE = "${CROSS_DIR}/${TARGET_SYS}"
+KERNEL_SOURCE = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}"
 
 SRC_URI = "svn://sources.blackfin.uclinux.org/toolchain/trunk;module=uClibc "
 SRC_URI += "file://uClibc.machine file://uClibc.distro"
diff --git a/recipes/wvstreams/wvstreams_4.2.2.bb b/recipes/wvstreams/wvstreams_4.2.2.bb
index 83f97be..4358ec1 100644
--- a/recipes/wvstreams/wvstreams_4.2.2.bb
+++ b/recipes/wvstreams/wvstreams_4.2.2.bb
@@ -12,7 +12,7 @@ SRC_URI = "http://ftp.de.debian.org/debian/pool/main/w/wvstreams/${PN}_${PV}.ori
 
 inherit autotools pkgconfig
 
-LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib"
+LDFLAGS_append = " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
 
 EXTRA_AUTORECONF += " -I${S}/gnulib/m4"
 EXTRA_OECONF = " --without-tcl --without-qt --without-pam"
diff --git a/recipes/wvstreams/wvstreams_4.4.1.bb b/recipes/wvstreams/wvstreams_4.4.1.bb
index fa865c7..4506b05 100644
--- a/recipes/wvstreams/wvstreams_4.4.1.bb
+++ b/recipes/wvstreams/wvstreams_4.4.1.bb
@@ -14,7 +14,7 @@ SRC_URI = "http://wvstreams.googlecode.com/files/${PN}-${PV}.tar.gz \
 
 inherit autotools pkgconfig
 
-LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib"
+LDFLAGS_append = " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
 
 EXTRA_AUTORECONF += " -I${S}/gnulib/m4"
 EXTRA_OECONF = " --without-tcl --without-qt --without-pam"
diff --git a/recipes/wvstreams/wvstreams_4.6.bb b/recipes/wvstreams/wvstreams_4.6.bb
index a52c284..eb70fd2 100644
--- a/recipes/wvstreams/wvstreams_4.6.bb
+++ b/recipes/wvstreams/wvstreams_4.6.bb
@@ -8,7 +8,7 @@ SRC_URI = "http://wvstreams.googlecode.com/files/${PN}-${PV}.tar.gz \
 
 inherit autotools pkgconfig
 
-LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib"
+LDFLAGS_append = " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
 
 EXTRA_OECONF = " --without-tcl --without-qt --without-pam"
 
-- 
1.7.1




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

* [PATCH 4/4] sanity.bbclass, abi_version.conf: Bump the ABI to inform that cross has died.
  2010-07-21 18:04 [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Khem Raj
                   ` (2 preceding siblings ...)
  2010-07-21 18:04 ` [PATCH 3/4] recipes: Fix " Khem Raj
@ 2010-07-21 18:04 ` Khem Raj
  2010-07-21 21:53   ` Tom Rini
  2010-07-21 21:52 ` [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Tom Rini
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 35+ messages in thread
From: Khem Raj @ 2010-07-21 18:04 UTC (permalink / raw)
  To: openembedded-devel

* tmpdir layout is changed bump ABI version to force a rebuild.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 classes/sanity.bbclass |    2 ++
 conf/abi_version.conf  |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
index 8eb7453..cff415a 100644
--- a/classes/sanity.bbclass
+++ b/classes/sanity.bbclass
@@ -149,6 +149,8 @@ def check_sanity(e):
 			os.system(bb.data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done", e.data))
 			f = file(abifile, "w")
 			f.write(current_abi)
+		elif abi == "5" and current_abi != "5":
+			messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n"
 		elif (abi != current_abi):
 			# Code to convert from one ABI to another could go here if possible.
 			messages = messages + "Error, TMPDIR has changed ABI (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
diff --git a/conf/abi_version.conf b/conf/abi_version.conf
index 92b6b58..a59abf6 100644
--- a/conf/abi_version.conf
+++ b/conf/abi_version.conf
@@ -4,7 +4,7 @@
 # that breaks the format and have been previously discussed on the mailing list 
 # with general agreement from the core team.
 #
-OELAYOUT_ABI = "4"
+OELAYOUT_ABI = "5"
 
 #
 # DISTRO_PR allows us to regenerate all packages when a fundamental change is
-- 
1.7.1




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-21 18:04 [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Khem Raj
                   ` (3 preceding siblings ...)
  2010-07-21 18:04 ` [PATCH 4/4] sanity.bbclass, abi_version.conf: Bump the ABI to inform that cross has died Khem Raj
@ 2010-07-21 21:52 ` Tom Rini
  2010-07-22  8:27 ` Richard Purdie
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 35+ messages in thread
From: Tom Rini @ 2010-07-21 21:52 UTC (permalink / raw)
  To: openembedded-devel

Khem Raj wrote:
> Hi
> 
> The following 4 patches are based on  Jushua's work in poky to get rid of
> cross dir and install the toolchain in  native sysroot.
> 
> I have done native-sdk-builds for uclibc and eglibc. It could build the images
> and the images booted fine in qemu on mips and arm.
> 
> I would  appreciate if someone could lend a hand in testing these patches
> 
> And as we have changed tmpdir layout with this patch I have also bumped ABI
> which means tmp has to be nuked before you try these patches.
> 
> Please review/ack/nack

Thanks alot for doing this!  I've tested meta-toolchain + beagleboard on 
angstrom and minimal, acks coming.

-- 
Tom Rini
Mentor Graphics Corporation



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

* Re: [PATCH 1/4] classes, bitbake.conf: Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-21 18:04 ` [PATCH 1/4] classes, bitbake.conf: " Khem Raj
@ 2010-07-21 21:52   ` Tom Rini
  0 siblings, 0 replies; 35+ messages in thread
From: Tom Rini @ 2010-07-21 21:52 UTC (permalink / raw)
  To: openembedded-devel

Khem Raj wrote:
> * Update references to CROSS_DIR in classes and bitbake.conf.
> * This patch is based on Joshua Lock's work in poky.
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

Acked-by: Tom Rini <tom_rini@mentor.com>

> ---
>  classes/cmake.bbclass            |    2 +-
>  classes/cross.bbclass            |    8 ++++----
>  classes/glibc-package.bbclass    |    8 ++++----
>  classes/icecc.bbclass            |    6 +++---
>  classes/nativesdk.bbclass        |    2 --
>  classes/packaged-staging.bbclass |    5 -----
>  conf/bitbake.conf                |    7 ++-----
>  7 files changed, 14 insertions(+), 24 deletions(-)
> 
> diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass
> index 2047b58..2376012 100644
> --- a/classes/cmake.bbclass
> +++ b/classes/cmake.bbclass
> @@ -37,7 +37,7 @@ cmake_do_generate_toolchain_file() {
>  
>  # only search in the paths provided (from openembedded) so cmake doesnt pick
>  # up libraries and tools from the native build machine
> -  echo "set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} )" >> ${WORKDIR}/toolchain.cmake
> +  echo "set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${STAGING_DIR_NATIVE}${prefix_native} )" >> ${WORKDIR}/toolchain.cmake
>    echo "set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )" >> ${WORKDIR}/toolchain.cmake
>    echo "set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )" >> ${WORKDIR}/toolchain.cmake
>    echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )" >> ${WORKDIR}/toolchain.cmake
> diff --git a/classes/cross.bbclass b/classes/cross.bbclass
> index 4cf2b4c..75b2abe 100644
> --- a/classes/cross.bbclass
> +++ b/classes/cross.bbclass
> @@ -1,5 +1,5 @@
>  # Disabled for now since the relocation paths are too long
> -#inherit relocatable
> +inherit relocatable
>  
>  # Cross packages are built indirectly via dependency,
>  # no need for them to be a direct target of 'world'
> @@ -44,9 +44,9 @@ target_base_libdir := "${base_libdir}"
>  target_prefix := "${prefix}"
>  
>  # Overrides for paths
> -prefix = "${CROSS_DIR}"
> -base_prefix = "${prefix}"
> -exec_prefix = "${prefix}"
> +prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
> +base_prefix = "${STAGING_DIR_NATIVE}"
> +exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
>  base_sbindir = "${base_prefix}/bin"
>  sbindir = "${exec_prefix}/bin"
>  
> diff --git a/classes/glibc-package.bbclass b/classes/glibc-package.bbclass
> index d47c914..36424d5 100644
> --- a/classes/glibc-package.bbclass
> +++ b/classes/glibc-package.bbclass
> @@ -104,11 +104,11 @@ do_prep_locale_tree() {
>  		gunzip $i
>  	done
>  	ls -d ${PKGD}${base_libdir}/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
> -	if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so ]; then
> -		cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
> +	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.so ]; then
> +		cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.so $treedir/lib
>  	fi
> -	if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* ]; then
> -		cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* $treedir/lib
> +	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.so.* ]; then
> +		cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.so.* $treedir/lib
>  	fi
>  	install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin
>  }
> diff --git a/classes/icecc.bbclass b/classes/icecc.bbclass
> index 36cc231..938f199 100644
> --- a/classes/icecc.bbclass
> +++ b/classes/icecc.bbclass
> @@ -46,7 +46,7 @@ def create_cross_env(bb,d):
>          return ""
>  
>      import tarfile, socket, time
> -    ice_dir = bb.data.expand('${CROSS_DIR}', d)
> +    ice_dir = bb.data.expand('${STAGING_DIR_NATIVE}${prefix_native}', d)
>      staging_dir = bb.data.expand('${STAGING_DIR_TARGET}', d)
>      prefix  = bb.data.expand('${HOST_PREFIX}' , d)
>      distro  = bb.data.expand('${DISTRO}', d)
> @@ -96,7 +96,7 @@ def create_cross_env(bb,d):
>  
>  def create_native_env(bb,d):
>      import tarfile, socket, time
> -    ice_dir = bb.data.expand('${CROSS_DIR}', d)
> +    ice_dir = bb.data.expand('${STAGING_DIR_NATIVE}${prefix_native}', d)
>      prefix  = bb.data.expand('${HOST_PREFIX}' , d)
>      distro  = bb.data.expand('${DISTRO}', d)
>      target_sys = bb.data.expand('${TARGET_SYS}',  d)
> @@ -143,7 +143,7 @@ def get_cross_kernel_cc(bb,d):
>  
>  def create_cross_kernel_env(bb,d):
>      import tarfile, socket, time
> -    ice_dir = bb.data.expand('${CROSS_DIR}', d)
> +    ice_dir = bb.data.expand('${STAGING_DIR_NATIVE}${prefix_native}', d)
>      prefix  = bb.data.expand('${HOST_PREFIX}' , d)
>      distro  = bb.data.expand('${DISTRO}', d)
>      target_sys = bb.data.expand('${TARGET_SYS}',  d)
> diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass
> index 75f5790..ddaab85 100644
> --- a/classes/nativesdk.bbclass
> +++ b/classes/nativesdk.bbclass
> @@ -18,8 +18,6 @@ python () {
>  #STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
>  #STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk"
>  
> -CROSS_DIR = "${TMPDIR}/cross/${HOST_ARCH}"
> -
>  HOST_ARCH = "${SDK_ARCH}"
>  HOST_VENDOR = "${SDK_VENDOR}"
>  HOST_OS = "${SDK_OS}"
> diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
> index 670fd1c..fda1431 100644
> --- a/classes/packaged-staging.bbclass
> +++ b/classes/packaged-staging.bbclass
> @@ -130,7 +130,6 @@ def pstage_cleanpackage(pkgname, d):
>  	else:
>  		bb.debug(1, "Manually removing any installed files from staging...")
>  		pstage_manualclean("sysroots", "STAGING_DIR", d)
> -		pstage_manualclean("cross", "CROSS_DIR", d)
>  		pstage_manualclean("deploy", "DEPLOY_DIR", d)
>  
>  	bb.utils.unlockfile(lf)
> @@ -307,7 +306,6 @@ python packagedstage_stampfixing_eventhandler() {
>  populate_sysroot_preamble () {
>  	if [ "$PSTAGING_ACTIVE" = "1" ]; then
>  		stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true
> -		stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u || true
>  	fi
>  }
>  
> @@ -323,7 +321,6 @@ populate_sysroot_postamble () {
>  		if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
>  			exit $exitcode
>  		fi
> -		stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u -d ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}
>  		if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
>  			exit $exitcode
>  		fi
> @@ -334,9 +331,7 @@ populate_sysroot_postamble () {
>  packagedstaging_fastpath () {
>  	if [ "$PSTAGING_ACTIVE" = "1" ]; then
>  		mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/
> -		mkdir -p ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}/
>  		cp -fpPR ${SYSROOT_DESTDIR}/${STAGING_DIR}/* ${PSTAGE_TMPDIR_STAGE}/sysroots/ || /bin/true
> -		cp -fpPR ${SYSROOT_DESTDIR}/${CROSS_DIR}/* ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}/ || /bin/true
>  	fi
>  }
>  
> diff --git a/conf/bitbake.conf b/conf/bitbake.conf
> index 69d00e2..748abba 100644
> --- a/conf/bitbake.conf
> +++ b/conf/bitbake.conf
> @@ -410,10 +410,7 @@ EXTRA_IMAGEDEPENDS = ""
>  ##################################################################
>  # Toolchain info.
>  ##################################################################
> -
> -CROSS_DIR = "${TMPDIR}/cross/${BASE_PACKAGE_ARCH}"
> -CROSS_DATADIR = "${CROSS_DIR}/share"
> -PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_BINDIR_CROSS_BASEPKG}:${STAGING_SBINDIR_NATIVE}:${STAGING_BINDIR_NATIVE}:${CROSS_DIR}/${bindir_cross}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:"
> +PATH_prepend = "${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}/${base_bindir_native}:"
>  export PATH
>  
>  ##################################################################
> @@ -422,7 +419,7 @@ export PATH
>  
>  CCACHE ?= ""
>  TOOLCHAIN_OPTIONS = ""
> -TOOLCHAIN_PATH ?= "${CROSS_DIR}"
> +TOOLCHAIN_PATH ?= "${STAGING_DIR_NATIVE}${prefix_native}"
>  TOOLCHAIN_SYSPATH ?= "${TOOLCHAIN_PATH}/${TARGET_SYS}"
>  
>  export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"


-- 
Tom Rini
Mentor Graphics Corporation



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

* Re: [PATCH 2/4] toolchain: Remove references to CROSS_DIR
  2010-07-21 18:04 ` [PATCH 2/4] toolchain: Remove references to CROSS_DIR Khem Raj
@ 2010-07-21 21:52   ` Tom Rini
  0 siblings, 0 replies; 35+ messages in thread
From: Tom Rini @ 2010-07-21 21:52 UTC (permalink / raw)
  To: openembedded-devel

Khem Raj wrote:
> * Toolchain is installed into native sysroot now.
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

Acked-by: Tom Rini <tom_rini@mentor.com>

> ---
>  recipes/binutils/binutils-cross.inc                |   20 +++++++++---------
>  recipes/eglibc/eglibc-package.bbclass              |    4 +-
>  recipes/gcc/gcc-configure-sdk.inc                  |   22 ++++++++++----------
>  recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb    |    4 +-
>  .../gcc/gcc-cross-intermediate_csl-arm-2007q3.bb   |    4 +-
>  recipes/gcc/gcc-cross-kernel.inc                   |    2 +-
>  recipes/gcc/gcc-cross-sdk_3.4.4.bb                 |    4 +-
>  recipes/gcc/gcc-cross_csl-arm-2007q3.bb            |    6 ++--
>  recipes/gcc/gcc-cross_csl-arm-2008q1.bb            |    6 ++--
>  recipes/gcc/gcc-cross_csl-arm-2008q3.bb            |    6 ++--
>  recipes/gcc/gcc-package-cross.inc                  |    8 +++---
>  11 files changed, 43 insertions(+), 43 deletions(-)
> 
> diff --git a/recipes/binutils/binutils-cross.inc b/recipes/binutils/binutils-cross.inc
> index 432e1a7..f3ba5c3 100644
> --- a/recipes/binutils/binutils-cross.inc
> +++ b/recipes/binutils/binutils-cross.inc
> @@ -16,14 +16,14 @@ do_install () {
>  	${D}${libdir}/libiberty_pic.a
>  
>  	# We don't really need these, so we'll remove them...
> -	rm -rf ${D}${CROSS_DIR}/lib/ldscripts
> -	rm -rf ${D}${CROSS_DIR}/share/info
> -	rm -rf ${D}${CROSS_DIR}/share/locale
> -	rm -rf ${D}${CROSS_DIR}/share/man
> -	rmdir ${D}${CROSS_DIR}/share || :
> -	rmdir ${D}${CROSS_DIR}/${libdir}/gcc-lib || :
> -	rmdir ${D}${CROSS_DIR}/${libdir}64/gcc-lib || :
> -	rmdir ${D}${CROSS_DIR}/${libdir} || :
> -	rmdir ${D}${CROSS_DIR}/${libdir}64 || :
> -	rmdir ${D}${CROSS_DIR}/${prefix} || :
> +	rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/ldscripts
> +	rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/info
> +	rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/locale
> +	rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/share/man
> +	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/share || :
> +	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}/gcc-lib || :
> +	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64/gcc-lib || :
> +	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir} || :
> +	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${libdir}64 || :
> +	rmdir ${D}${STAGING_DIR_NATIVE}${prefix_native}/${prefix} || :
>  }
> diff --git a/recipes/eglibc/eglibc-package.bbclass b/recipes/eglibc/eglibc-package.bbclass
> index 3dc97b4..4e286af 100644
> --- a/recipes/eglibc/eglibc-package.bbclass
> +++ b/recipes/eglibc/eglibc-package.bbclass
> @@ -169,8 +169,8 @@ do_prep_locale_tree() {
>  		gunzip $i
>  	done
>  	ls -d ${PKGD}${base_libdir}/* | xargs -iBLAH cp -pPR BLAH $treedir/lib
> -	if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then
> -		cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
> +	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.* ]; then
> +		cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
>  	fi
>  	install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin
>  }
> diff --git a/recipes/gcc/gcc-configure-sdk.inc b/recipes/gcc/gcc-configure-sdk.inc
> index 205b106..d5a5942 100644
> --- a/recipes/gcc/gcc-configure-sdk.inc
> +++ b/recipes/gcc/gcc-configure-sdk.inc
> @@ -5,23 +5,23 @@ USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
>  USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibceabi", "no", "", d )}'
>  
>  EXTRA_OECONF_PATHS = "--with-sysroot=${prefix}/${TARGET_SYS} \
> -                      --with-build-time-tools=${CROSS_DIR}/${TARGET_SYS}/bin \
> +                      --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
>                        --with-build-sysroot=${STAGING_DIR_TARGET}"
>  
>  #
>  # gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky
>  # for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse.
>  #
> -export AR_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ar"
> -export AS_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/as"
> -export DLLTOOL_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/dlltool"
> -export LD_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ld"
> -export LIPO_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/lipo"
> -export NM_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/nm"
> -export OBJDUMP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/objdump"
> -export RANLIB_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ranlib"
> -export STRIP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/strip"
> -export WINDRES_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/windres"
> +export AR_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/ar"
> +export AS_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/as"
> +export DLLTOOL_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/dlltool"
> +export LD_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/ld"
> +export LIPO_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/lipo"
> +export NM_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/nm"
> +export OBJDUMP_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/objdump"
> +export RANLIB_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/ranlib"
> +export STRIP_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/strip"
> +export WINDRES_FOR_TARGET = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/windres"
>  
>  #
>  # We need to override this and make sure the compiler can find staging
> diff --git a/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb b/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb
> index 908b612..dd60164 100644
> --- a/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb
> +++ b/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb
> @@ -5,6 +5,6 @@ S = "${WORKDIR}/gcc-4.2"
>  
>  # Hack till we fix *libc properly
>  do_install_append() {
> -	install -d ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
> -	ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
> +	install -d ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
> +	ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
>  }
> diff --git a/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb b/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb
> index 89e6a85..b9b34b6 100644
> --- a/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb
> +++ b/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb
> @@ -5,6 +5,6 @@ S = "${WORKDIR}/gcc-4.2"
>  
>  # Hack till we fix *libc properly
>  do_install_append() {
> -	install -d ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include
> -	ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/
> +	install -d ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include
> +	ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
>  }
> diff --git a/recipes/gcc/gcc-cross-kernel.inc b/recipes/gcc/gcc-cross-kernel.inc
> index c0a8de7..e6f1fb8 100644
> --- a/recipes/gcc/gcc-cross-kernel.inc
> +++ b/recipes/gcc/gcc-cross-kernel.inc
> @@ -19,5 +19,5 @@ do_compile () {
>  do_stage () {
>  	cd gcc
>  	oe_runmake installdirs install-common install-headers install-libgcc
> -	install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
> +	install -m 0755 xgcc ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV}
>  }
> diff --git a/recipes/gcc/gcc-cross-sdk_3.4.4.bb b/recipes/gcc/gcc-cross-sdk_3.4.4.bb
> index 16ca9e4..a885c07 100644
> --- a/recipes/gcc/gcc-cross-sdk_3.4.4.bb
> +++ b/recipes/gcc/gcc-cross-sdk_3.4.4.bb
> @@ -7,7 +7,7 @@ SRC_URI += 'file://sdk-libstdc++-includes.patch'
>  
>  do_compile_prepend () {
>  	mkdir -p gcc
> -	ln -s ${CROSS_DIR}/bin/${TARGET_PREFIX}as gcc/as 
> -	ln -s ${CROSS_DIR}/bin/${TARGET_PREFIX}ld gcc/ld
> +	ln -s ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}as gcc/as 
> +	ln -s ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}ld gcc/ld
>  }
>  
> diff --git a/recipes/gcc/gcc-cross_csl-arm-2007q3.bb b/recipes/gcc/gcc-cross_csl-arm-2007q3.bb
> index 945e8ac..70c869e 100644
> --- a/recipes/gcc/gcc-cross_csl-arm-2007q3.bb
> +++ b/recipes/gcc/gcc-cross_csl-arm-2007q3.bb
> @@ -14,9 +14,9 @@ LDFLAGS = ""
>  
>  # staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain
>  do_compile_prepend() {
> -	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/
> -	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/
> -	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/ 
> +	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
> +	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
> +	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/ 
>  	sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure
>  
>  }
> diff --git a/recipes/gcc/gcc-cross_csl-arm-2008q1.bb b/recipes/gcc/gcc-cross_csl-arm-2008q1.bb
> index a3edb28..7ed0f51 100644
> --- a/recipes/gcc/gcc-cross_csl-arm-2008q1.bb
> +++ b/recipes/gcc/gcc-cross_csl-arm-2008q1.bb
> @@ -14,9 +14,9 @@ LDFLAGS = ""
>  
>  # staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain
>  do_compile_prepend() {
> -	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/
> -	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/
> -	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/ 
> +	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
> +	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
> +	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/ 
>  	sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure
>  
>  }
> diff --git a/recipes/gcc/gcc-cross_csl-arm-2008q3.bb b/recipes/gcc/gcc-cross_csl-arm-2008q3.bb
> index 88b222e..9ada568 100644
> --- a/recipes/gcc/gcc-cross_csl-arm-2008q3.bb
> +++ b/recipes/gcc/gcc-cross_csl-arm-2008q3.bb
> @@ -14,9 +14,9 @@ LDFLAGS = ""
>  
>  # staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain
>  do_compile_prepend() {
> -	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/
> -	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/
> -	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/ 
> +	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
> +	ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/
> +	ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/ 
>  	sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure
>  
>  }
> diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
> index 95936ed..6978340 100644
> --- a/recipes/gcc/gcc-package-cross.inc
> +++ b/recipes/gcc/gcc-package-cross.inc
> @@ -38,12 +38,12 @@ do_install () {
>       
>  	# Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77
>  	# gfortran is fully backwards compatible. This is a safe and practical solution.
> -	if [ -f ${D}${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
> +	if [ -f ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ]; then
>  		currdir="$PWD"
> -		cd ${D}${CROSS_DIR}/bin/
> +		cd ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/
>  		ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
> -		if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then 
> -			cd ${CROSS_DIR}/${TARGET_SYS}/bin/
> +		if [ -d ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/ ] ; then 
> +			cd ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin/
>  			ln -sf gfortran g77 || true
>  		fi
>  		cd $currdir


-- 
Tom Rini
Mentor Graphics Corporation



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

* Re: [PATCH 3/4] recipes: Fix references to CROSS_DIR
  2010-07-21 18:04 ` [PATCH 3/4] recipes: Fix " Khem Raj
@ 2010-07-21 21:53   ` Tom Rini
  0 siblings, 0 replies; 35+ messages in thread
From: Tom Rini @ 2010-07-21 21:53 UTC (permalink / raw)
  To: openembedded-devel

Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

Acked-by: Tom Rini <tom_rini@mentor.com>

> ---
>  recipes/apex/apex-env_1.5.14.bb                |    6 +++---
>  recipes/apex/apex-env_1.5.8.bb                 |    6 +++---
>  recipes/apex/apex-nslu2-16mb_1.5.14.bb         |    6 +++---
>  recipes/apex/apex-nslu2_1.5.14.bb              |    6 +++---
>  recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb |   18 +++++++++---------
>  recipes/avr-libc/avr-libc_1.0.3.bb             |    2 +-
>  recipes/bl/bl_cvs.bb                           |    2 +-
>  recipes/chromium/chromium_svn.bb               |    2 +-
>  recipes/dejagnu/dejagnu-qemu_1.0.bb            |    2 +-
>  recipes/dietlibc/dietlibc.inc                  |    4 ++--
>  recipes/emacs/emacs.inc                        |   10 +++++-----
>  recipes/emacs/emacs_cvs.bb                     |    6 +++---
>  recipes/gstreamer/gst-ffmpeg_0.10.10.bb        |    2 +-
>  recipes/gstreamer/gst-ffmpeg_0.10.2.bb         |    2 +-
>  recipes/gstreamer/gst-ffmpeg_0.10.4.bb         |    2 +-
>  recipes/gstreamer/gst-ffmpeg_0.10.6.bb         |    2 +-
>  recipes/gstreamer/gst-ffmpeg_0.10.7.bb         |    2 +-
>  recipes/gstreamer/gst-ffmpeg_0.10.8.bb         |    2 +-
>  recipes/iphone/gcc-iphone-cross_git.bb         |    4 ++--
>  recipes/klibc/klibc.inc                        |    2 +-
>  recipes/led/led_cvs.bb                         |    2 +-
>  recipes/mamona/binutils-noemu_2.17.50.0.5.bb   |    2 +-
>  recipes/meta/cross-linkage_1.0.bb              |   18 +++++++++---------
>  recipes/musicbrainz/libmusicbrainz.inc         |    2 +-
>  recipes/openmoko2/openmoko-browser2_svn.bb     |    2 +-
>  recipes/perl/perl_5.10.1.bb                    |    2 +-
>  recipes/perl/perl_5.8.8.bb                     |    2 +-
>  recipes/phoneme/phoneme-advanced.inc           |    2 +-
>  recipes/qi/qi.inc                              |    2 +-
>  recipes/uclibc/bfin-uclibc_svn.bb              |    2 +-
>  recipes/wvstreams/wvstreams_4.2.2.bb           |    2 +-
>  recipes/wvstreams/wvstreams_4.4.1.bb           |    2 +-
>  recipes/wvstreams/wvstreams_4.6.bb             |    2 +-
>  33 files changed, 65 insertions(+), 65 deletions(-)
> 
> diff --git a/recipes/apex/apex-env_1.5.14.bb b/recipes/apex/apex-env_1.5.14.bb
> index ddd28f3..cb44bd5 100644
> --- a/recipes/apex/apex-env_1.5.14.bb
> +++ b/recipes/apex/apex-env_1.5.14.bb
> @@ -10,11 +10,11 @@ SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \
>  	"
>  S = ${WORKDIR}/apex-${PV}/usr
>  
> -EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
> +EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
>  
>  oe_runmake() {
> -	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
> -	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
> +	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@"
> +	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
>  }
>  
>  do_install() {
> diff --git a/recipes/apex/apex-env_1.5.8.bb b/recipes/apex/apex-env_1.5.8.bb
> index b619026..d2cf0b7 100644
> --- a/recipes/apex/apex-env_1.5.8.bb
> +++ b/recipes/apex/apex-env_1.5.8.bb
> @@ -10,11 +10,11 @@ SRC_URI = "ftp://ftp.buici.com/pub/apex/apex-${PV}.tar.gz \
>  	"
>  S = ${WORKDIR}/apex-${PV}/usr
>  
> -EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
> +EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
>  
>  oe_runmake() {
> -	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
> -	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
> +	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@"
> +	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
>  }
>  
>  do_install() {
> diff --git a/recipes/apex/apex-nslu2-16mb_1.5.14.bb b/recipes/apex/apex-nslu2-16mb_1.5.14.bb
> index 8e764dd..1e654df 100644
> --- a/recipes/apex/apex-nslu2-16mb_1.5.14.bb
> +++ b/recipes/apex/apex-nslu2-16mb_1.5.14.bb
> @@ -17,11 +17,11 @@ CMDLINE_ROOT  ?= "root=/dev/mtdblock4 rootfstype=jffs2 rw"
>  
>  CMDLINE_DEBUG ?= ""
>  
> -EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
> +EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
>  
>  oe_runmake() {
> -	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
> -	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
> +	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@"
> +	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
>  }
>  
>  # Set the correct CONFIG_USER_xxx_ENDIAN and CONFIG_CMDLINE at the head
> diff --git a/recipes/apex/apex-nslu2_1.5.14.bb b/recipes/apex/apex-nslu2_1.5.14.bb
> index a1d91b7..efab695 100644
> --- a/recipes/apex/apex-nslu2_1.5.14.bb
> +++ b/recipes/apex/apex-nslu2_1.5.14.bb
> @@ -17,11 +17,11 @@ CMDLINE_ROOT  ?= "root=/dev/mtdblock4 rootfstype=jffs2 rw"
>  
>  CMDLINE_DEBUG ?= ""
>  
> -EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
> +EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
>  
>  oe_runmake() {
> -	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@"
> -	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
> +	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@"
> +	make ${PARALLEL_MAKE} LDFLAGS= CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} "$@" || die "oe_runmake failed"
>  }
>  
>  # Set the correct CONFIG_USER_xxx_ENDIAN and CONFIG_CMDLINE at the head
> diff --git a/recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb b/recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb
> index f02cc95..76e2606 100644
> --- a/recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb
> +++ b/recipes/arm-kernel-shim/arm-kernel-shim_1.5.bb
> @@ -27,7 +27,7 @@ CMDLINE_ROOT_NAS100D = "root=/dev/mtdblock2 rootfstype=jffs2 rootflags=noatime r
>  CMDLINE_ROOT_NSLU2   = "root=/dev/mtdblock4 rootfstype=jffs2 rootflags=noatime rw init=/linuxrc"
>  # CMDLINE is passed correctly on the Freecom FSG-3 from the bootloader.
>  
> -EXTRA_OEMAKE_append = " CROSS_COMPILE=${CROSS_DIR}/bin/${HOST_PREFIX}"
> +EXTRA_OEMAKE_append = " CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${HOST_PREFIX}"
>  
>  oe_runmake() {
>  	mv ${S}/config.h ${S}/config.h.orig
> @@ -41,8 +41,8 @@ oe_runmake() {
>  	fi
>  	echo "#define COMMANDLINE \"${CMDLINE_CONSOLE} ${CMDLINE_ROOT_NSLU2} ${CMDLINE_DEBUG}\"" >> ${S}/config.h
>  	rm -f ${S}/main.o
> -	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2
> -	make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2 || die "oe_runmake failed"
> +	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2
> +	make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nslu2 || die "oe_runmake failed"
>  	# NAS100d
>  	if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
>  		sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
> @@ -53,8 +53,8 @@ oe_runmake() {
>  	fi
>  	echo "#define COMMANDLINE \"${CMDLINE_CONSOLE} ${CMDLINE_ROOT_NAS100D} ${CMDLINE_DEBUG}\"" >> ${S}/config.h
>  	rm -f ${S}/main.o
> -	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d
> -	make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d || die "oe_runmake failed"
> +	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d
> +	make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-nas100d || die "oe_runmake failed"
>  	# DSMG-600
>  	if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
>  		sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
> @@ -65,8 +65,8 @@ oe_runmake() {
>  	fi
>  	echo "#define COMMANDLINE \"${CMDLINE_CONSOLE} ${CMDLINE_ROOT_DSMG600} ${CMDLINE_DEBUG}\"" >> ${S}/config.h
>  	rm -f ${S}/main.o
> -	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600
> -	make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600 || die "oe_runmake failed"
> +	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600
> +	make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-dsmg600 || die "oe_runmake failed"
>  	# FSG-3
>  	if [ ${SITEINFO_ENDIANESS} == "be" ] ; then
>  		sed -e 's|//#define FORCE_BIGENDIAN|#define FORCE_BIGENDIAN|' \
> @@ -76,8 +76,8 @@ oe_runmake() {
>  			${WORKDIR}/config-fsg3.h > ${S}/config.h
>  	fi
>  	rm -f ${S}/main.o
> -	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3
> -	make ${PARALLEL_MAKE} CROSS_COMPILE=${CROSS_DIR}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3 || die "oe_runmake failed"
> +	oenote make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3
> +	make ${PARALLEL_MAKE} CROSS_COMPILE=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX} PACKAGE=arm-kernel-shim-fsg3 || die "oe_runmake failed"
>  	mv ${S}/config.h.orig ${S}/config.h
>  }
>  
> diff --git a/recipes/avr-libc/avr-libc_1.0.3.bb b/recipes/avr-libc/avr-libc_1.0.3.bb
> index 052425b..efd2967 100644
> --- a/recipes/avr-libc/avr-libc_1.0.3.bb
> +++ b/recipes/avr-libc/avr-libc_1.0.3.bb
> @@ -18,7 +18,7 @@ B = "${WORKDIR}/build.${BUILD_SYS}.${TARGET_SYS}"
>  inherit autotools
>  
>  export tooldir = "${prefix}"
> -prefix = "${CROSS_DIR}"
> +prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
>  exec_prefix = "${prefix}"
>  
>  do_stage () {
> diff --git a/recipes/bl/bl_cvs.bb b/recipes/bl/bl_cvs.bb
> index cdbf2ba..779ff1e 100644
> --- a/recipes/bl/bl_cvs.bb
> +++ b/recipes/bl/bl_cvs.bb
> @@ -21,7 +21,7 @@ do_configure (){
>  }
>  
>  do_compile (){
> -	oe_runmake bl CC="${CROSS_DIR}/bin/${TARGET_SYS}-gcc -I{STAGING_INCDIR} -L${STAGING_LIBDIR}" AS=${CROSS_DIR}/bin/${TARGET_SYS}-as LD=${CROSS_DIR}/bin/${TARGET_SYS}-ld
> +	oe_runmake bl CC="${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-gcc -I{STAGING_INCDIR} -L${STAGING_LIBDIR}" AS=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-as LD=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-ld
>  }
>  
>  do_install () {
> diff --git a/recipes/chromium/chromium_svn.bb b/recipes/chromium/chromium_svn.bb
> index a71f947..6aeab44 100644
> --- a/recipes/chromium/chromium_svn.bb
> +++ b/recipes/chromium/chromium_svn.bb
> @@ -100,7 +100,7 @@ TARGET_CC_ARCH += "${LDFLAGS}"
>  
>  do_compile() {
>  	cd ${S}
> -	export CROSSTOOL=${CROSS_DIR}/bin/${TARGET_PREFIX}
> +	export CROSSTOOL=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}
>  	export AR=${CROSSTOOL}ar
>  	export AS=${CROSSTOOL}as
>  	export RANLIB=${CROSSTOOL}ranlib
> diff --git a/recipes/dejagnu/dejagnu-qemu_1.0.bb b/recipes/dejagnu/dejagnu-qemu_1.0.bb
> index 2eef27e..89cea80 100644
> --- a/recipes/dejagnu/dejagnu-qemu_1.0.bb
> +++ b/recipes/dejagnu/dejagnu-qemu_1.0.bb
> @@ -13,7 +13,7 @@ do_stage() {
>  	install -m 0644 ${WORKDIR}/arm-qemu.exp ${STAGING_DATADIR}/dejagnu/baseboards/
>  	cat <<EOF >${STAGING_BINDIR_NATIVE}/${QEMU}-test-wrapper
>  #!/bin/sh
> -exec ${QEMU} ${CROSS_DIR}/${TARGET_SYS}/${LD_SO} --library-path ${CROSS_DIR}/${TARGET_SYS}/lib:${STAGING_DIR_TARGET}${layout_libdir} \$1
> +exec ${QEMU} ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/${LD_SO} --library-path ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib:${STAGING_DIR_TARGET}${layout_libdir} \$1
>  EOF
>  	chmod 755 ${STAGING_BINDIR_NATIVE}/arm-qemu-test-wrapper
>  }
> diff --git a/recipes/dietlibc/dietlibc.inc b/recipes/dietlibc/dietlibc.inc
> index 624a9ae..a1537e1 100644
> --- a/recipes/dietlibc/dietlibc.inc
> +++ b/recipes/dietlibc/dietlibc.inc
> @@ -29,12 +29,12 @@ do_stage () {
>  	DIETLIBC_BUILD_ARCH=`echo ${BUILD_ARCH} | sed -e s'/.86/386/'`
>  	DIETLIBC_TARGET_ARCH=`echo ${TARGET_ARCH} | sed -e s'/.86/386/'`
>  	rm -rf ${STAGING_DIR_TARGET}/lib/dietlibc || true
> -	rm ${CROSS_DIR}/bin/diet || true
> +	rm ${STAGING_DIR_NATIVE}${prefix_native}/bin/diet || true
>  	install -d ${STAGING_DIR_TARGET}/lib/dietlibc/lib-${DIETLIBC_TARGET_ARCH}
>  	install -d ${STAGING_DIR_TARGET}/lib/dietlibc/include
>          for i in `find include -name \*.h`; do install -m 644 -D $i ${STAGING_DIR_TARGET}/lib/dietlibc/$i; done
>  
> -        install -m755 bin-${DIETLIBC_BUILD_ARCH}/diet-i ${CROSS_DIR}/bin/diet
> +        install -m755 bin-${DIETLIBC_BUILD_ARCH}/diet-i ${STAGING_DIR_NATIVE}${prefix_native}/bin/diet
>  	
>  	cd bin-${DIETLIBC_TARGET_ARCH}
>  	install -m 644 start.o libm.a libpthread.a librpc.a \
> diff --git a/recipes/emacs/emacs.inc b/recipes/emacs/emacs.inc
> index 6645f41..893ee9d 100644
> --- a/recipes/emacs/emacs.inc
> +++ b/recipes/emacs/emacs.inc
> @@ -32,7 +32,7 @@ export LOGNAME = "$(whoami)"
>  
>  do_compile_prepend() {
>  	sed -i ':1;s:\(START.* \|LIB_STANDARD.* \|LIBES.* \)/usr/lib:\1${STAGING_LIBDIR}:;t1' ${S}/src/s/gnu-linux.h `find "${S}" -name Makefile`
> -	export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${CROSS_DIR}/${TARGET_SYS}/lib"
> +	export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
>  # Ugly hack, see files/use-qemu.patch for more:
>  	ln -sf ../src/emacs lisp/emacs
>  	ln -sf ../src/emacs lib-src/emacs
> @@ -44,11 +44,11 @@ do_compile_prepend() {
>  	fi
>  	mkdir $treedir
>  	cp -pPR ${STAGING_DIR_TARGET}/* $treedir
> -	if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so ]; then
> -                cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
> +	if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so ]; then
> +                cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so $treedir/lib
>          fi
> -        if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* ]; then
> -                cp -pPR ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.* $treedir/lib
> +        if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so.* ]; then
> +                cp -pPR ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so.* $treedir/lib
>          fi
>  	# stupid hack, but without it, it tries to use /usr/lib/libc.so from host and fails
>  	# temacs: error while loading shared libraries: /usr/lib/libc.so: ELF file version does not match current one
> diff --git a/recipes/emacs/emacs_cvs.bb b/recipes/emacs/emacs_cvs.bb
> index c3a98a3..a2065be 100644
> --- a/recipes/emacs/emacs_cvs.bb
> +++ b/recipes/emacs/emacs_cvs.bb
> @@ -27,12 +27,12 @@ FILES_${PN}-el = "${datadir}/emacs/*/*/*.el.gz \
>  FILES_${PN} += "${datadir}/emacs"
>  
>  QEMU = "qemu-${TARGET_ARCH} -L ${STAGING_DIR_TARGET}"
> -LDFLAGS += "-L${CROSS_DIR}/${TARGET_SYS}/lib"
> +LDFLAGS += "-L${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
>  
>  EXTRA_OECONF = "--without-sound --without-x"
>  
>  do_bootstrap() {
> -    cp "${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
> +    cp "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
>      export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${S}"
>      export QEMU="${QEMU}"
>  
> @@ -46,7 +46,7 @@ do_bootstrap() {
>  addtask bootstrap before do_compile after do_configure
>  
>  do_compile_prepend() {
> -    cp "${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
> +    cp "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/libgcc_s.so.1" "${S}"
>      export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${S}"
>      export QEMU="${QEMU}"
>  }
> diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.10.bb b/recipes/gstreamer/gst-ffmpeg_0.10.10.bb
> index c29e3b6..9b0269c 100644
> --- a/recipes/gstreamer/gst-ffmpeg_0.10.10.bb
> +++ b/recipes/gstreamer/gst-ffmpeg_0.10.10.bb
> @@ -22,7 +22,7 @@ EXTRA_OECONF = " --with-system-ffmpeg "
>  
>  # We do this because the install program is called with -s which causes it to
>  # call "strip" and it then mangles cross compiled stuff..
> -PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
> +PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
>  
>  # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
>  CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
> diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.2.bb b/recipes/gstreamer/gst-ffmpeg_0.10.2.bb
> index c835011..f2c2654 100644
> --- a/recipes/gstreamer/gst-ffmpeg_0.10.2.bb
> +++ b/recipes/gstreamer/gst-ffmpeg_0.10.2.bb
> @@ -25,7 +25,7 @@ EXTRA_OECONF = "--disable-sdltest --disable-ffplay --disable-freetypetest \
>  
>  # We do this because the install program is called with -s which causes it to
>  # call "strip" and it then mangles cross compiled stuff..
> -PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
> +PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
>  
>  # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
>  CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
> diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.4.bb b/recipes/gstreamer/gst-ffmpeg_0.10.4.bb
> index 19d1bb1..28a753d 100644
> --- a/recipes/gstreamer/gst-ffmpeg_0.10.4.bb
> +++ b/recipes/gstreamer/gst-ffmpeg_0.10.4.bb
> @@ -24,7 +24,7 @@ EXTRA_OECONF = "--disable-sdltest --disable-ffplay --disable-freetypetest \
>  
>  # We do this because the install program is called with -s which causes it to
>  # call "strip" and it then mangles cross compiled stuff..
> -PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
> +PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
>  
>  # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
>  CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
> diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.6.bb b/recipes/gstreamer/gst-ffmpeg_0.10.6.bb
> index 0a9b373..9b8ec8d 100644
> --- a/recipes/gstreamer/gst-ffmpeg_0.10.6.bb
> +++ b/recipes/gstreamer/gst-ffmpeg_0.10.6.bb
> @@ -25,7 +25,7 @@ EXTRA_OECONF = "--disable-sdltest --disable-ffplay --disable-freetypetest \
>  
>  # We do this because the install program is called with -s which causes it to
>  # call "strip" and it then mangles cross compiled stuff..
> -PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
> +PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
>  
>  # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
>  CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
> diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.7.bb b/recipes/gstreamer/gst-ffmpeg_0.10.7.bb
> index c9e33de..8a1d56e 100644
> --- a/recipes/gstreamer/gst-ffmpeg_0.10.7.bb
> +++ b/recipes/gstreamer/gst-ffmpeg_0.10.7.bb
> @@ -25,7 +25,7 @@ EXTRA_OECONF = "--disable-sdltest --disable-ffplay --disable-freetypetest \
>  
>  # We do this because the install program is called with -s which causes it to
>  # call "strip" and it then mangles cross compiled stuff..
> -PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
> +PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
>  
>  # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
>  CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
> diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.8.bb b/recipes/gstreamer/gst-ffmpeg_0.10.8.bb
> index 2e5b84e..2bdc45b 100644
> --- a/recipes/gstreamer/gst-ffmpeg_0.10.8.bb
> +++ b/recipes/gstreamer/gst-ffmpeg_0.10.8.bb
> @@ -21,7 +21,7 @@ EXTRA_OECONF = " --with-system-ffmpeg "
>  
>  # We do this because the install program is called with -s which causes it to
>  # call "strip" and it then mangles cross compiled stuff..
> -PATH_prepend="${CROSS_DIR}/${TARGET_SYS}/bin:"
> +PATH_prepend="${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin:"
>  
>  # Hack to get STAGING_LIBDIR into the linker path when building ffmpeg
>  CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}"
> diff --git a/recipes/iphone/gcc-iphone-cross_git.bb b/recipes/iphone/gcc-iphone-cross_git.bb
> index ea351cf..3c6a788 100644
> --- a/recipes/iphone/gcc-iphone-cross_git.bb
> +++ b/recipes/iphone/gcc-iphone-cross_git.bb
> @@ -20,8 +20,8 @@ EXTRA_OECONF = "\
>  	--enable-sjlj-exceptions \
>  	--enable-wchar_t=no  \
>  	--with-gxx-include-dir=${STAGING_DIR_TARGET}/${layout_includedir}/c++ \
> -	--with-as=${CROSS_DIR}/bin/${TARGET_PREFIX}as \
> -	--with-ld=${CROSS_DIR}/bin/${TARGET_PREFIX}ld \
> +	--with-as=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}as \
> +	--with-ld=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}ld \
>  	--with-sysroot=${STAGING_DIR_TARGET} \
>  	--with-build-sysroot=${STAGING_DIR_TARGET} \
>  	--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
> diff --git a/recipes/klibc/klibc.inc b/recipes/klibc/klibc.inc
> index 9ae6c5b..d0f8e1c 100644
> --- a/recipes/klibc/klibc.inc
> +++ b/recipes/klibc/klibc.inc
> @@ -13,7 +13,7 @@ do_install() {
>  export INST=${STAGING_DIR_TARGET}
>  do_stage() {
>          oe_runmake  install
> -        cp '${STAGING_DIR_TARGET}/bin/klcc'  '${CROSS_DIR}/bin/${TARGET_PREFIX}klcc'
> +        cp '${STAGING_DIR_TARGET}/bin/klcc'  '${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}klcc'
>  }
>  
>  PACKAGES = "${PN} ${PN}-dev "
> diff --git a/recipes/led/led_cvs.bb b/recipes/led/led_cvs.bb
> index 6f303d1..90eb116 100644
> --- a/recipes/led/led_cvs.bb
> +++ b/recipes/led/led_cvs.bb
> @@ -19,7 +19,7 @@ do_configure (){
>  }
>  
>  do_compile (){
> -	oe_runmake led CC="${CROSS_DIR}/bin/${TARGET_SYS}-gcc -I${STAGING_INCDIR} -I${STAGING_KERNEL_DIR}/include  -L${STAGING_LIBDIR}" AS=${CROSS_DIR}/bin/${TARGET_SYS}-as LD=${CROSS_DIR}/bin/${TARGET_SYS}-ld
> +	oe_runmake led CC="${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-gcc -I${STAGING_INCDIR} -I${STAGING_KERNEL_DIR}/include  -L${STAGING_LIBDIR}" AS=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-as LD=${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}-ld
>  }
>  
>  do_install () {
> diff --git a/recipes/mamona/binutils-noemu_2.17.50.0.5.bb b/recipes/mamona/binutils-noemu_2.17.50.0.5.bb
> index f2362ff..c3e2b31 100644
> --- a/recipes/mamona/binutils-noemu_2.17.50.0.5.bb
> +++ b/recipes/mamona/binutils-noemu_2.17.50.0.5.bb
> @@ -16,7 +16,7 @@ SRC_URI = \
>       file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
>       "
>  
> -EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
> +EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS} \
>  		--program-prefix=${TARGET_PREFIX} --disable-shared"
>  
>  HOST_SYS = "${BUILD_SYS}"
> diff --git a/recipes/meta/cross-linkage_1.0.bb b/recipes/meta/cross-linkage_1.0.bb
> index 9be09aa..a5e456b 100644
> --- a/recipes/meta/cross-linkage_1.0.bb
> +++ b/recipes/meta/cross-linkage_1.0.bb
> @@ -21,15 +21,15 @@ do_install() {
>  }
>  
>  do_stage () {
> -	install -d ${CROSS_DIR}/${TARGET_SYS}/
> -	if [ -e ${CROSS_DIR}/${TARGET_SYS}/include ]; then
> -		cp -pPRr ${CROSS_DIR}/${TARGET_SYS}/include/* ${STAGING_INCDIR}
> -		mv ${CROSS_DIR}/${TARGET_SYS}/include/ ${CROSS_DIR}/${TARGET_SYS}/include-oldbackup
> +	install -d ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/
> +	if [ -e ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include ]; then
> +		cp -pPRr ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include/* ${STAGING_INCDIR}
> +		mv ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include/ ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include-oldbackup
>  	fi
> -	ln -s  ${STAGING_INCDIR}/ ${CROSS_DIR}/${TARGET_SYS}/include
> -	if [ -e ${CROSS_DIR}/${TARGET_SYS}/lib ]; then
> -		cp -pPRr ${CROSS_DIR}/${TARGET_SYS}/lib/* ${STAGING_LIBDIR}
> -		mv ${CROSS_DIR}/${TARGET_SYS}/lib/ ${CROSS_DIR}/${TARGET_SYS}/lib-oldbackup
> +	ln -s  ${STAGING_INCDIR}/ ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/include
> +	if [ -e ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib ]; then
> +		cp -pPRr ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/* ${STAGING_LIBDIR}
> +		mv ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib/ ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib-oldbackup
>  	fi
> -	ln -s  ${STAGING_LIBDIR} ${CROSS_DIR}/${TARGET_SYS}/lib 
> +	ln -s  ${STAGING_LIBDIR} ${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib 
>  }
> diff --git a/recipes/musicbrainz/libmusicbrainz.inc b/recipes/musicbrainz/libmusicbrainz.inc
> index 010dd23..1838d4e 100644
> --- a/recipes/musicbrainz/libmusicbrainz.inc
> +++ b/recipes/musicbrainz/libmusicbrainz.inc
> @@ -10,7 +10,7 @@ SRC_URI = "ftp://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-${PV}.tar.gz
>  inherit cmake pkgconfig
>  
>  # Fight a compiler/link bug that leaks too many c++ symbols
> -TARGET_LDFLAGS += " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib -ldl"
> +TARGET_LDFLAGS += " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib -ldl"
>  
>  do_stage() {
>  	autotools_stage_all
> diff --git a/recipes/openmoko2/openmoko-browser2_svn.bb b/recipes/openmoko2/openmoko-browser2_svn.bb
> index 3d329b7..a4d8164 100644
> --- a/recipes/openmoko2/openmoko-browser2_svn.bb
> +++ b/recipes/openmoko2/openmoko-browser2_svn.bb
> @@ -6,7 +6,7 @@ PV = "0.0.1+svnr${SRCPV}"
>  PR = "r2"
>  
>  inherit openmoko2
> -LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib"
> +LDFLAGS_append = " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
>  
>  SRC_URI += "file://webkit-update.patch;minrev=3646;maxrev=4171"
>  
> diff --git a/recipes/perl/perl_5.10.1.bb b/recipes/perl/perl_5.10.1.bb
> index c22ecd7..86b08dc 100644
> --- a/recipes/perl/perl_5.10.1.bb
> +++ b/recipes/perl/perl_5.10.1.bb
> @@ -129,7 +129,7 @@ do_install() {
>                     -e "s,${STAGING_LIBDIR},${libdir},g" \
>                     -e "s,${STAGING_BINDIR},${bindir},g" \
>                     -e "s,${STAGING_INCDIR},${includedir},g" \
> -                   -e "s,${CROSS_DIR}${base_bindir}/,,g" \
> +                   -e "s,${STAGING_DIR_NATIVE}${prefix_native}${base_bindir}/,,g" \
>                  ${D}${bindir}/h2xs \
>                  ${D}${bindir}/h2ph \
>                  ${D}${datadir}/perl/${PV}/pod/*.pod \
> diff --git a/recipes/perl/perl_5.8.8.bb b/recipes/perl/perl_5.8.8.bb
> index f09360f..c73fe4e 100644
> --- a/recipes/perl/perl_5.8.8.bb
> +++ b/recipes/perl/perl_5.8.8.bb
> @@ -135,7 +135,7 @@ do_install() {
>                     -e "s,${STAGING_LIBDIR},${libdir},g" \
>                     -e "s,${STAGING_BINDIR},${bindir},g" \
>                     -e "s,${STAGING_INCDIR},${includedir},g" \
> -                   -e "s,${CROSS_DIR}${base_bindir}/,,g" \
> +                   -e "s,${STAGING_DIR_NATIVE}${prefix_native}${base_bindir}/,,g" \
>                  ${D}${bindir}/h2xs \
>                  ${D}${bindir}/h2ph \
>                  ${D}${datadir}/perl/${PV}/pod/*.pod \
> diff --git a/recipes/phoneme/phoneme-advanced.inc b/recipes/phoneme/phoneme-advanced.inc
> index a74bc04..9df61a6 100644
> --- a/recipes/phoneme/phoneme-advanced.inc
> +++ b/recipes/phoneme/phoneme-advanced.inc
> @@ -66,7 +66,7 @@ do_configure() {
>  
>    pmo "# Java toolchain binaries"
>    pmo JDK_HOME /dev/null
> -  pmo CVM_TARGET_TOOLS_PREFIX ${CROSS_DIR}/bin/
> +  pmo CVM_TARGET_TOOLS_PREFIX ${STAGING_DIR_NATIVE}${prefix_native}/bin/
>    pmo CVM_JAVA java
>    pmo CVM_JAVAC javac
>    pmo CVM_JAVADOC true
> diff --git a/recipes/qi/qi.inc b/recipes/qi/qi.inc
> index 0b5451a..f9d4f2e 100644
> --- a/recipes/qi/qi.inc
> +++ b/recipes/qi/qi.inc
> @@ -21,7 +21,7 @@ BUILD_DATE=\$(shell date --iso-8601=seconds)
>  # has been built. If it bails out with something like: "| arm-linux-ld: 4.3.3: No such file or directory"
>  # then you need to remove all previously built toolchain directories out of the cross library path.
>  GCCV="`${CC} -dumpversion`"
> -COMPILER_LIB_PATH_PRE=${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(GCCV)
> +COMPILER_LIB_PATH_PRE=${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/$(GCCV)
>  COMPILER_LIB_PATH=\$(COMPILER_LIB_PATH_PRE)/\$(shell ls \$(COMPILER_LIB_PATH_PRE))
>  
>  AS=${AS}
> diff --git a/recipes/uclibc/bfin-uclibc_svn.bb b/recipes/uclibc/bfin-uclibc_svn.bb
> index 2757fc2..954d10d 100644
> --- a/recipes/uclibc/bfin-uclibc_svn.bb
> +++ b/recipes/uclibc/bfin-uclibc_svn.bb
> @@ -20,7 +20,7 @@ COMPATIBLE_HOST = "bfin.*-uclinux"
>  
>  #as stated above, uclibc needs real kernel-headers
>  #however: we can't depend on virtual/kernel when nptl hits due to depends deadlocking ....
> -KERNEL_SOURCE = "${CROSS_DIR}/${TARGET_SYS}"
> +KERNEL_SOURCE = "${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}"
>  
>  SRC_URI = "svn://sources.blackfin.uclinux.org/toolchain/trunk;module=uClibc "
>  SRC_URI += "file://uClibc.machine file://uClibc.distro"
> diff --git a/recipes/wvstreams/wvstreams_4.2.2.bb b/recipes/wvstreams/wvstreams_4.2.2.bb
> index 83f97be..4358ec1 100644
> --- a/recipes/wvstreams/wvstreams_4.2.2.bb
> +++ b/recipes/wvstreams/wvstreams_4.2.2.bb
> @@ -12,7 +12,7 @@ SRC_URI = "http://ftp.de.debian.org/debian/pool/main/w/wvstreams/${PN}_${PV}.ori
>  
>  inherit autotools pkgconfig
>  
> -LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib"
> +LDFLAGS_append = " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
>  
>  EXTRA_AUTORECONF += " -I${S}/gnulib/m4"
>  EXTRA_OECONF = " --without-tcl --without-qt --without-pam"
> diff --git a/recipes/wvstreams/wvstreams_4.4.1.bb b/recipes/wvstreams/wvstreams_4.4.1.bb
> index fa865c7..4506b05 100644
> --- a/recipes/wvstreams/wvstreams_4.4.1.bb
> +++ b/recipes/wvstreams/wvstreams_4.4.1.bb
> @@ -14,7 +14,7 @@ SRC_URI = "http://wvstreams.googlecode.com/files/${PN}-${PV}.tar.gz \
>  
>  inherit autotools pkgconfig
>  
> -LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib"
> +LDFLAGS_append = " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
>  
>  EXTRA_AUTORECONF += " -I${S}/gnulib/m4"
>  EXTRA_OECONF = " --without-tcl --without-qt --without-pam"
> diff --git a/recipes/wvstreams/wvstreams_4.6.bb b/recipes/wvstreams/wvstreams_4.6.bb
> index a52c284..eb70fd2 100644
> --- a/recipes/wvstreams/wvstreams_4.6.bb
> +++ b/recipes/wvstreams/wvstreams_4.6.bb
> @@ -8,7 +8,7 @@ SRC_URI = "http://wvstreams.googlecode.com/files/${PN}-${PV}.tar.gz \
>  
>  inherit autotools pkgconfig
>  
> -LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib"
> +LDFLAGS_append = " -Wl,-rpath-link,${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/lib"
>  
>  EXTRA_OECONF = " --without-tcl --without-qt --without-pam"
>  


-- 
Tom Rini
Mentor Graphics Corporation



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

* Re: [PATCH 4/4] sanity.bbclass, abi_version.conf: Bump the ABI to inform that cross has died.
  2010-07-21 18:04 ` [PATCH 4/4] sanity.bbclass, abi_version.conf: Bump the ABI to inform that cross has died Khem Raj
@ 2010-07-21 21:53   ` Tom Rini
  0 siblings, 0 replies; 35+ messages in thread
From: Tom Rini @ 2010-07-21 21:53 UTC (permalink / raw)
  To: openembedded-devel

Khem Raj wrote:
> * tmpdir layout is changed bump ABI version to force a rebuild.
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

Acked-by: Tom Rini <tom_rini@mentor.com>

> ---
>  classes/sanity.bbclass |    2 ++
>  conf/abi_version.conf  |    2 +-
>  2 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
> index 8eb7453..cff415a 100644
> --- a/classes/sanity.bbclass
> +++ b/classes/sanity.bbclass
> @@ -149,6 +149,8 @@ def check_sanity(e):
>  			os.system(bb.data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done", e.data))
>  			f = file(abifile, "w")
>  			f.write(current_abi)
> +		elif abi == "5" and current_abi != "5":
> +			messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n"
>  		elif (abi != current_abi):
>  			# Code to convert from one ABI to another could go here if possible.
>  			messages = messages + "Error, TMPDIR has changed ABI (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
> diff --git a/conf/abi_version.conf b/conf/abi_version.conf
> index 92b6b58..a59abf6 100644
> --- a/conf/abi_version.conf
> +++ b/conf/abi_version.conf
> @@ -4,7 +4,7 @@
>  # that breaks the format and have been previously discussed on the mailing list 
>  # with general agreement from the core team.
>  #
> -OELAYOUT_ABI = "4"
> +OELAYOUT_ABI = "5"
>  
>  #
>  # DISTRO_PR allows us to regenerate all packages when a fundamental change is


-- 
Tom Rini
Mentor Graphics Corporation



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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-21 18:04 [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Khem Raj
                   ` (4 preceding siblings ...)
  2010-07-21 21:52 ` [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Tom Rini
@ 2010-07-22  8:27 ` Richard Purdie
  2010-07-22 14:02   ` Chris Larson
  2010-07-22 14:54 ` Koen Kooi
  2010-07-23  7:25 ` Koen Kooi
  7 siblings, 1 reply; 35+ messages in thread
From: Richard Purdie @ 2010-07-22  8:27 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2010-07-21 at 11:04 -0700, Khem Raj wrote:
> The following 4 patches are based on  Jushua's work in poky to get rid of
> cross dir and install the toolchain in  native sysroot.
> 
> I have done native-sdk-builds for uclibc and eglibc. It could build the images
> and the images booted fine in qemu on mips and arm.
> 
> I would  appreciate if someone could lend a hand in testing these patches
> 
> And as we have changed tmpdir layout with this patch I have also bumped ABI
> which means tmp has to be nuked before you try these patches.
> 
> Please review/ack/nack

Thanks for looking at this, its something I've wanted to get to for a
while but haven't managed so far. Consider this an ack from me!

Cheers,

Richard




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-22  8:27 ` Richard Purdie
@ 2010-07-22 14:02   ` Chris Larson
  2010-07-22 14:24     ` Martin Jansa
  0 siblings, 1 reply; 35+ messages in thread
From: Chris Larson @ 2010-07-22 14:02 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Jul 22, 2010 at 1:27 AM, Richard Purdie <rpurdie@rpsys.net> wrote:

> On Wed, 2010-07-21 at 11:04 -0700, Khem Raj wrote:
> > The following 4 patches are based on  Jushua's work in poky to get rid of
> > cross dir and install the toolchain in  native sysroot.
> >
> > I have done native-sdk-builds for uclibc and eglibc. It could build the
> images
> > and the images booted fine in qemu on mips and arm.
> >
> > I would  appreciate if someone could lend a hand in testing these patches
> >
> > And as we have changed tmpdir layout with this patch I have also bumped
> ABI
> > which means tmp has to be nuked before you try these patches.
> >
> > Please review/ack/nack
>
> Thanks for looking at this, its something I've wanted to get to for a
> while but haven't managed so far. Consider this an ack from me!


Ack from me too, test builds work fine, this is a lovely change we've been
wanting to see for a while now, nicely done pulling it over from the poky
bits.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-22 14:02   ` Chris Larson
@ 2010-07-22 14:24     ` Martin Jansa
  0 siblings, 0 replies; 35+ messages in thread
From: Martin Jansa @ 2010-07-22 14:24 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Jul 22, 2010 at 07:02:26AM -0700, Chris Larson wrote:
> On Thu, Jul 22, 2010 at 1:27 AM, Richard Purdie <rpurdie@rpsys.net> wrote:
> 
> > On Wed, 2010-07-21 at 11:04 -0700, Khem Raj wrote:
> > > The following 4 patches are based on  Jushua's work in poky to get rid of
> > > cross dir and install the toolchain in  native sysroot.
> > >
> > > I have done native-sdk-builds for uclibc and eglibc. It could build the
> > images
> > > and the images booted fine in qemu on mips and arm.
> > >
> > > I would  appreciate if someone could lend a hand in testing these patches
> > >
> > > And as we have changed tmpdir layout with this patch I have also bumped
> > ABI
> > > which means tmp has to be nuked before you try these patches.
> > >
> > > Please review/ack/nack
> >
> > Thanks for looking at this, its something I've wanted to get to for a
> > while but haven't managed so far. Consider this an ack from me!
> 
> 
> Ack from me too, test builds work fine, this is a lovely change we've been
> wanting to see for a while now, nicely done pulling it over from the poky
> bits.

SHR/om-gta02
Angstrom/spitz

also built ok here, thanks!

I guess that it would be difficult/dangerous to try to keep backward
compatiblity and move it without abi_version change (as
staging->sysroots was), right? But I'm OK with rebuilding.

For whole patchset:
Acked-by: Martin Jansa <Martin.Jansa@gmail.com>

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-21 18:04 [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Khem Raj
                   ` (5 preceding siblings ...)
  2010-07-22  8:27 ` Richard Purdie
@ 2010-07-22 14:54 ` Koen Kooi
  2010-07-23  7:25 ` Koen Kooi
  7 siblings, 0 replies; 35+ messages in thread
From: Koen Kooi @ 2010-07-22 14:54 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 21-07-10 20:04, Khem Raj wrote:
> Hi
> 
> The following 4 patches are based on  Jushua's work in poky to get rid of
> cross dir and install the toolchain in  native sysroot.
> 
> I have done native-sdk-builds for uclibc and eglibc. It could build the images
> and the images booted fine in qemu on mips and arm.
> 
> I would  appreciate if someone could lend a hand in testing these patches
> 
> And as we have changed tmpdir layout with this patch I have also bumped ABI
> which means tmp has to be nuked before you try these patches.
> 
> Please review/ack/nack

A quick test didn't show big problems (or little ones), so:

Acked-by: Koen Kooi <koen@openembedded.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFMSFuiMkyGM64RGpERAglXAJ9yESk18e5PmHNlo5QgxlZp2fzBQQCfYuZq
LC5ebMKzuLJeJAmqES18Pt8=
=U2q8
-----END PGP SIGNATURE-----




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-21 18:04 [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Khem Raj
                   ` (6 preceding siblings ...)
  2010-07-22 14:54 ` Koen Kooi
@ 2010-07-23  7:25 ` Koen Kooi
  2010-07-23  8:02   ` Phil Blundell
  2010-07-23  8:18   ` Martin Jansa
  7 siblings, 2 replies; 35+ messages in thread
From: Koen Kooi @ 2010-07-23  7:25 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 21-07-10 20:04, Khem Raj wrote:
> Hi
> 
> The following 4 patches are based on  Jushua's work in poky to get rid of
> cross dir and install the toolchain in  native sysroot.
> 
> I have done native-sdk-builds for uclibc and eglibc. It could build the images
> and the images booted fine in qemu on mips and arm.
> 
> I would  appreciate if someone could lend a hand in testing these patches
> 
> And as we have changed tmpdir layout with this patch I have also bumped ABI
> which means tmp has to be nuked before you try these patches.
> 
> Please review/ack/nack

There is a BIG problem with these patches, they break multimachine builds.

The previous situation had:

cross/armv7a-angstrom-foo/usr/bin/
cross/armv5te-angstrom-foo/usr/bin/
etc

The new situation has:

x86_64-linux/usr/bin

So all the toolchains get dropped into the *same* directory, which
breaks horribly.

I see 2 courses of action to fix this quickly:

1) add ${TARGET_SYS} back, bump ABI
2) revert these patches, bump ABI

So, what do other people think?

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFMSUP9MkyGM64RGpERAkkbAKCbMy47668egFF707rfNYNsiKSSKQCcDpbn
53k+LcpMKzu2x8uwQUbqrl0=
=Hy7k
-----END PGP SIGNATURE-----




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23  7:25 ` Koen Kooi
@ 2010-07-23  8:02   ` Phil Blundell
  2010-07-23  8:11     ` Koen Kooi
  2010-07-23  8:18   ` Martin Jansa
  1 sibling, 1 reply; 35+ messages in thread
From: Phil Blundell @ 2010-07-23  8:02 UTC (permalink / raw)
  To: openembedded-devel

On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
> There is a BIG problem with these patches, they break multimachine builds.
> 
> The previous situation had:
> 
> cross/armv7a-angstrom-foo/usr/bin/
> cross/armv5te-angstrom-foo/usr/bin/
> etc
> 
> The new situation has:
> 
> x86_64-linux/usr/bin
> 
> So all the toolchains get dropped into the *same* directory, which
> breaks horribly.

Which are the actual binaries that collide?  I would have thought that
everything which gets installed into the cross bindir ought to be
prefixed with TARGET_SYS (i.e. usr/bin/armv7a-angstrom-linux-gcc, etc).

p.





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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23  8:02   ` Phil Blundell
@ 2010-07-23  8:11     ` Koen Kooi
  2010-07-23  8:59       ` Richard Purdie
  0 siblings, 1 reply; 35+ messages in thread
From: Koen Kooi @ 2010-07-23  8:11 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 23-07-10 10:02, Phil Blundell wrote:
> On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
>> There is a BIG problem with these patches, they break multimachine builds.
>>
>> The previous situation had:
>>
>> cross/armv7a-angstrom-foo/usr/bin/
>> cross/armv5te-angstrom-foo/usr/bin/
>> etc
>>
>> The new situation has:
>>
>> x86_64-linux/usr/bin
>>
>> So all the toolchains get dropped into the *same* directory, which
>> breaks horribly.
> 
> Which are the actual binaries that collide?  I would have thought that
> everything which gets installed into the cross bindir ought to be
> prefixed with TARGET_SYS (i.e. usr/bin/armv7a-angstrom-linux-gcc, etc).

It's all 'arm-angstrom-foo', I was just about to make the suggestion to
change it to 'armv7a-angstrom-foo' :)

I don't know if that solves the binutils-cross problem[1], though.

regards,

Koen

[1] http://thread.gmane.org/gmane.comp.handhelds.openembedded/34685
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFMSU6mMkyGM64RGpERAt9ZAJ4i7784CSoa8MtBrAR0obTqY/M1AwCeLgCf
fVax6pw0ubR9Iq8HKw08CUM=
=TQ8M
-----END PGP SIGNATURE-----




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23  7:25 ` Koen Kooi
  2010-07-23  8:02   ` Phil Blundell
@ 2010-07-23  8:18   ` Martin Jansa
  1 sibling, 0 replies; 35+ messages in thread
From: Martin Jansa @ 2010-07-23  8:18 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 23, 2010 at 09:25:49AM +0200, Koen Kooi wrote:
> There is a BIG problem with these patches, they break multimachine builds.

Yes, I see it now too after launching another machine with different arm
version (armv4/armv7) in my SHR builddir (om-gta0[12] were fine because
both using armv4).

ie binutils-cross versions are overwritten in
sysroots/x86_64-linux/usr/arm-oe-linux-gnueabi/bin/
and last build wins.

> I see 2 courses of action to fix this quickly:
> 
> 1) add ${TARGET_SYS} back, bump ABI
> 2) revert these patches, bump ABI

Someone know how it's solved in poky? I'm reading git log there and
don't see TARGET_SYS used for every cross lib/bin, so maybe they don't
allow multimachine (multiarch) builds?

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23  8:11     ` Koen Kooi
@ 2010-07-23  8:59       ` Richard Purdie
  2010-07-23  9:18         ` Frans Meulenbroeks
                           ` (3 more replies)
  0 siblings, 4 replies; 35+ messages in thread
From: Richard Purdie @ 2010-07-23  8:59 UTC (permalink / raw)
  To: openembedded-devel

On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 23-07-10 10:02, Phil Blundell wrote:
> > On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
> >> There is a BIG problem with these patches, they break multimachine builds.
> >>
> >> The previous situation had:
> >>
> >> cross/armv7a-angstrom-foo/usr/bin/
> >> cross/armv5te-angstrom-foo/usr/bin/
> >> etc
> >>
> >> The new situation has:
> >>
> >> x86_64-linux/usr/bin
> >>
> >> So all the toolchains get dropped into the *same* directory, which
> >> breaks horribly.
> > 
> > Which are the actual binaries that collide?  I would have thought that
> > everything which gets installed into the cross bindir ought to be
> > prefixed with TARGET_SYS (i.e. usr/bin/armv7a-angstrom-linux-gcc, etc).
> 
> It's all 'arm-angstrom-foo', I was just about to make the suggestion to
> change it to 'armv7a-angstrom-foo' :)

I've just been talking to Koen about this. When building for armv7a,
TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".

I suspect if we change TARGET_ARCH to be armv7a, nasty things will
happen but I could be wrong.

If that doesn't help which I suspect it won't, my gut instinct is to add
a architecture specific directory under bin for the cross bits. This
could be as simple as changing bindir in cross.bbclass.

> I don't know if that solves the binutils-cross problem[1], though.
>
> Koen
> 
> [1] http://thread.gmane.org/gmane.comp.handhelds.openembedded/34685

Is that libiberty.a file actually useful or could we just stop
binutils-cross installing it?

Cheers,

Richard





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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-23  8:59       ` Richard Purdie
@ 2010-07-23  9:18         ` Frans Meulenbroeks
  2010-07-23 17:20           ` Khem Raj
  2010-07-23 20:44           ` Khem Raj
  2010-07-23  9:35         ` Esben Haabendal
                           ` (2 subsequent siblings)
  3 siblings, 2 replies; 35+ messages in thread
From: Frans Meulenbroeks @ 2010-07-23  9:18 UTC (permalink / raw)
  To: openembedded-devel

2010/7/23 Richard Purdie <rpurdie@rpsys.net>

> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On 23-07-10 10:02, Phil Blundell wrote:
> > > On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
> > >> There is a BIG problem with these patches, they break multimachine
> builds.
> > >>
> > >> The previous situation had:
> > >>
> > >> cross/armv7a-angstrom-foo/usr/bin/
> > >> cross/armv5te-angstrom-foo/usr/bin/
> > >> etc
> > >>
> > >> The new situation has:
> > >>
> > >> x86_64-linux/usr/bin
> > >>
> > >> So all the toolchains get dropped into the *same* directory, which
> > >> breaks horribly.
> > >
> > > Which are the actual binaries that collide?  I would have thought that
> > > everything which gets installed into the cross bindir ought to be
> > > prefixed with TARGET_SYS (i.e. usr/bin/armv7a-angstrom-linux-gcc, etc).
> >
> > It's all 'arm-angstrom-foo', I was just about to make the suggestion to
> > change it to 'armv7a-angstrom-foo' :)
>
> I've just been talking to Koen about this. When building for armv7a,
> TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".
>
> I suspect if we change TARGET_ARCH to be armv7a, nasty things will
> happen but I could be wrong.
>

I've been pondering if TARGET_ARCH should be the real arch (like armv7a) and
whether adjacent to that there should be a TARGET_ARCH_FAMILY or so.

Changing TARGET_ARCH to armv7a without other changes definitely is going to
break things.
There are 110 .bb files that reference TARGET_ARCH

the last two lines of the grep read:
xqt2/xqt2_20060509.bb:    if [ ${TARGET_ARCH} == "arm" ]; then
xqt/xqt_0.0.9.bb:    if [ ${TARGET_ARCH} == "arm" ]; then
so these are definitely not going to fly

for some other of the 110 recipes the change is harmless (e.g. because they
compare to "mips" in gcc-common.inc)
for most others I cannot judge this, e.g. because the value is passed to
configure.

unrelated side note:
while grepping I noticed the existence of dirs like linux-uml and linux-atm.
These contain kernel recipes.
Shouldn't these be in linux recipes dir? (or alternately shouldn't there be
also things like linux-omap and linux-nios2).

frans


> If that doesn't help which I suspect it won't, my gut instinct is to add
> a architecture specific directory under bin for the cross bits. This
> could be as simple as changing bindir in cross.bbclass.
>
> > I don't know if that solves the binutils-cross problem[1], though.
> >
> > Koen
> >
> > [1] http://thread.gmane.org/gmane.comp.handhelds.openembedded/34685
>
> Is that libiberty.a file actually useful or could we just stop
> binutils-cross installing it?
>
> Cheers,
>
> Richard
>
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>


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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-23  8:59       ` Richard Purdie
  2010-07-23  9:18         ` Frans Meulenbroeks
@ 2010-07-23  9:35         ` Esben Haabendal
  2010-07-23 10:08           ` Koen Kooi
  2010-07-23 10:23           ` Phil Blundell
  2010-07-23 10:17         ` Phil Blundell
  2010-07-23 17:14         ` Khem Raj
  3 siblings, 2 replies; 35+ messages in thread
From: Esben Haabendal @ 2010-07-23  9:35 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 23, 2010 at 10:59 AM, Richard Purdie <rpurdie@rpsys.net> wrote:
> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
>> It's all 'arm-angstrom-foo', I was just about to make the suggestion to
>> change it to 'armv7a-angstrom-foo' :)
>
> I've just been talking to Koen about this. When building for armv7a,
> TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".
>
> I suspect if we change TARGET_ARCH to be armv7a, nasty things will
> happen but I could be wrong.

config.sub will generally not accept something like armv7a-*

If OE had not offered the vendor part of the arch strings to distros,
it could have
been solved by (in this case) using arm-v7a-foo ...

/Esben



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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23  9:35         ` Esben Haabendal
@ 2010-07-23 10:08           ` Koen Kooi
  2010-07-23 10:23           ` Phil Blundell
  1 sibling, 0 replies; 35+ messages in thread
From: Koen Kooi @ 2010-07-23 10:08 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 23-07-10 11:35, Esben Haabendal wrote:
> On Fri, Jul 23, 2010 at 10:59 AM, Richard Purdie <rpurdie@rpsys.net> wrote:
>> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
>>> It's all 'arm-angstrom-foo', I was just about to make the suggestion to
>>> change it to 'armv7a-angstrom-foo' :)
>>
>> I've just been talking to Koen about this. When building for armv7a,
>> TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".
>>
>> I suspect if we change TARGET_ARCH to be armv7a, nasty things will
>> happen but I could be wrong.
> 
> config.sub will generally not accept something like armv7a-*
> 
> If OE had not offered the vendor part of the arch strings to distros,
> it could have
> been solved by (in this case) using arm-v7a-foo ...

Actually not, since that would break external toolchains.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFMSWovMkyGM64RGpERAg1CAKC5vOFH/cNptjp5FMAz0eDpvp2YtACfaU5V
cHrMjEFU8rRlDZhNXw5NTns=
=JjxT
-----END PGP SIGNATURE-----




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23  8:59       ` Richard Purdie
  2010-07-23  9:18         ` Frans Meulenbroeks
  2010-07-23  9:35         ` Esben Haabendal
@ 2010-07-23 10:17         ` Phil Blundell
  2010-07-23 10:56           ` Richard Purdie
  2010-07-23 17:14         ` Khem Raj
  3 siblings, 1 reply; 35+ messages in thread
From: Phil Blundell @ 2010-07-23 10:17 UTC (permalink / raw)
  To: openembedded-devel

On Fri, 2010-07-23 at 09:59 +0100, Richard Purdie wrote:
> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
> > It's all 'arm-angstrom-foo', I was just about to make the suggestion to
> > change it to 'armv7a-angstrom-foo' :)
> 
> I've just been talking to Koen about this. When building for armv7a,
> TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".

Ah, right, I see. 

> I suspect if we change TARGET_ARCH to be armv7a, nasty things will
> happen but I could be wrong.

I can't think offhand of any bad thing that would result from doing
that.  It certainly might be worth a try. 

On the other hand, I also can't think offhand of any significant way in
which the gcc builds for different subarches are going to be different.
The architecture selection is all done at run time using -march in
CFLAGS, isn't it?

> Is that libiberty.a file actually useful or could we just stop
> binutils-cross installing it?

No, it isn't useful.

p.




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23  9:35         ` Esben Haabendal
  2010-07-23 10:08           ` Koen Kooi
@ 2010-07-23 10:23           ` Phil Blundell
  2010-07-23 11:24             ` Richard Purdie
  1 sibling, 1 reply; 35+ messages in thread
From: Phil Blundell @ 2010-07-23 10:23 UTC (permalink / raw)
  To: openembedded-devel

On Fri, 2010-07-23 at 11:35 +0200, Esben Haabendal wrote:
> config.sub will generally not accept something like armv7a-*

That's probably true, but it ought to accept armv7a-*-* (and has done
for about fifteen years, so I expect almost all packages should now have
picked up that change).  I think OE always uses the triple so there
oughtn't to be any problem in practice.

> If OE had not offered the vendor part of the arch strings to distros,
> it could have
> been solved by (in this case) using arm-v7a-foo ...

That doesn't sound very wholesome.  I don't think 'v7a' is really a
vendor name by any stretch of the imagination.

p.





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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23 10:17         ` Phil Blundell
@ 2010-07-23 10:56           ` Richard Purdie
  2010-07-23 17:28             ` Richard Purdie
  0 siblings, 1 reply; 35+ messages in thread
From: Richard Purdie @ 2010-07-23 10:56 UTC (permalink / raw)
  To: openembedded-devel

On Fri, 2010-07-23 at 11:17 +0100, Phil Blundell wrote:
> On Fri, 2010-07-23 at 09:59 +0100, Richard Purdie wrote:
> > On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
> > > It's all 'arm-angstrom-foo', I was just about to make the suggestion to
> > > change it to 'armv7a-angstrom-foo' :)
> > 
> > I've just been talking to Koen about this. When building for armv7a,
> > TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".
> 
> Ah, right, I see. 
> 
> > I suspect if we change TARGET_ARCH to be armv7a, nasty things will
> > happen but I could be wrong.
> 
> I can't think offhand of any bad thing that would result from doing
> that.  It certainly might be worth a try. 

config.sub was in my mind as Esben mentioned. Our siteinfo code will
also probably get upset. Then there are the TARGET_SYS comparisons. 

> On the other hand, I also can't think offhand of any significant way in
> which the gcc builds for different subarches are going to be different.
> The architecture selection is all done at run time using -march in
> CFLAGS, isn't it?

Well, the libgcc and stdc++ generated are different so we can't use one
build. I have so far failed to make gcc generate libgcc standalone as it
makes some horrible build assumptions. Even generating libstdc++
standalone was fun in Poky but I have that working at least.

The reason things break is we code the default sysroot option into gcc.
So if you start using the wrong one, you pull in the wrong kind of
binaries and depending on your build order at best it results in
unoptimised code and worst, the binaries won't run.

So in summary it'd be nice to have a single gcc per arch but we're not
there yet.

> > Is that libiberty.a file actually useful or could we just stop
> > binutils-cross installing it?
> 
> No, it isn't useful.

I'm testing some patches against poky which add an extra directory level
in /usr/bin/. I've also patched binutils-cross to stop spewing excess
bits all over the place. I'll report back how it goes.

Longer term there are probably better fixes but there are too many
issues at present to do that.

Cheers,

Richard




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23 10:23           ` Phil Blundell
@ 2010-07-23 11:24             ` Richard Purdie
  2010-07-23 11:46               ` Esben Haabendal
  2010-07-23 17:12               ` Khem Raj
  0 siblings, 2 replies; 35+ messages in thread
From: Richard Purdie @ 2010-07-23 11:24 UTC (permalink / raw)
  To: openembedded-devel

On Fri, 2010-07-23 at 11:23 +0100, Phil Blundell wrote:
> On Fri, 2010-07-23 at 11:35 +0200, Esben Haabendal wrote:
> > config.sub will generally not accept something like armv7a-*
> 
> That's probably true, but it ought to accept armv7a-*-* (and has done
> for about fifteen years, so I expect almost all packages should now have
> picked up that change).  I think OE always uses the triple so there
> oughtn't to be any problem in practice.

With tune-atom.inc active you'd have core2-*-* which I suspect
config.sub will not accept. The point is the names we choose for sets of
optimisation flags are not necessarily going to map well to config.sub
and we shouldn't be crossing what are currently two independent
namespaces...

Cheers,

Richard




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-23 11:24             ` Richard Purdie
@ 2010-07-23 11:46               ` Esben Haabendal
  2010-07-23 17:12               ` Khem Raj
  1 sibling, 0 replies; 35+ messages in thread
From: Esben Haabendal @ 2010-07-23 11:46 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 23, 2010 at 1:24 PM, Richard Purdie <rpurdie@rpsys.net> wrote:
> On Fri, 2010-07-23 at 11:23 +0100, Phil Blundell wrote:
>> On Fri, 2010-07-23 at 11:35 +0200, Esben Haabendal wrote:
>> > config.sub will generally not accept something like armv7a-*
>>
>> That's probably true, but it ought to accept armv7a-*-* (and has done
>> for about fifteen years, so I expect almost all packages should now have
>> picked up that change).  I think OE always uses the triple so there
>> oughtn't to be any problem in practice.
>
> With tune-atom.inc active you'd have core2-*-* which I suspect
> config.sub will not accept. The point is the names we choose for sets of
> optimisation flags are not necessarily going to map well to config.sub
> and we shouldn't be crossing what are currently two independent
> namespaces...

Definitely not.

The question is why these two namespaces has to be independent.
But nevermind, I am just rambling here.

/Esben



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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-23 11:24             ` Richard Purdie
  2010-07-23 11:46               ` Esben Haabendal
@ 2010-07-23 17:12               ` Khem Raj
  1 sibling, 0 replies; 35+ messages in thread
From: Khem Raj @ 2010-07-23 17:12 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 23, 2010 at 4:24 AM, Richard Purdie <rpurdie@rpsys.net> wrote:
> On Fri, 2010-07-23 at 11:23 +0100, Phil Blundell wrote:
>> On Fri, 2010-07-23 at 11:35 +0200, Esben Haabendal wrote:
>> > config.sub will generally not accept something like armv7a-*
>>
>> That's probably true, but it ought to accept armv7a-*-* (and has done
>> for about fifteen years, so I expect almost all packages should now have
>> picked up that change).  I think OE always uses the triple so there
>> oughtn't to be any problem in practice.
>
> With tune-atom.inc active you'd have core2-*-* which I suspect
> config.sub will not accept. The point is the names we choose for sets of
> optimisation flags are not necessarily going to map well to config.sub
> and we shouldn't be crossing what are currently two independent
> namespaces...


if we want to be able to build per machine then we have to add put the
tools under MACHINE dir in native sysroot
but subfamilies can be differentiated like arm5t, armv5teb, armv7 etc
thats how far compiler/toolchains can
differentiate. There is no problem with two  different architectures
e.g. mips, arm



>
> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-23  8:59       ` Richard Purdie
                           ` (2 preceding siblings ...)
  2010-07-23 10:17         ` Phil Blundell
@ 2010-07-23 17:14         ` Khem Raj
  3 siblings, 0 replies; 35+ messages in thread
From: Khem Raj @ 2010-07-23 17:14 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 23, 2010 at 1:59 AM, Richard Purdie <rpurdie@rpsys.net> wrote:
> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 23-07-10 10:02, Phil Blundell wrote:
>> > On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
>> >> There is a BIG problem with these patches, they break multimachine builds.
>> >>
>> >> The previous situation had:
>> >>
>> >> cross/armv7a-angstrom-foo/usr/bin/
>> >> cross/armv5te-angstrom-foo/usr/bin/
>> >> etc
>> >>
>> >> The new situation has:
>> >>
>> >> x86_64-linux/usr/bin
>> >>
>> >> So all the toolchains get dropped into the *same* directory, which
>> >> breaks horribly.
>> >
>> > Which are the actual binaries that collide?  I would have thought that
>> > everything which gets installed into the cross bindir ought to be
>> > prefixed with TARGET_SYS (i.e. usr/bin/armv7a-angstrom-linux-gcc, etc).
>>
>> It's all 'arm-angstrom-foo', I was just about to make the suggestion to
>> change it to 'armv7a-angstrom-foo' :)
>
> I've just been talking to Koen about this. When building for armv7a,
> TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".
>
> I suspect if we change TARGET_ARCH to be armv7a, nasty things will
> happen but I could be wrong.

I think it will be fine. I think this will be fine approach. If we think this
is the way I can throw in a patch quickly.

>
> If that doesn't help which I suspect it won't, my gut instinct is to add
> a architecture specific directory under bin for the cross bits. This
> could be as simple as changing bindir in cross.bbclass.
>
>> I don't know if that solves the binutils-cross problem[1], though.
>>
>> Koen
>>
>> [1] http://thread.gmane.org/gmane.comp.handhelds.openembedded/34685
>
> Is that libiberty.a file actually useful or could we just stop
> binutils-cross installing it?
>
> Cheers,
>
> Richard
>
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-23  9:18         ` Frans Meulenbroeks
@ 2010-07-23 17:20           ` Khem Raj
  2010-07-23 17:30             ` Chris Larson
  2010-07-23 20:44           ` Khem Raj
  1 sibling, 1 reply; 35+ messages in thread
From: Khem Raj @ 2010-07-23 17:20 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 23, 2010 at 2:18 AM, Frans Meulenbroeks
<fransmeulenbroeks@gmail.com> wrote:
> 2010/7/23 Richard Purdie <rpurdie@rpsys.net>
>
>> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
>> > -----BEGIN PGP SIGNED MESSAGE-----
>> > Hash: SHA1
>> >
>> > On 23-07-10 10:02, Phil Blundell wrote:
>> > > On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
>> > >> There is a BIG problem with these patches, they break multimachine
>> builds.
>> > >>
>> > >> The previous situation had:
>> > >>
>> > >> cross/armv7a-angstrom-foo/usr/bin/
>> > >> cross/armv5te-angstrom-foo/usr/bin/
>> > >> etc
>> > >>
>> > >> The new situation has:
>> > >>
>> > >> x86_64-linux/usr/bin
>> > >>
>> > >> So all the toolchains get dropped into the *same* directory, which
>> > >> breaks horribly.
>> > >
>> > > Which are the actual binaries that collide?  I would have thought that
>> > > everything which gets installed into the cross bindir ought to be
>> > > prefixed with TARGET_SYS (i.e. usr/bin/armv7a-angstrom-linux-gcc, etc).
>> >
>> > It's all 'arm-angstrom-foo', I was just about to make the suggestion to
>> > change it to 'armv7a-angstrom-foo' :)
>>
>> I've just been talking to Koen about this. When building for armv7a,
>> TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".
>>
>> I suspect if we change TARGET_ARCH to be armv7a, nasty things will
>> happen but I could be wrong.
>>
>
> I've been pondering if TARGET_ARCH should be the real arch (like armv7a) and
> whether adjacent to that there should be a TARGET_ARCH_FAMILY or so.
>
> Changing TARGET_ARCH to armv7a without other changes definitely is going to
> break things.


maybe we should not change TARGET_ARCH but use FEED_ARCH to construct TARGET_SYS

> There are 110 .bb files that reference TARGET_ARCH
>
> the last two lines of the grep read:
> xqt2/xqt2_20060509.bb:    if [ ${TARGET_ARCH} == "arm" ]; then
> xqt/xqt_0.0.9.bb:    if [ ${TARGET_ARCH} == "arm" ]; then
> so these are definitely not going to fly
>
> for some other of the 110 recipes the change is harmless (e.g. because they
> compare to "mips" in gcc-common.inc)
> for most others I cannot judge this, e.g. because the value is passed to
> configure.
>
> unrelated side note:
> while grepping I noticed the existence of dirs like linux-uml and linux-atm.
> These contain kernel recipes.
> Shouldn't these be in linux recipes dir? (or alternately shouldn't there be
> also things like linux-omap and linux-nios2).
>
> frans
>
>
>> If that doesn't help which I suspect it won't, my gut instinct is to add
>> a architecture specific directory under bin for the cross bits. This
>> could be as simple as changing bindir in cross.bbclass.
>>
>> > I don't know if that solves the binutils-cross problem[1], though.
>> >
>> > Koen
>> >
>> > [1] http://thread.gmane.org/gmane.comp.handhelds.openembedded/34685
>>
>> Is that libiberty.a file actually useful or could we just stop
>> binutils-cross installing it?
>>
>> Cheers,
>>
>> Richard
>>
>>
>>
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23 10:56           ` Richard Purdie
@ 2010-07-23 17:28             ` Richard Purdie
  0 siblings, 0 replies; 35+ messages in thread
From: Richard Purdie @ 2010-07-23 17:28 UTC (permalink / raw)
  To: openembedded-devel

On Fri, 2010-07-23 at 11:56 +0100, Richard Purdie wrote:
> I'm testing some patches against poky which add an extra directory level
> in /usr/bin/. I've also patched binutils-cross to stop spewing excess
> bits all over the place. I'll report back how it goes.

I got things fixed in Poky, pending more extensive testing which I
haven't had time for yet. There are several things needed though:


a) Have gcc dump a load of symlinks into its libexec directory:

http://git.pokylinux.org/cgit.cgi/poky/commit/?id=bf8023237c6fe43781fa4ce0db00f2b08cab7817

This is so when it tries to find "as" (not TARGET_PREFIX-as) it will
find the right ones. It means we don't need the duplicates from bintuils
which always end up in a multimachine unsafe path which means we can
then:

b) Kill off bits of binutils that don't make sense

http://git.pokylinux.org/cgit.cgi/poky/commit/?id=066535608e879c0327dfa874f3978d6cc15fa59f

and then 

c) Create some extra path layers which hold the different toolchains. We
have to split out bindir, libdir and libexec dir as they all contain
varying amounts of potentially machine sensitive code (sysroot
settings).

http://git.pokylinux.org/cgit.cgi/poky/commit/?id=66d7b58f224e55b70b80a01d451270b7de757885


Poky has the complication its using gcc-runtime which builds/packages
the target gcc libs separately where it possibly can. I had to tweak
things to account for this with some other patches and also make that
multi arch safe. I think OE should be ok in this regard but something
like:

http://git.pokylinux.org/cgit.cgi/poky/commit/?id=ab82312433f8a7eacd6ee90d3bc9e5153282ec3f

may be required due to the way gcc makes assumptions about paths.

Cheers,

Richard




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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-23 17:20           ` Khem Raj
@ 2010-07-23 17:30             ` Chris Larson
  2010-07-23 17:41               ` Khem Raj
  0 siblings, 1 reply; 35+ messages in thread
From: Chris Larson @ 2010-07-23 17:30 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 23, 2010 at 10:20 AM, Khem Raj <raj.khem@gmail.com> wrote:

> On Fri, Jul 23, 2010 at 2:18 AM, Frans Meulenbroeks
> <fransmeulenbroeks@gmail.com> wrote:
> > 2010/7/23 Richard Purdie <rpurdie@rpsys.net>
> >
> >> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
> >> > -----BEGIN PGP SIGNED MESSAGE-----
> >> > Hash: SHA1
> >> >
> >> > On 23-07-10 10:02, Phil Blundell wrote:
> >> > > On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
> >> > >> There is a BIG problem with these patches, they break multimachine
> >> builds.
> >> > >>
> >> > >> The previous situation had:
> >> > >>
> >> > >> cross/armv7a-angstrom-foo/usr/bin/
> >> > >> cross/armv5te-angstrom-foo/usr/bin/
> >> > >> etc
> >> > >>
> >> > >> The new situation has:
> >> > >>
> >> > >> x86_64-linux/usr/bin
> >> > >>
> >> > >> So all the toolchains get dropped into the *same* directory, which
> >> > >> breaks horribly.
> >> > >
> >> > > Which are the actual binaries that collide?  I would have thought
> that
> >> > > everything which gets installed into the cross bindir ought to be
> >> > > prefixed with TARGET_SYS (i.e. usr/bin/armv7a-angstrom-linux-gcc,
> etc).
> >> >
> >> > It's all 'arm-angstrom-foo', I was just about to make the suggestion
> to
> >> > change it to 'armv7a-angstrom-foo' :)
> >>
> >> I've just been talking to Koen about this. When building for armv7a,
> >> TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".
> >>
> >> I suspect if we change TARGET_ARCH to be armv7a, nasty things will
> >> happen but I could be wrong.
> >>
> >
> > I've been pondering if TARGET_ARCH should be the real arch (like armv7a)
> and
> > whether adjacent to that there should be a TARGET_ARCH_FAMILY or so.
> >
> > Changing TARGET_ARCH to armv7a without other changes definitely is going
> to
> > break things.
>
>
> maybe we should not change TARGET_ARCH but use FEED_ARCH to construct
> TARGET_SYS


Using a variable from packaging / rootfs creation as a field passed to
configure at build time strikes me as a terrible idea.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot
  2010-07-23 17:30             ` Chris Larson
@ 2010-07-23 17:41               ` Khem Raj
  0 siblings, 0 replies; 35+ messages in thread
From: Khem Raj @ 2010-07-23 17:41 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2769 bytes --]

On (23/07/10 10:30), Chris Larson wrote:
> On Fri, Jul 23, 2010 at 10:20 AM, Khem Raj <raj.khem@gmail.com> wrote:
> 
> > On Fri, Jul 23, 2010 at 2:18 AM, Frans Meulenbroeks
> > <fransmeulenbroeks@gmail.com> wrote:
> > > 2010/7/23 Richard Purdie <rpurdie@rpsys.net>
> > >
> > >> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
> > >> > -----BEGIN PGP SIGNED MESSAGE-----
> > >> > Hash: SHA1
> > >> >
> > >> > On 23-07-10 10:02, Phil Blundell wrote:
> > >> > > On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
> > >> > >> There is a BIG problem with these patches, they break multimachine
> > >> builds.
> > >> > >>
> > >> > >> The previous situation had:
> > >> > >>
> > >> > >> cross/armv7a-angstrom-foo/usr/bin/
> > >> > >> cross/armv5te-angstrom-foo/usr/bin/
> > >> > >> etc
> > >> > >>
> > >> > >> The new situation has:
> > >> > >>
> > >> > >> x86_64-linux/usr/bin
> > >> > >>
> > >> > >> So all the toolchains get dropped into the *same* directory, which
> > >> > >> breaks horribly.
> > >> > >
> > >> > > Which are the actual binaries that collide?  I would have thought
> > that
> > >> > > everything which gets installed into the cross bindir ought to be
> > >> > > prefixed with TARGET_SYS (i.e. usr/bin/armv7a-angstrom-linux-gcc,
> > etc).
> > >> >
> > >> > It's all 'arm-angstrom-foo', I was just about to make the suggestion
> > to
> > >> > change it to 'armv7a-angstrom-foo' :)
> > >>
> > >> I've just been talking to Koen about this. When building for armv7a,
> > >> TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".
> > >>
> > >> I suspect if we change TARGET_ARCH to be armv7a, nasty things will
> > >> happen but I could be wrong.
> > >>
> > >
> > > I've been pondering if TARGET_ARCH should be the real arch (like armv7a)
> > and
> > > whether adjacent to that there should be a TARGET_ARCH_FAMILY or so.
> > >
> > > Changing TARGET_ARCH to armv7a without other changes definitely is going
> > to
> > > break things.
> >
> >
> > maybe we should not change TARGET_ARCH but use FEED_ARCH to construct
> > TARGET_SYS
> 
> 
> Using a variable from packaging / rootfs creation as a field passed to
> configure at build time strikes me as a terrible idea.

we have MULTIMACH_* variables in bitbake.conf I have done this patch 
using them. I trying a meta-toolchain build lets see

-Khem

> -- 
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 1224 bytes --]

diff --git a/classes/cross.bbclass b/classes/cross.bbclass
index 75b2abe..cadf245 100644
--- a/classes/cross.bbclass
+++ b/classes/cross.bbclass
@@ -8,7 +8,7 @@ EXCLUDE_FROM_WORLD = "1"
 # In order to keep TARGET_PREFIX decoupled from TARGET_SYS, let's force the
 # binary names to match the former, rather than relying on autoconf's implicit
 # prefixing based on the latter.
-EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
+EXTRA_OECONF_append = " --program-prefix=${MULTIMACH_TARGET_PREFIX}"
 
 # Save PACKAGE_ARCH before changing HOST_ARCH
 OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}"
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 748abba..1564f10 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -135,6 +135,7 @@ PACKAGE_ARCHS = "all any noarch ${TARGET_ARCH} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}
 MULTIMACH_ARCH = "${PACKAGE_ARCH}"
 MULTIMACH_TARGET_SYS = "${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
 MULTIMACH_HOST_SYS = "${MULTIMACH_ARCH}${HOST_VENDOR}-${HOST_OS}"
+MULTIMACH_TARGET_PREFIX = "${MULTIMACH_TARGET_SYS}-"
 BASEPKG_HOST_SYS = "${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
 BASEPKG_TARGET_SYS = "${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
 

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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-23  9:18         ` Frans Meulenbroeks
  2010-07-23 17:20           ` Khem Raj
@ 2010-07-23 20:44           ` Khem Raj
  2010-07-24  2:31             ` Khem Raj
  1 sibling, 1 reply; 35+ messages in thread
From: Khem Raj @ 2010-07-23 20:44 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 23, 2010 at 2:18 AM, Frans Meulenbroeks
<fransmeulenbroeks@gmail.com> wrote:
> 2010/7/23 Richard Purdie <rpurdie@rpsys.net>
>
>> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
>> > -----BEGIN PGP SIGNED MESSAGE-----
>> > Hash: SHA1
>> >
>> > On 23-07-10 10:02, Phil Blundell wrote:
>> > > On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
>> > >> There is a BIG problem with these patches, they break multimachine
>> builds.
>> > >>
>> > >> The previous situation had:
>> > >>
>> > >> cross/armv7a-angstrom-foo/usr/bin/
>> > >> cross/armv5te-angstrom-foo/usr/bin/
>> > >> etc
>> > >>
>> > >> The new situation has:
>> > >>
>> > >> x86_64-linux/usr/bin
>> > >>
>> > >> So all the toolchains get dropped into the *same* directory, which
>> > >> breaks horribly.
>> > >
>> > > Which are the actual binaries that collide?  I would have thought that
>> > > everything which gets installed into the cross bindir ought to be
>> > > prefixed with TARGET_SYS (i.e. usr/bin/armv7a-angstrom-linux-gcc, etc).
>> >
>> > It's all 'arm-angstrom-foo', I was just about to make the suggestion to
>> > change it to 'armv7a-angstrom-foo' :)
>>
>> I've just been talking to Koen about this. When building for armv7a,
>> TARGET_ARCH which goes into TARGET_PREFIX and TARGET_SYS is "arm".
>>
>> I suspect if we change TARGET_ARCH to be armv7a, nasty things will
>> happen but I could be wrong.
>>
>
> I've been pondering if TARGET_ARCH should be the real arch (like armv7a) and
> whether adjacent to that there should be a TARGET_ARCH_FAMILY or so.
>
> Changing TARGET_ARCH to armv7a without other changes definitely is going to
> break things.
> There are 110 .bb files that reference TARGET_ARCH

right. I am using MULTIMACH_ARCH (may be it should be called
TARGET_SUB_ARCH) to construct
all canonical names. Which should leave TARGET_ARCH unaffected at the same time
help us to have multiple toolchains co-exist.
I am trying a build where the HOST_SYS and TARGET_SYS will then use this var.
lets see where I end up.

>
> the last two lines of the grep read:
> xqt2/xqt2_20060509.bb:    if [ ${TARGET_ARCH} == "arm" ]; then
> xqt/xqt_0.0.9.bb:    if [ ${TARGET_ARCH} == "arm" ]; then
> so these are definitely not going to fly
>
> for some other of the 110 recipes the change is harmless (e.g. because they
> compare to "mips" in gcc-common.inc)
> for most others I cannot judge this, e.g. because the value is passed to
> configure.
>
> unrelated side note:
> while grepping I noticed the existence of dirs like linux-uml and linux-atm.
> These contain kernel recipes.
> Shouldn't these be in linux recipes dir? (or alternately shouldn't there be
> also things like linux-omap and linux-nios2).
>
> frans
>
>
>> If that doesn't help which I suspect it won't, my gut instinct is to add
>> a architecture specific directory under bin for the cross bits. This
>> could be as simple as changing bindir in cross.bbclass.
>>
>> > I don't know if that solves the binutils-cross problem[1], though.
>> >
>> > Koen
>> >
>> > [1] http://thread.gmane.org/gmane.comp.handhelds.openembedded/34685
>>
>> Is that libiberty.a file actually useful or could we just stop
>> binutils-cross installing it?
>>
>> Cheers,
>>
>> Richard
>>
>>
>>
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages  into native sysroot
  2010-07-23 20:44           ` Khem Raj
@ 2010-07-24  2:31             ` Khem Raj
  0 siblings, 0 replies; 35+ messages in thread
From: Khem Raj @ 2010-07-24  2:31 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 23, 2010 at 1:44 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Fri, Jul 23, 2010 at 2:18 AM, Frans Meulenbroeks
> <fransmeulenbroeks@gmail.com> wrote:
>> 2010/7/23 Richard Purdie <rpurdie@rpsys.net>
>>
>>> On Fri, 2010-07-23 at 10:11 +0200, Koen Kooi wrote:
>>> > -----BEGIN PGP SIGNED MESSAGE-----
>>> > Hash: SHA1
>>> >
>>> > On 23-07-10 10:02, Phil Blundell wrote:
>>> > > On Fri, 2010-07-23 at 09:25 +0200, Koen Kooi wrote:
>>> > >> There is a BIG problem with these patches, they break multimachine
>>> builds.
>>> > >>
>>> > >> The previous situation had:
>>> > >>
>>> > >> cross/armv7a-angstrom-foo/usr/bin/
>>> > >> cross/armv5te-angstrom-foo/usr/bin/
>>> > >> etc
>>> > >>
>>> > >> The new situation has:
>>> > >>
>>> > >> x86_64-linux/usr/bin
>>> > >>
>>> > >> So all the toolchains get dropped into the *same* directory, which
>>> > >> breaks horribly.

I have a half baked patch to get the above semantics like what poky
did its not working
and its getting uglier. I dont feel good about it.
IMO having a new var like TARGET_SUB_ARCH point to sub-family (armv5te
etc.) and later
use it to form all prefixes etc would be cleaner and easier to
implement and maintain.
the limitation would be that you wont be able to have different
version of toolchain components
for two different machines based on same sub-arch e.g. (qemuarm and
omap5912osk both are based on
armv5te so one has to use same version of toolchain components for
these kind of scenarios in a
multimachine build setup.

Therefore I would propose either we backout these patches for now or
do single machine builds
in meantime we develop the solution.

-Khem



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

end of thread, other threads:[~2010-07-24  2:32 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-21 18:04 [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Khem Raj
2010-07-21 18:04 ` [PATCH 1/4] classes, bitbake.conf: " Khem Raj
2010-07-21 21:52   ` Tom Rini
2010-07-21 18:04 ` [PATCH 2/4] toolchain: Remove references to CROSS_DIR Khem Raj
2010-07-21 21:52   ` Tom Rini
2010-07-21 18:04 ` [PATCH 3/4] recipes: Fix " Khem Raj
2010-07-21 21:53   ` Tom Rini
2010-07-21 18:04 ` [PATCH 4/4] sanity.bbclass, abi_version.conf: Bump the ABI to inform that cross has died Khem Raj
2010-07-21 21:53   ` Tom Rini
2010-07-21 21:52 ` [PATCH 0/4][RFC] Remove CROSS_DIR, install cross-packages into native sysroot Tom Rini
2010-07-22  8:27 ` Richard Purdie
2010-07-22 14:02   ` Chris Larson
2010-07-22 14:24     ` Martin Jansa
2010-07-22 14:54 ` Koen Kooi
2010-07-23  7:25 ` Koen Kooi
2010-07-23  8:02   ` Phil Blundell
2010-07-23  8:11     ` Koen Kooi
2010-07-23  8:59       ` Richard Purdie
2010-07-23  9:18         ` Frans Meulenbroeks
2010-07-23 17:20           ` Khem Raj
2010-07-23 17:30             ` Chris Larson
2010-07-23 17:41               ` Khem Raj
2010-07-23 20:44           ` Khem Raj
2010-07-24  2:31             ` Khem Raj
2010-07-23  9:35         ` Esben Haabendal
2010-07-23 10:08           ` Koen Kooi
2010-07-23 10:23           ` Phil Blundell
2010-07-23 11:24             ` Richard Purdie
2010-07-23 11:46               ` Esben Haabendal
2010-07-23 17:12               ` Khem Raj
2010-07-23 10:17         ` Phil Blundell
2010-07-23 10:56           ` Richard Purdie
2010-07-23 17:28             ` Richard Purdie
2010-07-23 17:14         ` Khem Raj
2010-07-23  8:18   ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.