* [PATCH 1/1] cross-canadian: pkg name includes target arch
2010-12-01 3:31 [PATCH 0/1] Bug #528 fixing Lianhao Lu
@ 2010-12-01 2:13 ` Lianhao Lu
2010-12-10 16:25 ` [PATCH 0/1] Bug #528 fixing Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Lianhao Lu @ 2010-12-01 2:13 UTC (permalink / raw)
To: yocto
This commit fixes Bug #528.
1. Added the target arch name to the pkg name of gcc-cross-canadian,
gdb-cross-candian and bintuils-cross-candian.
2. Move the cross-canadian pkgs out of task-sdk-host into a new task
task-cross-canadian.
3. Added the RDEPENDS of task-cross-canadian into meta-toolchain.
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
meta/recipes-core/meta/meta-toolchain.bb | 2 +-
meta/recipes-core/tasks/task-cross-canadian.bb | 15 +++++++++++++++
meta/recipes-core/tasks/task-sdk-host.bb | 5 +----
.../binutils/binutils-cross-canadian.inc | 6 ++++++
.../binutils/binutils-cross-canadian_2.20.1.bb | 2 +-
meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 4 ++++
.../gcc/gcc-cross-canadian_4.3.3.bb | 2 +-
.../gcc/gcc-cross-canadian_4.5.1.bb | 2 +-
meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 7 +++++++
.../recipes-devtools/gdb/gdb-cross-canadian_7.2.bb | 7 ++-----
10 files changed, 39 insertions(+), 13 deletions(-)
create mode 100644 meta/recipes-core/tasks/task-cross-canadian.bb
create mode 100644 meta/recipes-devtools/gdb/gdb-cross-canadian.inc
diff --git a/meta/recipes-core/meta/meta-toolchain.bb b/meta/recipes-core/meta/meta-toolchain.bb
index 2fab8f9..8b62fab 100644
--- a/meta/recipes-core/meta/meta-toolchain.bb
+++ b/meta/recipes-core/meta/meta-toolchain.bb
@@ -13,7 +13,7 @@ SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
IPKG_HOST = "opkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}"
IPKG_TARGET = "opkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
-TOOLCHAIN_HOST_TASK ?= "task-sdk-host"
+TOOLCHAIN_HOST_TASK ?= "task-sdk-host task-cross-canadian"
TOOLCHAIN_TARGET_TASK ?= "task-poky-standalone-sdk-target task-poky-standalone-sdk-target-dbg"
TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${DISTRO_VERSION}"
diff --git a/meta/recipes-core/tasks/task-cross-canadian.bb b/meta/recipes-core/tasks/task-cross-canadian.bb
new file mode 100644
index 0000000..6a7cd2e
--- /dev/null
+++ b/meta/recipes-core/tasks/task-cross-canadian.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "Host SDK package for cross canadian toolchain"
+PR = "r0"
+LICENSE = "MIT"
+ALLOW_EMPTY = "1"
+
+inherit cross-canadian
+
+PACKAGES = "${PN}"
+
+RDEPENDS_${PN} = "\
+ binutils-cross-canadian-${TARGET_ARCH} \
+ gdb-cross-canadian-${TARGET_ARCH} \
+ gcc-cross-canadian-${TARGET_ARCH} \
+ "
+
diff --git a/meta/recipes-core/tasks/task-sdk-host.bb b/meta/recipes-core/tasks/task-sdk-host.bb
index bccf48d..7bf4453 100644
--- a/meta/recipes-core/tasks/task-sdk-host.bb
+++ b/meta/recipes-core/tasks/task-sdk-host.bb
@@ -3,7 +3,7 @@
#
DESCRIPTION = "Host packages for the standalone SDK or external toolchain"
-PR = "r8"
+PR = "r9"
LICENSE = "MIT"
ALLOW_EMPTY = "1"
@@ -12,9 +12,6 @@ inherit nativesdk
PACKAGES = "${PN}"
RDEPENDS_${PN} = "\
- binutils-cross-canadian \
- gdb-cross-canadian \
- gcc-cross-canadian \
pkgconfig-nativesdk \
qemu-nativesdk \
qemu-helper-nativesdk \
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
index 4953bc2..68a8e5a 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -1,4 +1,10 @@
inherit cross-canadian
+
+
+DESCRIPTION = "A GNU collection of cross-canadian binary utilities for ${TARGET_ARCH} target"
+PN = "binutils-cross-canadian-${TARGET_ARCH}"
+BPN = "binutils"
+
DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk gettext-nativesdk"
EXTRA_OECONF = "--with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
--program-prefix=${TARGET_PREFIX}"
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb
index 631be4f..1621b77 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian_2.20.1.bb
@@ -1,3 +1,3 @@
require binutils_${PV}.bb
require binutils-cross-canadian.inc
-PR = "r5"
+PR = "r6"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index a3b15c3..0d39900 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -1,4 +1,8 @@
inherit cross-canadian
+DESCRIPTION = "The cross-canadian GNU cc and gcc C compilers for ${TARGET_ARCH} target."
+PN = "gcc-cross-canadian-${TARGET_ARCH}"
+BPN = "gcc"
+
DEPENDS = "virtual/${HOST_PREFIX}binutils-crosssdk virtual/${TARGET_PREFIX}libc-for-gcc gettext-nativesdk"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb
index 43bab39..d420f80 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.3.3.bb
@@ -5,7 +5,7 @@ require gcc-cross-canadian.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc
-PR = "r19"
+PR = "r20"
DEPENDS += "gmp-nativesdk mpfr-nativesdk"
RDEPENDS_${PN} += "mpfr-nativesdk"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.1.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.1.bb
index e160aab..98e239d 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.1.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_4.5.1.bb
@@ -5,7 +5,7 @@ require gcc-cross-canadian.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc
-PR = "r0"
+PR = "r1"
DEPENDS += "gmp-nativesdk mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
RDEPENDS_${PN} += "mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
new file mode 100644
index 0000000..8fe5ad8
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -0,0 +1,7 @@
+inherit cross-canadian
+
+DESCRIPTION = "cross-canadian gdb for ${TARGET_ARCH} target - GNU debugger"
+PN = "gdb-cross-canadian-${TARGET_ARCH}"
+BPN = "gdb"
+
+DEPENDS = "ncurses-nativesdk expat-nativesdk gettext-nativesdk"
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.2.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.2.bb
index 5982c05..ca44b3c 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.2.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.2.bb
@@ -1,10 +1,7 @@
require gdb-common.inc
+require gdb-cross-canadian.inc
-DEPENDS = "ncurses-nativesdk expat-nativesdk gettext-nativesdk"
-
-inherit cross-canadian
-
-PR = "r0"
+PR = "r1"
GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
EXPAT = "--with-expat"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 0/1] Bug #528 fixing
2010-12-01 3:31 [PATCH 0/1] Bug #528 fixing Lianhao Lu
2010-12-01 2:13 ` [PATCH 1/1] cross-canadian: pkg name includes target arch Lianhao Lu
@ 2010-12-10 16:25 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2010-12-10 16:25 UTC (permalink / raw)
To: Lianhao Lu; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
Hi Lianhao,
On Wed, 2010-12-01 at 11:31 +0800, Lianhao Lu wrote:
> Since this my very first time trying to contribute to distro, so let me
> put some fixing details here and warmly welcome the reivew/comment.
>
> The purpose of this fixing is to add target name in the package name of
> gcc(gdb/binutils)-cross-canadian so multiple cross-canadian toolchains
> can be installed into the same SDK sysroot.
>
> We choose the PN instead of the PACKAGE(or PKG_pn) to change the package
> name because the -locale package is named by the PN. By changing PN, we
> have different -locale and -doc packages for different target.
>
> Pull URL: git://git.pokylinux.org/poky-contrib.git
> Branch: llu/fix
> Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/fix
These patches are just what we need, thanks.
We do however need to go one step further and complete the change which
is to remove the idea of "cross-canadian" packages from the packaging
backend and make all these "nativesdk", now there is no naming conflict.
I've attached a patch which starts to do this, I'm running some builds
to test this out a bit but the builds are not completing at the
moment :(.
Also note that I had to make the task-cross-canadian contain the
TARGET_ARCH in the PN which meant moving the TRANSLATED_TARGET_ARCH into
the more global namespace which I'm not too keen on.
Cheers,
Richard
(For reference, patches to Poky should go to the Poky list)
[-- Attachment #2: canadianupdate.patch --]
[-- Type: text/x-patch, Size: 4809 bytes --]
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 7971147..7360e1c 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -1,18 +1,30 @@
+#
+# NOTE - When using this class the user is repsonsible for ensuring that
+# TRANSLATED_TARGET_ARCH is added into PN. This ensures that if the TARGET_ARCH
+# is changed, another nativesdk xxx-canadian-cross can be installed
+#
+
+
# SDK packages are built either explicitly by the user,
# or indirectly via dependency. No need to be in 'world'.
EXCLUDE_FROM_WORLD = "1"
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
-# Save MULTIMACH_ARCH
+#
+# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
+#
OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}"
-# Save PACKAGE_ARCH
-OLD_PACKAGE_ARCH := ${PACKAGE_ARCH}
-PACKAGE_ARCH = "${SDK_ARCH}-${TARGET_ARCH}-canadian"
-PACKAGE_ARCHS = "${PACKAGE_ARCH}"
-# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it
-OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}"
-BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}"
+OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
+BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
+python () {
+ archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
+ sdkarchs = []
+ for arch in archs:
+ sdkarchs.append(arch + '-nativesdk')
+ bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
+}
+MULTIMACH_TARGET_SYS = "${MULTIMACH_ARCH}${HOST_VENDOR}-${HOST_OS}"
INHIBIT_DEFAULT_DEPS = "1"
@@ -69,5 +81,3 @@ export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
# Cross-canadian packages need to pull in nativesdk dynamic libs
SHLIBSDIR = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${BUILD_OS}/shlibs"
-# handle x86_64 TARGET_ARCH name
-TRANSLATED_TARGET_ARCH ?= ${TARGET_ARCH}
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index c1393fa..5ddd6c6 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -79,8 +79,6 @@ package_update_index_ipk () {
packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/$arch ${DEPLOY_DIR_IPK}/$sdkarch-nativesdk"
done
- packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/${SDK_ARCH}-${TARGET_ARCH}-canadian"
-
for pkgdir in $packagedirs; do
if [ -e $pkgdir/ ]; then
touch $pkgdir/Packages
@@ -112,9 +110,6 @@ package_generate_ipkg_conf () {
echo "src oe-$sdkarch$extension file:${DEPLOY_DIR_IPK}/$sdkarch$extension" >> ${IPKGCONF_SDK}
fi
done
- if [ -e ${DEPLOY_DIR_IPK}/${SDK_ARCH}-${TARGET_ARCH}-canadian/Packages ] ; then
- echo "src oe-${SDK_ARCH}-${TARGET_ARCH}-canadian file:${DEPLOY_DIR_IPK}/${SDK_ARCH}-${TARGET_ARCH}-canadian" >> ${IPKGCONF_SDK}
- fi
}
package_generate_archlist () {
@@ -130,7 +125,6 @@ package_generate_archlist () {
echo "arch $sdkarch$extension $priority" >> ${IPKGCONF_SDK}
priority=$(expr $priority + 5)
done
- echo "arch ${SDK_ARCH}-${TARGET_ARCH}-canadian $priority" >> ${IPKGCONF_SDK}
}
python do_package_ipk () {
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index abd2bb5..d3fd26d 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -726,3 +726,5 @@ TARGET_ARCH[unexport] = "1"
# (breaks sysvinit at least)
DISTRO[unexport] = "1"
+# Used by canadian-cross to handle string conversions on TARGET_ARCH where needed
+TRANSLATED_TARGET_ARCH ??= ${TARGET_ARCH}
diff --git a/meta/recipes-core/meta/meta-toolchain.bb b/meta/recipes-core/meta/meta-toolchain.bb
index 8b62fab..40f8d7e 100644
--- a/meta/recipes-core/meta/meta-toolchain.bb
+++ b/meta/recipes-core/meta/meta-toolchain.bb
@@ -13,7 +13,7 @@ SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
IPKG_HOST = "opkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}"
IPKG_TARGET = "opkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
-TOOLCHAIN_HOST_TASK ?= "task-sdk-host task-cross-canadian"
+TOOLCHAIN_HOST_TASK ?= "task-sdk-host task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
TOOLCHAIN_TARGET_TASK ?= "task-poky-standalone-sdk-target task-poky-standalone-sdk-target-dbg"
TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${DISTRO_VERSION}"
diff --git a/meta/recipes-core/tasks/task-cross-canadian.bb b/meta/recipes-core/tasks/task-cross-canadian.bb
index c32afdc..7170faa 100644
--- a/meta/recipes-core/tasks/task-cross-canadian.bb
+++ b/meta/recipes-core/tasks/task-cross-canadian.bb
@@ -1,4 +1,5 @@
DESCRIPTION = "Host SDK package for cross canadian toolchain"
+PN = "task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
PR = "r0"
LICENSE = "MIT"
ALLOW_EMPTY = "1"
^ permalink raw reply related [flat|nested] 3+ messages in thread