diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-07 17:27:03 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-27 16:18:40 +0100 |
commit | c18aa8d065c389d2f2038da07704b004a3ece9d4 (patch) | |
tree | 5d56cc511e1377c9aa1d10b304c5c79c67928f4a | |
parent | f5e9a398b9200a64c2543fc5cfe4777263c5628e (diff) | |
download | poky-c18aa8d065c389d2f2038da07704b004a3ece9d4.tar.gz |
multilib: Add support for compiling recipes against multiple ABIs
This patch adds the core multilib class which can be used along with a
parameter specifying the mutlilib to use in BBCLASSEXTEND.
The MLPREFIX variable is added and can be used in cases where its too
difficult to dynmaically work out where a mutltilib prefix is needed
to be added to a variable.
This includes:
* SHLIBSDIR and PACKAGE_ARCH fixes from Lianhao Lu.
* PACKAGE_DYNAMIC mapping from Yu Ke
* PACKAGE_INSTALL mapping from Yu Ke
* RPROVIDES mapping from Yu Ke
* TARGET_VENDOR fix from Mark Hatle
* Ignorning *-native-runtime dependnecies as well as *-native from Yu Ke
* Map PKG and ALLOW_EMPTY from Dongxiao Xu
* Ensure RCONFLICTS and PKG field dependencies are remapped (from Dongxiao Xu)
* Ensure PN and MLPREFIX are set at the same time to ensure consistent BPN values (Yu Ke)
(From OE-Core rev: 5d9453049915db48ec4b5972e12287417ebb61a2)
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta-yocto/conf/local.conf.sample | 5 | ||||
-rw-r--r-- | meta/classes/autotools.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/cross.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/insane.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 11 | ||||
-rw-r--r-- | meta/conf/bitbake.conf | 1 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus.inc | 8 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/libgcc_4.6.bb | 6 |
8 files changed, 26 insertions, 11 deletions
diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample index 64b61ba92b..b6993841fb 100644 --- a/meta-yocto/conf/local.conf.sample +++ b/meta-yocto/conf/local.conf.sample | |||
@@ -223,3 +223,8 @@ NO32LIBS = "1" | |||
223 | 223 | ||
224 | # Uncomment this if your host distribution provides the help2man tool. | 224 | # Uncomment this if your host distribution provides the help2man tool. |
225 | #ASSUME_PROVIDED += "help2man-native" | 225 | #ASSUME_PROVIDED += "help2man-native" |
226 | |||
227 | # Uncomment the following lines to enable multilib builds | ||
228 | #require conf/multilib.conf | ||
229 | #MULTILIBS = "multilib:lib32" | ||
230 | #TUNENAME_virtclass-multilib-lib32 = "x86" | ||
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index ed5637ef3b..e5c13ae691 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass | |||
@@ -9,7 +9,7 @@ def autotools_dep_prepend(d): | |||
9 | return deps | 9 | return deps |
10 | deps += 'autoconf-native automake-native help2man-native ' | 10 | deps += 'autoconf-native automake-native help2man-native ' |
11 | 11 | ||
12 | if not pn in ['libtool', 'libtool-native', 'libtool-cross']: | 12 | if not pn in ['libtool', 'libtool-native'] and not pn.endswith("libtool-cross"): |
13 | deps += 'libtool-native ' | 13 | deps += 'libtool-native ' |
14 | if not bb.data.inherits_class('native', d) \ | 14 | if not bb.data.inherits_class('native', d) \ |
15 | and not bb.data.inherits_class('cross', d) \ | 15 | and not bb.data.inherits_class('cross', d) \ |
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass index 050d63e412..e19614f280 100644 --- a/meta/classes/cross.bbclass +++ b/meta/classes/cross.bbclass | |||
@@ -54,4 +54,3 @@ do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE | |||
54 | do_install () { | 54 | do_install () { |
55 | oe_runmake 'DESTDIR=${D}' install | 55 | oe_runmake 'DESTDIR=${D}' install |
56 | } | 56 | } |
57 | |||
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index d56c9edcc2..5fb0d98baf 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -571,12 +571,13 @@ Rerun configure task after fixing this. The path was '%s'""" % root) | |||
571 | 571 | ||
572 | cnf = bb.data.getVar('EXTRA_OECONF', d, True) or "" | 572 | cnf = bb.data.getVar('EXTRA_OECONF', d, True) or "" |
573 | if "gettext" not in bb.data.getVar('P', d, True) and "gcc-runtime" not in bb.data.getVar('P', d, True) and "--disable-nls" not in cnf: | 573 | if "gettext" not in bb.data.getVar('P', d, True) and "gcc-runtime" not in bb.data.getVar('P', d, True) and "--disable-nls" not in cnf: |
574 | ml = d.getVar("MLPREFIX", True) or "" | ||
574 | if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d): | 575 | if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d): |
575 | gt = "gettext-native" | 576 | gt = "gettext-native" |
576 | elif bb.data.inherits_class('cross-canadian', d): | 577 | elif bb.data.inherits_class('cross-canadian', d): |
577 | gt = "gettext-nativesdk" | 578 | gt = "gettext-nativesdk" |
578 | else: | 579 | else: |
579 | gt = "virtual/gettext" | 580 | gt = "virtual/" + ml + "gettext" |
580 | deps = bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, True) or "") | 581 | deps = bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, True) or "") |
581 | if gt not in deps: | 582 | if gt not in deps: |
582 | for config in configs: | 583 | for config in configs: |
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 076a532360..0caab6dcf9 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -168,6 +168,17 @@ python () { | |||
168 | bb.data.setVarFlag('do_package', 'deptask', " ".join(deps), d) | 168 | bb.data.setVarFlag('do_package', 'deptask', " ".join(deps), d) |
169 | else: | 169 | else: |
170 | d.setVar("PACKAGERDEPTASK", "") | 170 | d.setVar("PACKAGERDEPTASK", "") |
171 | |||
172 | multilib_archs = [] | ||
173 | multilibs= d.getVar('MULTILIBS', True) or "" | ||
174 | if multilibs: | ||
175 | for ext in multilibs.split(): | ||
176 | eext = ext.split(':') | ||
177 | if len(eext) > 1: | ||
178 | if eext[0] == 'multilib': | ||
179 | multilib_archs.append('ml' + eext[1]) | ||
180 | |||
181 | d.setVar("MULTILIB_ARCHS", ' '.join(multilib_archs)) | ||
171 | } | 182 | } |
172 | 183 | ||
173 | def splitfile(file, debugfile, debugsrcdir, d): | 184 | def splitfile(file, debugfile, debugsrcdir, d): |
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 46a9a82198..6e109ecd1e 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -735,3 +735,4 @@ BB_SIGNATURE_HANDLER ?= "basic" | |||
735 | BB_HASHTASK_WHITELIST ?= "(.*-cross$|.*-native$|.*-cross-initial$|.*-cross-intermediate$|^virtual:native:.*|^virtual:nativesdk:.*)" | 735 | BB_HASHTASK_WHITELIST ?= "(.*-cross$|.*-native$|.*-cross-initial$|.*-cross-intermediate$|^virtual:native:.*|^virtual:nativesdk:.*)" |
736 | BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH USERNAME STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE" | 736 | BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH USERNAME STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE" |
737 | 737 | ||
738 | MLPREFIX ??= "" | ||
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc index 5f9a8a3081..6b76cba959 100644 --- a/meta/recipes-core/dbus/dbus.inc +++ b/meta/recipes-core/dbus/dbus.inc | |||
@@ -5,11 +5,9 @@ SECTION = "base" | |||
5 | LICENSE = "AFL-2 | GPLv2+" | 5 | LICENSE = "AFL-2 | GPLv2+" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ |
7 | file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0c7750dd8e620dcb1437312fa5" | 7 | file://dbus/dbus.h;firstline=6;endline=20;md5=6eea2e0c7750dd8e620dcb1437312fa5" |
8 | x11deps = "virtual/libx11 libsm" | 8 | DEPENDS = "expat virtual/libintl virtual/libx11 libsm" |
9 | basedeps = "expat virtual/libintl" | 9 | DEPENDS_virtclass-native = "expat-native virtual/libintl-native" |
10 | DEPENDS = "${basedeps} ${x11deps}" | 10 | DEPENDS_virtclass-nativesdk = "expat-nativesdk virtual/libintl-nativesdk virtual/libx11" |
11 | DEPENDS_virtclass-native = "${basedeps}" | ||
12 | DEPENDS_virtclass-nativesdk = "${basedeps} virtual/libx11" | ||
13 | 11 | ||
14 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ | 12 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ |
15 | file://tmpdir.patch; \ | 13 | file://tmpdir.patch; \ |
diff --git a/meta/recipes-devtools/gcc/libgcc_4.6.bb b/meta/recipes-devtools/gcc/libgcc_4.6.bb index 6a77ce4653..a6e1146be9 100644 --- a/meta/recipes-devtools/gcc/libgcc_4.6.bb +++ b/meta/recipes-devtools/gcc/libgcc_4.6.bb | |||
@@ -41,9 +41,9 @@ do_install () { | |||
41 | chmod +x ${D}${base_libdir}/libgcc_s.so.* | 41 | chmod +x ${D}${base_libdir}/libgcc_s.so.* |
42 | } | 42 | } |
43 | 43 | ||
44 | do_package_write_ipk[depends] += "virtual/libc:do_package" | 44 | do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package" |
45 | do_package_write_deb[depends] += "virtual/libc:do_package" | 45 | do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_package" |
46 | do_package_write_rpm[depends] += "virtual/libc:do_package" | 46 | do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_package" |
47 | 47 | ||
48 | BBCLASSEXTEND = "nativesdk" | 48 | BBCLASSEXTEND = "nativesdk" |
49 | 49 | ||