All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <tom_rini@mentor.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH 1/4] classes, bitbake.conf: Remove CROSS_DIR, install cross-packages into native sysroot
Date: Wed, 21 Jul 2010 14:52:32 -0700	[thread overview]
Message-ID: <4C476C20.4050409@mentor.com> (raw)
In-Reply-To: <1279735486-7050-2-git-send-email-raj.khem@gmail.com>

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



  reply	other threads:[~2010-07-21 21:52 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=4C476C20.4050409@mentor.com \
    --to=tom_rini@mentor.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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.