blob: ddc2a850507619be8e2dafd7b197ce4dac139bc0 [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
5# Expand STAGING_DIR_HOST since for cross-canadian/native/nativesdk, this will
6# point elsewhere after these changes.
7STAGING_DIR_HOST := "${STAGING_DIR_HOST}"
8
9PACKAGE_ARCH = "all"
10
11python () {
12 # Allow this class to be included but overridden - only set
13 # the values if we're still "all" package arch.
14 if d.getVar("PACKAGE_ARCH", True) == "all":
15 # No need for virtual/libc or a cross compiler
16 d.setVar("INHIBIT_DEFAULT_DEPS","1")
17
18 # Set these to a common set of values, we shouldn't be using them other that for WORKDIR directory
19 # naming anyway
Patrick Williamsc0f7c042017-02-23 20:41:17 -060020 d.setVar("baselib", "lib")
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021 d.setVar("TARGET_ARCH", "allarch")
22 d.setVar("TARGET_OS", "linux")
23 d.setVar("TARGET_CC_ARCH", "none")
24 d.setVar("TARGET_LD_ARCH", "none")
25 d.setVar("TARGET_AS_ARCH", "none")
26 d.setVar("TARGET_FPU", "")
27 d.setVar("TARGET_PREFIX", "")
28 d.setVar("PACKAGE_EXTRA_ARCHS", "")
29 d.setVar("SDK_ARCH", "none")
30 d.setVar("SDK_CC_ARCH", "none")
Patrick Williamsf1e5d692016-03-30 15:21:19 -050031 d.setVar("TARGET_CPPFLAGS", "none")
32 d.setVar("TARGET_CFLAGS", "none")
33 d.setVar("TARGET_CXXFLAGS", "none")
34 d.setVar("TARGET_LDFLAGS", "none")
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
36 # Avoid this being unnecessarily different due to nuances of
37 # the target machine that aren't important for "all" arch
38 # packages.
39 d.setVar("LDFLAGS", "")
40
41 # No need to do shared library processing or debug symbol handling
42 d.setVar("EXCLUDE_FROM_SHLIBS", "1")
43 d.setVar("INHIBIT_PACKAGE_DEBUG_SPLIT", "1")
44 d.setVar("INHIBIT_PACKAGE_STRIP", "1")
Patrick Williamsc0f7c042017-02-23 20:41:17 -060045
46 # These multilib values shouldn't change allarch packages so exclude them
47 d.setVarFlag("emit_pkgdata", "vardepsexclude", "MULTILIB_VARIANTS")
48 d.setVarFlag("write_specfile", "vardepsexclude", "MULTILIBS")
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049 elif bb.data.inherits_class('packagegroup', d) and not bb.data.inherits_class('nativesdk', d):
50 bb.error("Please ensure recipe %s sets PACKAGE_ARCH before inherit packagegroup" % d.getVar("FILE", True))
51}
52