diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
commit | 8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch) | |
tree | 281032f7ec07c41589aa094bd165cc2a98f2d3a7 /poky/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb | |
parent | c16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff) | |
parent | 5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff) | |
download | openbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz |
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'poky/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb')
-rw-r--r-- | poky/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb new file mode 100644 index 000000000..67add2c25 --- /dev/null +++ b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.55.1.bb @@ -0,0 +1,65 @@ +include meson.inc + +inherit nativesdk +inherit siteinfo + +SRC_URI += "file://meson-setup.py \ + file://meson-wrapper" + +def meson_endian(prefix, d): + arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS") + sitedata = siteinfo_data_for_machine(arch, os, d) + if "endian-little" in sitedata: + return "little" + elif "endian-big" in sitedata: + return "big" + else: + bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) + +# The cross file logic is similar but not identical to that in meson.bbclass, +# since it's generating for an SDK rather than a cross-compile. Important +# differences are: +# - We can't set vars like CC, CXX, etc. yet because they will be filled in with +# real paths by meson-setup.sh when the SDK is extracted. +# - Some overrides aren't needed, since the SDK injects paths that take care of +# them. +do_install_append() { + install -d ${D}${datadir}/meson + cat >${D}${datadir}/meson/meson.cross.template <<EOF +[binaries] +c = @CC +cpp = @CXX +ar = @AR +nm = @NM +strip = @STRIP +pkgconfig = 'pkg-config' + +[properties] +needs_exe_wrapper = true +c_args = @CFLAGS +c_link_args = @LDFLAGS +cpp_args = @CPPFLAGS +cpp_link_args = @LDFLAGS + +[host_machine] +system = '${SDK_OS}' +cpu_family = '${SDK_ARCH}' +cpu = '${SDK_ARCH}' +endian = '${@meson_endian("SDK", d)}' +EOF + + install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d + install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/ + + # We need to wrap the real meson with a thin env setup wrapper. + mv ${D}${bindir}/meson ${D}${bindir}/meson.real + install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson +} + +RDEPENDS_${PN} += "\ + nativesdk-ninja \ + nativesdk-python3 \ + nativesdk-python3-setuptools \ + " + +FILES_${PN} += "${datadir}/meson ${SDKPATHNATIVE}" |