blob: a7ce024649ebb992e73eb9465cfcb2460b7f916a [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05002# This class is used for architecture independent recipes/data files (usually scripts)
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003#
4
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005PACKAGE_ARCH = "all"
6
7python () {
8 # Allow this class to be included but overridden - only set
9 # the values if we're still "all" package arch.
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010 if d.getVar("PACKAGE_ARCH") == "all":
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 # No need for virtual/libc or a cross compiler
12 d.setVar("INHIBIT_DEFAULT_DEPS","1")
13
14 # Set these to a common set of values, we shouldn't be using them other that for WORKDIR directory
15 # naming anyway
Patrick Williamsc0f7c042017-02-23 20:41:17 -060016 d.setVar("baselib", "lib")
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017 d.setVar("TARGET_ARCH", "allarch")
18 d.setVar("TARGET_OS", "linux")
19 d.setVar("TARGET_CC_ARCH", "none")
20 d.setVar("TARGET_LD_ARCH", "none")
21 d.setVar("TARGET_AS_ARCH", "none")
22 d.setVar("TARGET_FPU", "")
23 d.setVar("TARGET_PREFIX", "")
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024 # Expand PACKAGE_EXTRA_ARCHS since the staging code needs this
25 # (this removes any dependencies from the hash perspective)
26 d.setVar("PACKAGE_EXTRA_ARCHS", d.getVar("PACKAGE_EXTRA_ARCHS"))
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027 d.setVar("SDK_ARCH", "none")
28 d.setVar("SDK_CC_ARCH", "none")
Patrick Williamsf1e5d692016-03-30 15:21:19 -050029 d.setVar("TARGET_CPPFLAGS", "none")
30 d.setVar("TARGET_CFLAGS", "none")
31 d.setVar("TARGET_CXXFLAGS", "none")
32 d.setVar("TARGET_LDFLAGS", "none")
Brad Bishop6e60e8b2018-02-01 10:27:11 -050033 d.setVar("POPULATESYSROOTDEPS", "")
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034
35 # Avoid this being unnecessarily different due to nuances of
36 # the target machine that aren't important for "all" arch
37 # packages.
38 d.setVar("LDFLAGS", "")
39
40 # No need to do shared library processing or debug symbol handling
41 d.setVar("EXCLUDE_FROM_SHLIBS", "1")
42 d.setVar("INHIBIT_PACKAGE_DEBUG_SPLIT", "1")
43 d.setVar("INHIBIT_PACKAGE_STRIP", "1")
Patrick Williamsc0f7c042017-02-23 20:41:17 -060044
45 # These multilib values shouldn't change allarch packages so exclude them
46 d.setVarFlag("emit_pkgdata", "vardepsexclude", "MULTILIB_VARIANTS")
47 d.setVarFlag("write_specfile", "vardepsexclude", "MULTILIBS")
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048 elif bb.data.inherits_class('packagegroup', d) and not bb.data.inherits_class('nativesdk', d):
Brad Bishop6e60e8b2018-02-01 10:27:11 -050049 bb.error("Please ensure recipe %s sets PACKAGE_ARCH before inherit packagegroup" % d.getVar("FILE"))
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050}
51