Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2 | # This class is used for architecture independent recipes/data files (usually scripts) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3 | # |
| 4 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | PACKAGE_ARCH = "all" |
| 6 | |
| 7 | python () { |
| 8 | # Allow this class to be included but overridden - only set |
| 9 | # the values if we're still "all" package arch. |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 10 | if d.getVar("PACKAGE_ARCH") == "all": |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | # 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 16 | d.setVar("baselib", "lib") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 24 | # 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | d.setVar("SDK_ARCH", "none") |
| 28 | d.setVar("SDK_CC_ARCH", "none") |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 29 | d.setVar("TARGET_CPPFLAGS", "none") |
| 30 | d.setVar("TARGET_CFLAGS", "none") |
| 31 | d.setVar("TARGET_CXXFLAGS", "none") |
| 32 | d.setVar("TARGET_LDFLAGS", "none") |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 33 | d.setVar("POPULATESYSROOTDEPS", "") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | |
| 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 44 | |
| 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | elif bb.data.inherits_class('packagegroup', d) and not bb.data.inherits_class('nativesdk', d): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 49 | bb.error("Please ensure recipe %s sets PACKAGE_ARCH before inherit packagegroup" % d.getVar("FILE")) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | } |
| 51 | |