summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/multilib.bbclass3
-rw-r--r--meta/classes/multilib_global.bbclass5
-rw-r--r--meta/classes/package.bbclass30
-rw-r--r--meta/classes/sanity.bbclass4
-rw-r--r--meta/conf/multilib.conf2
5 files changed, 43 insertions, 1 deletions
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 09c08eddd0..f5f3c69363 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -31,6 +31,9 @@ python multilib_virtclass_handler () {
31 if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data): 31 if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data):
32 raise bb.parse.SkipPackage("We can't extend nativesdk recipes") 32 raise bb.parse.SkipPackage("We can't extend nativesdk recipes")
33 33
34 if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data):
35 raise bb.parse.SkipPackage("Don't extend allarch recipes which are not packagegroups")
36
34 save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME", True) or "" 37 save_var_name=e.data.getVar("MULTILIB_SAVE_VARNAME", True) or ""
35 for name in save_var_name.split(): 38 for name in save_var_name.split():
36 val=e.data.getVar(name, True) 39 val=e.data.getVar(name, True)
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass
index f55e3a25aa..529e82a8bd 100644
--- a/meta/classes/multilib_global.bbclass
+++ b/meta/classes/multilib_global.bbclass
@@ -10,7 +10,10 @@ python multilib_virtclass_handler_global () {
10 variant = e.data.getVar("BBEXTENDVARIANT", True) 10 variant = e.data.getVar("BBEXTENDVARIANT", True)
11 11
12 if isinstance(e, bb.event.RecipeParsed) and not variant: 12 if isinstance(e, bb.event.RecipeParsed) and not variant:
13 if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data): 13 if bb.data.inherits_class('kernel', e.data) or \
14 bb.data.inherits_class('module-base', e.data) or \
15 (bb.data.inherits_class('allarch', e.data) and\
16 not bb.data.inherits_class('packagegroup', e.data)):
14 variants = (e.data.getVar("MULTILIB_VARIANTS", True) or "").split() 17 variants = (e.data.getVar("MULTILIB_VARIANTS", True) or "").split()
15 18
16 import oe.classextend 19 import oe.classextend
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 9885d94101..1ac65510c7 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1132,6 +1132,20 @@ python emit_pkgdata() {
1132 size = 0 1132 size = 0
1133 return size 1133 return size
1134 1134
1135 def write_extra_pkgs(variants, pn, packages, pkgdatadir):
1136 for variant in variants:
1137 with open("%s/%s-%s" % (pkgdatadir, variant, pn), 'w') as fd:
1138 fd.write("PACKAGES: %s\n" % ' '.join(
1139 map(lambda pkg: '%s-%s' % (variant, pkg), packages.split())))
1140
1141 def write_extra_runtime_pkgs(variants, packages, pkgdatadir):
1142 for variant in variants:
1143 for pkg in packages.split():
1144 ml_pkg = "%s-%s" % (variant, pkg)
1145 subdata_file = "%s/runtime/%s" % (pkgdatadir, ml_pkg)
1146 with open(subdata_file, 'w') as fd:
1147 fd.write("PKG_%s: %s" % (ml_pkg, pkg))
1148
1135 packages = d.getVar('PACKAGES', True) 1149 packages = d.getVar('PACKAGES', True)
1136 pkgdest = d.getVar('PKGDEST', True) 1150 pkgdest = d.getVar('PKGDEST', True)
1137 pkgdatadir = d.getVar('PKGDESTWORK', True) 1151 pkgdatadir = d.getVar('PKGDESTWORK', True)
@@ -1144,6 +1158,16 @@ python emit_pkgdata() {
1144 f.write("PACKAGES: %s\n" % packages) 1158 f.write("PACKAGES: %s\n" % packages)
1145 f.close() 1159 f.close()
1146 1160
1161 pn = d.getVar('PN', True)
1162 global_variants = (d.getVar('MULTILIB_GLOBAL_VARIANTS', True) or "").split()
1163 variants = (d.getVar('MULTILIB_VARIANTS', True) or "").split()
1164
1165 if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
1166 write_extra_pkgs(variants, pn, packages, pkgdatadir)
1167
1168 if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)):
1169 write_extra_pkgs(global_variants, pn, packages, pkgdatadir)
1170
1147 workdir = d.getVar('WORKDIR', True) 1171 workdir = d.getVar('WORKDIR', True)
1148 1172
1149 for pkg in packages.split(): 1173 for pkg in packages.split():
@@ -1198,6 +1222,12 @@ python emit_pkgdata() {
1198 packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg 1222 packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg
1199 file(packagedfile, 'w').close() 1223 file(packagedfile, 'w').close()
1200 1224
1225 if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d):
1226 write_extra_runtime_pkgs(variants, packages, pkgdatadir)
1227
1228 if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d):
1229 write_extra_runtime_pkgs(global_variants, packages, pkgdatadir)
1230
1201 bb.utils.unlockfile(lf) 1231 bb.utils.unlockfile(lf)
1202} 1232}
1203emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse" 1233emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse"
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 5b4f070ec4..0ffa52dedf 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -114,6 +114,8 @@ def check_toolchain(data):
114 tune_error_set.append(tune_errors) 114 tune_error_set.append(tune_errors)
115 115
116 multilibs = (data.getVar("MULTILIB_VARIANTS", True) or "").split() 116 multilibs = (data.getVar("MULTILIB_VARIANTS", True) or "").split()
117 global_multilibs = (data.getVar("MULTILIB_GLOBAL_VARIANTS", True) or "").split()
118
117 if multilibs: 119 if multilibs:
118 seen_libs = [] 120 seen_libs = []
119 seen_tunes = [] 121 seen_tunes = []
@@ -122,6 +124,8 @@ def check_toolchain(data):
122 tune_error_set.append("The multilib '%s' appears more than once." % lib) 124 tune_error_set.append("The multilib '%s' appears more than once." % lib)
123 else: 125 else:
124 seen_libs.append(lib) 126 seen_libs.append(lib)
127 if not lib in global_multilibs:
128 tune_error_set.append("Multilib %s is not present in MULTILIB_GLOBAL_VARIANTS" % lib)
125 tune = data.getVar("DEFAULTTUNE_virtclass-multilib-%s" % lib, True) 129 tune = data.getVar("DEFAULTTUNE_virtclass-multilib-%s" % lib, True)
126 if tune in seen_tunes: 130 if tune in seen_tunes:
127 tune_error_set.append("The tuning '%s' appears in more than one multilib." % tune) 131 tune_error_set.append("The tuning '%s' appears in more than one multilib." % tune)
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index b22a4cb964..97b53eccf7 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -12,3 +12,5 @@ STAGING_DIR_TARGET = "${STAGING_DIR}/${MLPREFIX}${MACHINE}"
12INHERIT += "multilib_global" 12INHERIT += "multilib_global"
13 13
14BBCLASSEXTEND_append = " ${MULTILIBS}" 14BBCLASSEXTEND_append = " ${MULTILIBS}"
15
16MULTILIB_GLOBAL_VARIANTS = "lib32 lib64 libx32"