* [PATCH 0/2][RFC] Machine Specific Sysroot Implementation
@ 2010-12-25 3:15 Dongxiao Xu
2010-12-25 3:15 ` [PATCH 1/2] bitbake: Introduce stamp-extra-info into build stamp file Dongxiao Xu
2010-12-25 3:15 ` [PATCH 2/2] bitbake: machine specific sysroots implementation Dongxiao Xu
0 siblings, 2 replies; 3+ messages in thread
From: Dongxiao Xu @ 2010-12-25 3:15 UTC (permalink / raw)
To: poky
Hi Richard,
This RFC implements the machine specific sysroots, please help to review. Thanks!
Take qemuppc as an example, currently the sysroot directories are something like tmp/sysroots/ppc603e-poky-linux. After implement the machine specific sysroots, the directories will be changed to tmp/sysroots/qemuppc. For native, nativesdk, cross, crosssdk, and cross-canadian, the sysroots directories keep unchanged.
This patchset is tested on qemuppc and mpc6315e-rdb, which are both powerpc architecture. I tested the build for minimal, sato, sdk, and meta-toolchain for both machines.
The patch mainly changes the following parts.
1) STAGING_DIR_TARGET and STRAGING_DIR_HOST.
Change STAGING_DIR_TARGET and STRAGING_DIR_HOST pointing to machine specific sysroots. For native, nativesdk, cross, crosssdk, and cross-canadian, we do not change their STAGING_DIR_TARGET and STRAGING_DIR_HOST.
Besides, PKG_CONFIG_DIR and STAGING_KERNEL_DIR are changd for normal recipes.
2) task stamp files.
If we have already built a machine, and then try to build another machine of the same arch, we need to re-run do_populate_sysroots (handle sysroots population) and do_package (handle shlibs). Previously the stamp file are named with task and PN, along with the architecture path. To re-run the do_populate_sysroots and do_package tasks, differentiate the two task stamp files is needed for different machines. I modified the bitbake and introduce a flag named "stamp-extra-info", which adds a "${MACHINE}" tag into the stamp name. The stamp file code logic change includes the stamp creation in normal build and stamp detection for pre-build.
3) sstate install input and output path.
Previously the sstate install path for do_populate_sysroot are input: ${SYSROOT_DESTDIR}/${STAGING_DIR} and output: ${TMPDIR}/sysroots. After implement the machine specific sysroots, both machine sysroots will be populated into ${SYSROOT_DESTDIR}/${STAGING_DIR}, like ${SYSROOT_DESTDIR}/${STAGING_DIR}/qemuppc and ${SYSROOT_DESTDIR}/${STAGING_DIR}/mpc8315e-rdb, they are two machies of one architecture. Thus when doing sstate install, the path should be one step further in order not to contain other machine files. For normal recipes, the input and output path are changed to ${SYSROOT_DESTDIR}/${STAGING_DIR}/${MACHINE} and ${TMPDIR}/sysroots/${MACHINE}. For cross, crosssdk, native, native sdk, the input and output path are changed to ${SYSROOT_DESTDIR}/${STAGING_DIR}/${BASEPKG_HOST_SYS} and ${TMPDIR}/sysroots/${BASEPKG_HOST_SYS}. For cross-canadian, the input and output path are changed to ${SYSROOT_DESTDIR}/${STAGING_DIR}/${HOST_SYS}-nativesdk and ${TMPDIR}/sysroots/${HOST_SYS}-nativesdk.
4) siteconfig path.
When doing site configuration, we need to separate the site config path for different machines since one machine may adopt the cache file of another machine and thus errors will happen. So we create the directories for site config like: ${WORKDIR}/site_config_${MACHINE}.
5) sstate stamp file.
Since each machine has its own sysroots, some prebuild results could not be shared since sysroots are machine specific. Thus we need to modify the sstate stamps to be machine specific.
6) gcc-cross-intermediate.
Gcc-cross-intermediate will install libgcc_s.so and libgcc_s.so.1 into target sysroots. Because we have changed the sstate input and output path to be machine specific, we need to manually install the special files into target sysroots.
7) toolchain scripts.
Change the environment path to point to machine specific sysroots in toolchain scripts bbclass.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: dxu4/mach_sysroot
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/mach_sysroot
Thanks,
Dongxiao Xu <dongxiao.xu@intel.com>
---
Dongxiao Xu (2):
bitbake: Introduce stamp-extra-info into build stamp file
bitbake: machine specific sysroots implementation
bitbake/lib/bb/build.py | 13 ++++++++++++-
bitbake/lib/bb/cache.py | 5 ++++-
bitbake/lib/bb/runqueue.py | 6 +++---
bitbake/lib/bb/siggen.py | 7 +++++--
meta/classes/cross-canadian.bbclass | 4 +++-
meta/classes/cross.bbclass | 8 ++++++++
meta/classes/native.bbclass | 3 +++
meta/classes/nativesdk.bbclass | 5 +++++
meta/classes/package.bbclass | 1 +
meta/classes/siteconfig.bbclass | 6 +++---
meta/classes/sstate.bbclass | 4 ++--
meta/classes/staging.bbclass | 9 +++++++--
meta/classes/toolchain-scripts.bbclass | 4 ++--
meta/conf/bitbake.conf | 10 +++++-----
.../gcc/gcc-cross-intermediate.inc | 4 ++--
.../gcc/gcc-cross-intermediate_4.5.1.bb | 2 +-
.../gcc/gcc-cross-intermediate_csl-arm-2008q1.bb | 1 +
17 files changed, 67 insertions(+), 25 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] bitbake: Introduce stamp-extra-info into build stamp file
2010-12-25 3:15 [PATCH 0/2][RFC] Machine Specific Sysroot Implementation Dongxiao Xu
@ 2010-12-25 3:15 ` Dongxiao Xu
2010-12-25 3:15 ` [PATCH 2/2] bitbake: machine specific sysroots implementation Dongxiao Xu
1 sibling, 0 replies; 3+ messages in thread
From: Dongxiao Xu @ 2010-12-25 3:15 UTC (permalink / raw)
To: poky
For certain tasks, we need additional information in build stamp file
except the task name and file name. stamp-extra-info is introduced as
an flag adding to the end of stamp file name.
The code logic change contains both the stamp file creation in normal
build, and the stamp file check for prebuilt.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
bitbake/lib/bb/build.py | 13 ++++++++++++-
bitbake/lib/bb/cache.py | 5 ++++-
bitbake/lib/bb/runqueue.py | 6 +++---
bitbake/lib/bb/siggen.py | 7 +++++--
4 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 18a75ed..82788ac 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -375,7 +375,18 @@ def stamp_internal(task, d, file_name):
stamp = extract_stamp(d, file_name)
if not stamp:
return
- stamp = "%s.%s" % (stamp, task)
+
+ if file_name:
+ extra_info = d.stamp_extra_info[task]
+ else:
+ extra_info = bb.data.getVarFlag(task, 'stamp-extra-info', d)
+ extra_info = data.expand(extra_info, d)
+
+ if extra_info:
+ stamp = "%s.%s.%s" % (stamp, task, extra_info)
+ else:
+ stamp = "%s.%s" % (stamp, task)
+
bb.utils.mkdirhier(os.path.dirname(stamp))
# Remove the file and recreate to force timestamp
# change on broken NFS filesystems
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index c6f3794..ef72730 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -51,7 +51,7 @@ class Cache:
self.clean = {}
self.checked = {}
self.depends_cache = {}
- self.data = None
+ self.data = data
self.data_fn = None
self.cacheclean = True
@@ -380,6 +380,8 @@ class Cache:
cacheData.tasks[file_name] = self.getVar('__BBTASKS', file_name, True)
for t in cacheData.tasks[file_name]:
cacheData.basetaskhash[file_name + "." + t] = self.getVar("BB_BASEHASH_task-%s" % t, file_name, True)
+ extra_info = bb.data.getVarFlag(t, 'stamp-extra-info', self.data)
+ cacheData.stamp_extra_info[t] = bb.data.expand(extra_info, self.data)
# build FileName to PackageName lookup table
cacheData.pkg_fn[file_name] = pn
@@ -548,6 +550,7 @@ class CacheData:
self.tasks = {}
self.basetaskhash = {}
self.hashfn = {}
+ self.stamp_extra_info = {}
"""
Indirect Cache variables
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 4f988df..32c0481 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -878,7 +878,7 @@ class RunQueue:
if taskname is None:
taskname = self.rqdata.runq_task[task]
- stampfile = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn], taskname, self.rqdata.runq_hash[task])
+ stampfile = bb.parse.siggen.stampfile(self.rqdata.dataCache, fn, taskname, self.rqdata.runq_hash[task])
# If the stamp is missing its not current
if not os.access(stampfile, os.F_OK):
@@ -899,8 +899,8 @@ class RunQueue:
if iscurrent:
fn2 = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[dep]]
taskname2 = self.rqdata.runq_task[dep]
- stampfile2 = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn2], taskname2, self.rqdata.runq_hash[dep])
- stampfile3 = bb.parse.siggen.stampfile(self.rqdata.dataCache.stamp[fn2], taskname2 + "_setscene", self.rqdata.runq_hash[dep])
+ stampfile2 = bb.parse.siggen.stampfile(self.rqdata.dataCache, fn2, taskname2, self.rqdata.runq_hash[dep])
+ stampfile3 = bb.parse.siggen.stampfile(self.rqdata.dataCache, fn2, taskname2 + "_setscene", self.rqdata.runq_hash[dep])
t2 = get_timestamp(stampfile2)
t3 = get_timestamp(stampfile3)
if t3 and t3 > t2:
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index 48f600a..93ee50a 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -32,8 +32,11 @@ class SignatureGenerator(object):
def finalise(self, fn, d, varient):
return
- def stampfile(self, stampbase, taskname, taskhash):
- return "%s.%s" % (stampbase, taskname)
+ def stampfile(self, data, fn, taskname, taskhash):
+ if taskname in data.stamp_extra_info.keys() and data.stamp_extra_info[taskname]:
+ return "%s.%s.%s" % (data.stamp[fn], taskname, data.stamp_extra_info[taskname])
+ else:
+ return "%s.%s" % (data.stamp[fn], taskname)
class SignatureGeneratorBasic(SignatureGenerator):
"""
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] bitbake: machine specific sysroots implementation
2010-12-25 3:15 [PATCH 0/2][RFC] Machine Specific Sysroot Implementation Dongxiao Xu
2010-12-25 3:15 ` [PATCH 1/2] bitbake: Introduce stamp-extra-info into build stamp file Dongxiao Xu
@ 2010-12-25 3:15 ` Dongxiao Xu
1 sibling, 0 replies; 3+ messages in thread
From: Dongxiao Xu @ 2010-12-25 3:15 UTC (permalink / raw)
To: poky
This commit changes the sysroots path to be machine specific.
Changes includes:
1) STAGING_DIR_TARGET and STRAGING_DIR_HOST points to machine specific
paths.
2) task stamp files. Adding ${MACHINE} info into stamp files for
do_populate_sysroots and do_package tasks.
3) sstate install input and output path. Change sstate install path to
be machine specific in order not to contain other machine files.
4) siteconfig path. Separate the site config path for different machines
to avoid one machine adopting the cache file of another machine.
5) sstate stamp file. Add machine name to sstate stamp file since some
prebuild result could not be shared after sysroots are implemented as
machine spedific.
6) gcc-cross-intermediate. Manually install libgcc_s.so.* into target
file system since sstate install src/dest paths have changed to be
macine specific.
7) toolchain scripts. Change the environment path to point to machine
specific sysroots in toolchain scripts bbclass.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
meta/classes/cross-canadian.bbclass | 4 +++-
meta/classes/cross.bbclass | 8 ++++++++
meta/classes/native.bbclass | 3 +++
meta/classes/nativesdk.bbclass | 5 +++++
meta/classes/package.bbclass | 1 +
meta/classes/siteconfig.bbclass | 6 +++---
meta/classes/sstate.bbclass | 4 ++--
meta/classes/staging.bbclass | 9 +++++++--
meta/classes/toolchain-scripts.bbclass | 4 ++--
meta/conf/bitbake.conf | 10 +++++-----
.../gcc/gcc-cross-intermediate.inc | 4 ++--
.../gcc/gcc-cross-intermediate_4.5.1.bb | 2 +-
.../gcc/gcc-cross-intermediate_csl-arm-2008q1.bb | 1 +
13 files changed, 43 insertions(+), 18 deletions(-)
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 3f3a24d..9c1ec67 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -30,7 +30,9 @@ MULTIMACH_TARGET_SYS = "${MULTIMACH_ARCH}${HOST_VENDOR}-${HOST_OS}"
INHIBIT_DEFAULT_DEPS = "1"
STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
-STAGING_DIR_TARGET = "${STAGING_DIR}/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+
+SSTATE-INPUTDIRS = "${SYSROOT_DESTDIR}/${STAGING_DIR}/${HOST_SYS}-nativesdk"
+SSTATE-OUTPUTDIRS = "${TMPDIR}/sysroots/${HOST_SYS}-nativesdk"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR}/${HOST_ARCH}-nativesdk${HOST_VENDOR}-${HOST_OS}"
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 7c20be0..b273467 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -20,6 +20,14 @@ HOST_OS = "${BUILD_OS}"
HOST_PREFIX = "${BUILD_PREFIX}"
HOST_CC_ARCH = "${BUILD_CC_ARCH}"
+STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
+
+export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
+export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+
+SSTATE-INPUTDIRS = "${SYSROOT_DESTDIR}/${STAGING_DIR}/${BASEPKG_HOST_SYS}"
+SSTATE-OUTPUTDIRS = "${TMPDIR}/sysroots/${BASEPKG_HOST_SYS}"
+
CPPFLAGS = "${BUILD_CPPFLAGS}"
CFLAGS = "${BUILD_CFLAGS}"
CXXFLAGS = "${BUILD_CFLAGS}"
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 3ca9d62..34a937c 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -70,6 +70,9 @@ EXTRA_NATIVE_PKGCONFIG_PATH ?= ""
PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
PKG_CONFIG_SYSROOT_DIR = ""
+SSTATE-INPUTDIRS = "${SYSROOT_DESTDIR}/${STAGING_DIR}/${BASEPKG_HOST_SYS}"
+SSTATE-OUTPUTDIRS = "${TMPDIR}/sysroots/${BASEPKG_HOST_SYS}"
+
ORIG_DEPENDS := "${DEPENDS}"
ORIG_RDEPENDS := "${RDEPENDS}"
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 154bd82..eec4af6 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -19,6 +19,8 @@ python () {
#STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
#STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk"
+STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
+STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
HOST_ARCH = "${SDK_ARCH}"
HOST_VENDOR = "${SDK_VENDOR}"
@@ -51,6 +53,9 @@ FILES_${PN}-dbg += "${prefix}/.debug \
export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
+SSTATE-INPUTDIRS = "${SYSROOT_DESTDIR}/${STAGING_DIR}/${BASEPKG_HOST_SYS}"
+SSTATE-OUTPUTDIRS = "${TMPDIR}/sysroots/${BASEPKG_HOST_SYS}"
+
ORIG_DEPENDS := "${DEPENDS}"
DEPENDS_virtclass-nativesdk ?= "${ORIG_DEPENDS}"
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index d39c694..2f5f599 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1104,6 +1104,7 @@ do_package_write () {
}
do_package_write[noexec] = "1"
do_build[recrdeptask] += "do_package_write"
+do_package[stamp-extra-info] = "${MACHINE}"
addtask package_write before do_build after do_package
EXPORT_FUNCTIONS do_package do_package_write
diff --git a/meta/classes/siteconfig.bbclass b/meta/classes/siteconfig.bbclass
index 37d910e..7340025 100644
--- a/meta/classes/siteconfig.bbclass
+++ b/meta/classes/siteconfig.bbclass
@@ -11,10 +11,10 @@ python siteconfig_do_siteconfig () {
}
siteconfig_do_siteconfig_gencache () {
- mkdir -p ${WORKDIR}/site_config
+ mkdir -p ${WORKDIR}/site_config_${MACHINE}
gen-site-config ${FILE_DIRNAME}/site_config \
- >${WORKDIR}/site_config/configure.ac
- cd ${WORKDIR}/site_config
+ >${WORKDIR}/site_config_${MACHINE}/configure.ac
+ cd ${WORKDIR}/site_config_${MACHINE}
autoconf
CONFIG_SITE="" ./configure ${CONFIGUREOPTS} --cache-file ${PN}_cache
sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0ba130c..5899f32 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -5,7 +5,7 @@ SSTATE_MANFILEBASE = "${SSTATE_MANIFESTS}/manifest-${SSTATE_PKGARCH}-"
SSTATE_MANFILEPREFIX = "${SSTATE_MANFILEBASE}${PN}"
-SSTATE_PKGARCH = "${BASE_PACKAGE_ARCH}"
+SSTATE_PKGARCH = "${BASE_PACKAGE_ARCH}_${MACHINE}"
SSTATE_PKGSPEC = "sstate-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}-${PV}-${PR}-${SSTATE_PKGARCH}-${SSTATE_VERSION}-"
SSTATE_PKGNAME = "${SSTATE_PKGSPEC}${BB_TASKHASH}"
SSTATE_PKG = "${SSTATE_DIR}/${SSTATE_PKGNAME}"
@@ -18,7 +18,7 @@ python () {
if bb.data.inherits_class('native', d):
bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d)
elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d):
- bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}", d), d)
+ bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}_${MACHINE}", d), d)
elif bb.data.inherits_class('nativesdk', d):
bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}", d), d)
elif bb.data.inherits_class('cross-canadian', d):
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 8432565..28097b9 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -76,6 +76,7 @@ do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGE
${STAGING_INCDIR_NATIVE} \
${STAGING_DATADIR} \
${SYSROOT_DESTDIR}${STAGING_DIR_TARGET} \
+ ${SYSROOT_DESTDIR}${STAGING_DIR_HOST} \
${S} ${B}"
# Could be compile but populate_sysroot and do_install shouldn't run at the same time
@@ -101,10 +102,14 @@ python do_populate_sysroot () {
bb.build.exec_func(f, d)
}
+SSTATE-INPUTDIRS = "${SYSROOT_DESTDIR}/${STAGING_DIR}/${MACHINE}"
+SSTATE-OUTPUTDIRS = "${TMPDIR}/sysroots/${MACHINE}"
+
SSTATETASKS += "do_populate_sysroot"
do_populate_sysroot[sstate-name] = "populate-sysroot"
-do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR}"
-do_populate_sysroot[sstate-outputdirs] = "${TMPDIR}/sysroots"
+do_populate_sysroot[sstate-inputdirs] = "${SSTATE-INPUTDIRS}"
+do_populate_sysroot[sstate-outputdirs] = "${SSTATE-OUTPUTDIRS}"
+do_populate_sysroot[stamp-extra-info] = "${MACHINE}"
python do_populate_sysroot_setscene () {
sstate_setscene(d)
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index a5b2bd1..462f3d8 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -49,8 +49,8 @@ toolchain_create_tree_env_script () {
echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${BUILD_SYS}"' >> $script
if [ "${TARGET_OS}" = "darwin8" ]; then
- echo 'export TARGET_CFLAGS="-I${STAGING_DIR}${TARGET_SYS}${includedir}"' >> $script
- echo 'export TARGET_LDFLAGS="-L${STAGING_DIR}${TARGET_SYS}${libdir}"' >> $script
+ echo 'export TARGET_CFLAGS="-I${STAGING_DIR}${MACHINE}${includedir}"' >> $script
+ echo 'export TARGET_LDFLAGS="-L${STAGING_DIR}${MACHINE}${libdir}"' >> $script
# Workaround darwin toolchain sysroot path problems
cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
ln -s /usr/local local
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index c26beea..b765142 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -276,7 +276,7 @@ STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${datadir_native}"
# This should really be MULTIMACH_HOST_SYS but that breaks "all" and machine
# specific packages - hack around it for now.
-STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
+STAGING_DIR_HOST = "${STAGING_DIR}/${MACHINE}"
STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
STAGING_LIBDIR = "${STAGING_DIR_HOST}${libdir}"
STAGING_INCDIR = "${STAGING_DIR_HOST}${includedir}"
@@ -288,7 +288,7 @@ STAGING_PYDIR = "${STAGING_DIR}/lib/python2.4"
# This should really be MULTIMACH_TARGET_SYS but that breaks "all" and machine
# specific packages - hack around it for now.
-STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
+STAGING_DIR_TARGET = "${STAGING_DIR}/${MACHINE}"
# Setting DEPLOY_DIR outside of TMPDIR is helpful, when you are using
# packaged staging and/or multimachine.
@@ -311,7 +311,7 @@ SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
##################################################################
OLDEST_KERNEL = "2.4.0"
-STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/kernel"
+STAGING_KERNEL_DIR = "${STAGING_DIR}/${MACHINE}/kernel"
##################################################################
# Specific image creation and rootfs population info.
@@ -595,10 +595,10 @@ SLOT = "0"
# Other
-export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
+export PKG_CONFIG_DIR = "${STAGING_DIR}/${MACHINE}/${libdir}/pkgconfig"
export PKG_CONFIG_PATH = "${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig"
export PKG_CONFIG_LIBDIR = "${PKG_CONFIG_DIR}"
-export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${MACHINE}"
export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
export QMAKE_MKSPEC_PATH = "${STAGING_DATADIR_NATIVE}/qmake"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
index 72a4241..ed5efee 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
@@ -23,6 +23,6 @@ do_compile () {
do_install () {
oe_runmake 'DESTDIR=${D}' install
- install -d ${D}${target_base_libdir}/
- mv ${D}${exec_prefix}/${TARGET_SYS}/lib/* ${D}${target_base_libdir}/
+ install -d ${STAGING_DIR_TARGET}/${target_base_libdir}/
+ cp -rf ${D}${exec_prefix}/${TARGET_SYS}/lib/* ${STAGING_DIR_TARGET}/${target_base_libdir}/
}
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.1.bb b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.1.bb
index 4cabe0e..7aaa5b0 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.1.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.5.1.bb
@@ -1,4 +1,4 @@
require gcc-cross_${PV}.bb
require gcc-cross-intermediate.inc
-PR = "r0"
+PR = "r1"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb b/meta/recipes-devtools/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb
index 8a8f21a..d6ef43f 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb
@@ -8,3 +8,4 @@ do_install_append() {
ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${STAGING_DIR_NATIVE}${prefix_native}/lib/gcc/${TARGET_SYS}/${BINV}/include/
}
+PR = "r1"
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-25 3:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-25 3:15 [PATCH 0/2][RFC] Machine Specific Sysroot Implementation Dongxiao Xu
2010-12-25 3:15 ` [PATCH 1/2] bitbake: Introduce stamp-extra-info into build stamp file Dongxiao Xu
2010-12-25 3:15 ` [PATCH 2/2] bitbake: machine specific sysroots implementation Dongxiao Xu
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.