blob: 69fb45c8a58b34127c8974e8ef329489f1295bfb [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001# SDK packages are built either explicitly by the user,
2# or indirectly via dependency. No need to be in 'world'.
3EXCLUDE_FROM_WORLD = "1"
4
5STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}"
6
7# libc for the SDK can be different to that of the target
8NATIVESDKLIBC ?= "libc-glibc"
9LIBCOVERRIDE = ":${NATIVESDKLIBC}"
10CLASSOVERRIDE = "class-nativesdk"
11MACHINEOVERRIDES = ""
12
Patrick Williamsc0f7c042017-02-23 20:41:17 -060013MULTILIBS = ""
14
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015#
16# Update PACKAGE_ARCH and PACKAGE_ARCHS
17#
18PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
19PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}"
20
21#
22# We need chrpath >= 0.14 to ensure we can deal with 32 and 64 bit
23# binaries
24#
25DEPENDS_append = " chrpath-replacement-native"
26EXTRANATIVEPATH += "chrpath-native"
27
Brad Bishop6e60e8b2018-02-01 10:27:11 -050028PKGDATA_DIR = "${TMPDIR}/pkgdata/${SDK_SYS}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029
30HOST_ARCH = "${SDK_ARCH}"
31HOST_VENDOR = "${SDK_VENDOR}"
32HOST_OS = "${SDK_OS}"
33HOST_PREFIX = "${SDK_PREFIX}"
34HOST_CC_ARCH = "${SDK_CC_ARCH}"
35HOST_LD_ARCH = "${SDK_LD_ARCH}"
36HOST_AS_ARCH = "${SDK_AS_ARCH}"
37#HOST_SYS = "${HOST_ARCH}${TARGET_VENDOR}-${HOST_OS}"
38
39TARGET_ARCH = "${SDK_ARCH}"
40TARGET_VENDOR = "${SDK_VENDOR}"
41TARGET_OS = "${SDK_OS}"
42TARGET_PREFIX = "${SDK_PREFIX}"
43TARGET_CC_ARCH = "${SDK_CC_ARCH}"
44TARGET_LD_ARCH = "${SDK_LD_ARCH}"
45TARGET_AS_ARCH = "${SDK_AS_ARCH}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050046TARGET_CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
47TARGET_CFLAGS = "${BUILDSDK_CFLAGS}"
48TARGET_CXXFLAGS = "${BUILDSDK_CXXFLAGS}"
49TARGET_LDFLAGS = "${BUILDSDK_LDFLAGS}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050TARGET_FPU = ""
51EXTRA_OECONF_GCC_FLOAT = ""
52
53CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
54CFLAGS = "${BUILDSDK_CFLAGS}"
55CXXFLAGS = "${BUILDSDK_CFLAGS}"
56LDFLAGS = "${BUILDSDK_LDFLAGS}"
57
58# Change to place files in SDKPATH
59base_prefix = "${SDKPATHNATIVE}"
60prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
61exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
62baselib = "lib"
63sbindir = "${bindir}"
64
65export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
66export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
67
68python nativesdk_virtclass_handler () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050069 pn = e.data.getVar("PN")
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070 if not (pn.endswith("-nativesdk") or pn.startswith("nativesdk-")):
71 return
72
Brad Bishop6e60e8b2018-02-01 10:27:11 -050073 # Set features here to prevent appends and distro features backfill
74 # from modifying nativesdk distro features
75 features = set(d.getVar("DISTRO_FEATURES_NATIVESDK").split())
76 filtered = set(bb.utils.filter("DISTRO_FEATURES", d.getVar("DISTRO_FEATURES_FILTER_NATIVESDK"), d).split())
77 d.setVar("DISTRO_FEATURES", " ".join(sorted(features | filtered)))
78
Patrick Williamsc124f4f2015-09-15 14:41:29 -050079 e.data.setVar("MLPREFIX", "nativesdk-")
Brad Bishop6e60e8b2018-02-01 10:27:11 -050080 e.data.setVar("PN", "nativesdk-" + e.data.getVar("PN").replace("-nativesdk", "").replace("nativesdk-", ""))
Patrick Williamsc124f4f2015-09-15 14:41:29 -050081 e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-nativesdk")
82}
83
84python () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050085 pn = d.getVar("PN")
Patrick Williamsc124f4f2015-09-15 14:41:29 -050086 if not pn.startswith("nativesdk-"):
87 return
88
89 import oe.classextend
90
91 clsextend = oe.classextend.NativesdkClassExtender("nativesdk", d)
92 clsextend.rename_packages()
Brad Bishop6e60e8b2018-02-01 10:27:11 -050093 clsextend.rename_package_variables((d.getVar("PACKAGEVARS") or "").split())
Patrick Williamsc124f4f2015-09-15 14:41:29 -050094
95 clsextend.map_depends_variable("DEPENDS")
96 clsextend.map_packagevars()
97 clsextend.map_variable("PROVIDES")
98 clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
99}
100
101addhandler nativesdk_virtclass_handler
102nativesdk_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
103
104do_populate_sysroot[stamp-extra-info] = ""
105do_packagedata[stamp-extra-info] = ""
106
107USE_NLS = "${SDKUSE_NLS}"
Brad Bishop37a0e4d2017-12-04 01:01:44 -0500108
109OLDEST_KERNEL = "${SDK_OLDEST_KERNEL}"