* [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross
@ 2020-02-15 9:44 Alex Kiernan
2020-02-15 9:44 ` [PATCH v4 2/2] systemd: upgrade v244.1 -> v244.3 Alex Kiernan
2020-02-15 21:18 ` [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross Khem Raj
0 siblings, 2 replies; 5+ messages in thread
From: Alex Kiernan @ 2020-02-15 9:44 UTC (permalink / raw)
To: openembedded-core
Add MESON_CROSS_BINARIES, MESON_CROSS_PROPERTIES as a colon separated
list of meson properties which are exported into meson.cross.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
Changes in v4: None
Changes in v3:
- new
Changes in v2: None
meta/classes/meson.bbclass | 161 ++++++++++++++++++++-----------------
1 file changed, 86 insertions(+), 75 deletions(-)
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 06034e8b4731..e778e37d7f69 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -34,88 +34,99 @@ MESON_CROSS_FILE = ""
MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
-def meson_array(var, d):
- items = d.getVar(var).split()
- return repr(items[0] if len(items) == 1 else items)
-
-# Map our ARCH values to what Meson expects:
-# http://mesonbuild.com/Reference-tables.html#cpu-families
-def meson_cpu_family(var, d):
- import re
- arch = d.getVar(var)
- if arch == 'powerpc':
- return 'ppc'
- elif arch == 'powerpc64' or arch == 'powerpc64le':
- return 'ppc64'
- elif arch == 'armeb':
- return 'arm'
- elif arch == 'aarch64_be':
- return 'aarch64'
- elif arch == 'mipsel':
- return 'mips'
- elif arch == 'mips64el':
- return 'mips64'
- elif re.match(r"i[3-6]86", arch):
- return "x86"
- elif arch == "microblazeel":
- return "microblaze"
- else:
- return arch
-
-# Map our OS values to what Meson expects:
-# https://mesonbuild.com/Reference-tables.html#operating-system-names
-def meson_operating_system(var, d):
- os = d.getVar(var)
- if "mingw" in os:
- return "windows"
- else:
- return os
-
-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))
+MESON_CROSS_BINARIES ??= "c:CC \
+ cpp:CXX \
+ ar:AR \
+ nm:NM \
+ strip:STRIP \
+ readelf:READELF"
+
+MESON_CROSS_PROPERTIES ??= "c_args:CFLAGS \
+ c_link_args:LDFLAGS \
+ cpp_args:CXXFLAGS \
+ cpp_link_args:LDFLAGS"
addtask write_config before do_configure
-do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS"
-do_write_config() {
- # This needs to be Py to split the args into single-element lists
- cat >${WORKDIR}/meson.cross <<EOF
+python do_write_config() {
+ def meson_array(var):
+ items = d.getVar(var).split()
+ return repr(items[0] if len(items) == 1 else items)
+
+ # Map our ARCH values to what Meson expects:
+ # http://mesonbuild.com/Reference-tables.html#cpu-families
+ def meson_cpu_family(var):
+ import re
+ arch = d.getVar(var)
+ if arch == 'powerpc':
+ return 'ppc'
+ elif arch == 'powerpc64' or arch == 'powerpc64le':
+ return 'ppc64'
+ elif arch == 'armeb':
+ return 'arm'
+ elif arch == 'aarch64_be':
+ return 'aarch64'
+ elif arch == 'mipsel':
+ return 'mips'
+ elif arch == 'mips64el':
+ return 'mips64'
+ elif re.match(r"i[3-6]86", arch):
+ return "x86"
+ elif arch == "microblazeel":
+ return "microblaze"
+ else:
+ return arch
+
+ # Map our OS values to what Meson expects:
+ # https://mesonbuild.com/Reference-tables.html#operating-system-names
+ def meson_operating_system(var):
+ os = d.getVar(var)
+ if "mingw" in os:
+ return "windows"
+ else:
+ return os
+
+ def meson_endian(prefix):
+ 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))
+
+ def meson_write_props(var, f):
+ for property in d.getVar(var).split():
+ (k, v) = property.split(':')
+ print("{} = {}".format(k, meson_array(v)), file=f)
+ d.appendVarFlag("do_write_config", "vardeps", v)
+
+ with open(oe.path.join(d.getVar('WORKDIR'), "meson.cross"), "w") as f:
+ print("""\
[binaries]
-c = ${@meson_array('CC', d)}
-cpp = ${@meson_array('CXX', d)}
-ar = ${@meson_array('AR', d)}
-nm = ${@meson_array('NM', d)}
-strip = ${@meson_array('STRIP', d)}
-readelf = ${@meson_array('READELF', d)}
pkgconfig = 'pkg-config'
-llvm-config = 'llvm-config${LLVMVERSION}'
+llvm-config = 'llvm-config{}'""".format(d.getVar("LLVMVERSION")), file=f)
+
+ meson_write_props('MESON_CROSS_BINARIES', f)
+ print("""\
[properties]
needs_exe_wrapper = true
-c_args = ${@meson_array('CFLAGS', d)}
-c_link_args = ${@meson_array('LDFLAGS', d)}
-cpp_args = ${@meson_array('CXXFLAGS', d)}
-cpp_link_args = ${@meson_array('LDFLAGS', d)}
-gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
-
-[host_machine]
-system = '${@meson_operating_system('HOST_OS', d)}'
-cpu_family = '${@meson_cpu_family('HOST_ARCH', d)}'
-cpu = '${HOST_ARCH}'
-endian = '${@meson_endian('HOST', d)}'
-
-[target_machine]
-system = '${@meson_operating_system('TARGET_OS', d)}'
-cpu_family = '${@meson_cpu_family('TARGET_ARCH', d)}'
-cpu = '${TARGET_ARCH}'
-endian = '${@meson_endian('TARGET', d)}'
-EOF
+gtkdoc_exe_wrapper = '{}/gtkdoc-qemuwrapper'""".format(d.getVar('B')), file=f)
+
+ meson_write_props('MESON_CROSS_PROPERTIES', f)
+
+ print("[host_machine]", file=f)
+ print("system = '{}'".format(meson_operating_system('HOST_OS')), file=f)
+ print("cpu_family = '{}'".format(meson_cpu_family('HOST_ARCH')), file=f)
+ print("cpu = '{}'".format(d.getVar('HOST_ARCH')), file=f)
+ print("endian = '{}'".format(meson_endian('HOST')), file=f)
+
+ print("[target_machine]", file=f)
+ print("system = '{}'".format(meson_operating_system('TARGET_OS')), file=f)
+ print("cpu_family = '{}'".format(meson_cpu_family('TARGET_ARCH')), file=f)
+ print("cpu = '{}'".format(d.getVar('TARGET_ARCH')), file=f)
+ print("endian = '{}'".format(meson_endian('TARGET')), file=f)
}
CONFIGURE_FILES = "meson.build"
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v4 2/2] systemd: upgrade v244.1 -> v244.3
2020-02-15 9:44 [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross Alex Kiernan
@ 2020-02-15 9:44 ` Alex Kiernan
2020-02-15 21:18 ` [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross Khem Raj
1 sibling, 0 replies; 5+ messages in thread
From: Alex Kiernan @ 2020-02-15 9:44 UTC (permalink / raw)
To: openembedded-core
Drop all systemd-boot patches and use MESON_CROSS_... configuration
instead to pick up EFI cc and objcopy. For EFI ld, we can use the
command line efi-ld option, but have to ensure it's something which can
be exec'd directly.
Commits from v244-stable:
c4280c342bbf Revert "Support Plugable UD-PRO8 dock"
bb598b56eb3c hibernate-resume-generator: wait "infinitely" for the resume device
77c04ce5c270 hwdb: update to v245-rc1
b4eb8848240c Fix typo in function name
e2d4cb9843c5 polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it
83bfc0d8dd02 sd-bus: introduce API for re-enqueuing incoming messages
5926f9f1723f polkit: use structured initialization
0697d0d972c8 polkit: on async pk requests, re-validate action/details
2589995acdb2 polkit: reuse some common bus message appending code
5b2442d5c3ec bus-polkit: rename return error parameter to ret_error
0a19ff7004e4 shared: split out polkit stuff from bus-util.c → bus-polkit.c
1325dfb5778d test: adapt to the new capsh format
3538fafb4714 meson: update efi path detection to gnu-efi-3.0.11
3034855a5b62 presets: "disable" all passive targets by default
c2e304681929 shared/sysctl-util: normalize repeated slashes or dots to a single value
6f4364046f90 dhcp6: do not use T1 and T2 longer than one provided by the lease
0ed6cda28dff network: fix implicit type conversion warning by GCC-10
f6a5c02d26b1 bootspec: parse random-seed-mode line in loader.conf
ddc5dca8a73b sd-boot: fix typo
2bbbe9ae41ab test: Synchronize journal before reading from it
072485d661d7 sd-bus: fix introspection bug in signal parameter names
80af3cf5e36b efi: fix build.
d7ede1ade564 generator: order growfs for the root fs after systemd-remount-fs
e9904998213d loginctl: use /org/freedesktop/login1/session/auto when "lock-session" is called without argument
82dd4caf014c Documentation update for x-systemd.{before,after}
a60459764d9d man: fix typo in systemd.netdev Xfrm example
fc053e2dfb3f timesyncd: log louder when we refuse a server due to root distance
af0e630693fa resolved: drop DNSSEC root key that is not valid anymore
ae59f1666ca6 journal: don't use startswith() on something that is not a NUL-terminated string
536ef6d72bc6 test: add test for https://github.com/systemd/systemd/issues/14560
b78fe3c1b1a8 core: make sure StandardInput=file: doesn't get dup'ed to stdout/stderr by default
a1561a08f2d5 pkgconf: add full generator paths
e5f2d11489ec tree-wide: we forgot to destroy some bus errors
ea67fd42067b mount: make checks on perpetual mount units more lax
2f23c648bce4 core: never allow perpetual units to be masked
9ba11dffb09a typo: "May modify to" -> "May modify"
84c048799a78 Disable reading SystemdOptions EFI Var when in SecureBoot mode
4c2d72b53091 sysctl: downgrade message when we have no permission
c001a285a3a2 Clarify journald.conf MaxLevelStore documentation
45d52c7615fd logind: refuse overriding idle hint on tty sessions
b1a0be45b4ee cgroup: update only siblings that got realized once
e6d694254fe1 mount: mark an existing "mounting" unit from /proc/self/mountinfo as "just_mounted"
d8fd38769c36 journalctl: Correctly handle combination of --reverse and --lines (fixes #1596)
cd19bd31d808 journalctl: Correctly handle --show-cursor in combination with --until or --since and --reverse
1320aa92dc0a core: fix re-realization of cgroup siblings
14164ec6bc77 core: propagate service state to socket in more load states
c22bf6b31a45 man: describe "symlink" and "systemctl link" explicitly in UNIT FILE LOAD PATH
26f3a534f1ab core: be more restrictive on the dependency types we allow to be created transiently
377cc5d91ea5 udev: don't import parent ID_FS_ data on partitions
7d5060d53994 man: fix option name
98c03090274a Support Plugable UD-PRO8 dock
e9687d09dccf gpt-auto: don't assume XBOOTLDR is vfat
7057fe863007 man: fix documentation of IBM VIO device naming
f8d1df1045be man: slightly extend documentation on difference between ID_NET_NAME_ONBOARD and ID_NET_LABEL_ONBOARD
1faf5dde4d4a boot: fix osrel parser
65d247af1786 udev: do not use exact match of file permission
6da978f89b48 network: lower the log-level of harmless message
5d8a614f926c hwdb: ignore keys added in kernel 5.5
8b1bd1746989 systemctl: skip non-existent units in the 'cat' verb
b2f342f92b54 systemd.exec: document the file system for EnvironmentFile paths
945f3a231f6f systemd-analyze: fixed typo in documentation
2c8ae283b0ee test-condition: fix group check condition
6b48479f4582 umount: show correct error message
faba5b2ba8c9 Revert "Drop dbus activation stub service"
3dd98f1998f9 man: add section about user manager units
1c80a8ced006 man: add remote-*.targets to the bootup sequence
9afd65f15e93 time-util: also use 32bit hack on EOVERFLOW
561923291383 [man] note which UID ranges will get user journals
588a23ef2684 [man] fix URL
0130a03179f6 analyze: badness if neither of RootImage and RootDirectory exists
93074c962e3a network: introduce AddPrefixRoute= and deprecate PrefixRoute=
a8ad020ea0ba shared/dropin: fix assert for invalid drop-in
946cdba156dd initrd: make udev cleanup service confict trigger and settle too
c0a8a92e6027 man: we support growing xfs too these days
608d88273494 time-util: deal with systems where userspace has 64bit time_t but kernel does not
cfced59a4bd8 [import] fix stdin/stdout pipe behavior in import/export tar/raw
73435b219553 systemctl: show what verbs support --dry-run in the help page
dc56b94e1308 cryptsetup-generator: unconfuse writing of the device timeout
0757ad565573 shared/install: log syntax error for invalid DefaultInstance=
d2471109d999 shared/install: provide a nicer error message for invalid WantedBy=/Required= values
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
Changes in v4:
- add missed commit to join EFI ldflags after stripping command
Changes in v3:
- use MESON_CROSS_... for systemd-boot
Changes in v2:
- fix SRC_URI now v244.3 tag exists on v244-stable
...md-boot_244.1.bb => systemd-boot_244.3.bb} | 19 ++---
...md-conf_244.1.bb => systemd-conf_244.3.bb} | 0
meta/recipes-core/systemd/systemd.inc | 2 +-
...c-and-efi_ld-correctly-when-cross-co.patch | 62 ---------------
...on-print-EFI-CC-configuration-nicely.patch | 33 --------
...meson-use-an-array-option-for-efi-cc.patch | 77 -------------------
...fi-objcopy-option-to-specify-objcopy.patch | 48 ------------
.../{systemd_244.1.bb => systemd_244.3.bb} | 0
8 files changed, 7 insertions(+), 234 deletions(-)
rename meta/recipes-core/systemd/{systemd-boot_244.1.bb => systemd-boot_244.3.bb} (71%)
rename meta/recipes-core/systemd/{systemd-conf_244.1.bb => systemd-conf_244.3.bb} (100%)
delete mode 100644 meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
delete mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
rename meta/recipes-core/systemd/{systemd_244.1.bb => systemd_244.3.bb} (100%)
diff --git a/meta/recipes-core/systemd/systemd-boot_244.1.bb b/meta/recipes-core/systemd/systemd-boot_244.3.bb
similarity index 71%
rename from meta/recipes-core/systemd/systemd-boot_244.1.bb
rename to meta/recipes-core/systemd/systemd-boot_244.3.bb
index 515abc289bef..a77f6fb73d23 100644
--- a/meta/recipes-core/systemd/systemd-boot_244.1.bb
+++ b/meta/recipes-core/systemd/systemd-boot_244.3.bb
@@ -5,27 +5,20 @@ require conf/image-uefi.conf
DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
-# NOTE: These three patches are in theory not needed, but we haven't
-# figured out how to correctly pass efi-cc parameter if it's an array.
-SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \
- file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \
- file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
- file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch \
- "
-
inherit meson pkgconfig gettext
inherit deploy
-EFI_CC ?= "${CC}"
+EFI_LDFLAGS = "${@ " ".join(d.getVar('LD').split()[1:])} ${LDFLAGS}"
+MESON_CROSS_BINARIES_append = " efi_cc:CC objcopy:OBJCOPY"
+MESON_CROSS_PROPERTIES_remove = "c_link_args:LDFLAGS"
+MESON_CROSS_PROPERTIES_append = " c_link_args:EFI_LDFLAGS"
+
EXTRA_OEMESON += "-Defi=true \
-Dgnu-efi=true \
-Defi-includedir=${STAGING_INCDIR}/efi \
- -Defi-ldsdir=${STAGING_LIBDIR} \
-Defi-libdir=${STAGING_LIBDIR} \
+ -Defi-ld=${@ d.getVar('LD').split()[0]} \
-Dman=false \
- -Defi-cc='${EFI_CC}' \
- -Defi-ld='${LD}' \
- -Defi-objcopy='${OBJCOPY}' \
"
# install to the image as boot*.efi if its the EFI_PROVIDER,
diff --git a/meta/recipes-core/systemd/systemd-conf_244.1.bb b/meta/recipes-core/systemd/systemd-conf_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-conf_244.1.bb
rename to meta/recipes-core/systemd/systemd-conf_244.3.bb
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index 8c05a96ecc4f..e73b397b5d64 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-SRCREV = "639dc9f4bfd2c09535bee079ae9bc7006b520a66"
+SRCREV = "b7ed902b2394f94e7f1fbe6c3194b5cd9a9429e6"
SRCBRANCH = "v244-stable"
SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
diff --git a/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch b/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
deleted file mode 100644
index e2e19ba06810..000000000000
--- a/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 527413ec243564a89ffaad6368d446de44415970 Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Tue, 27 Feb 2018 21:42:23 -0800
-Subject: [PATCH] Fix to run efi_cc and efi_ld correctly when cross-compiling
-
-When cross-compiling, efi_cc and efi_ld may take the form of
-'xxx-gcc --sysroot=xxx', and this would cause run_command and
-the alike fail.
-
-Fix to split them to make commands run correctly.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/boot/efi/meson.build | 16 +++++++++++++---
- 1 file changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
-index 992a3ba4c..9f9ec4911 100644
---- a/src/boot/efi/meson.build
-+++ b/src/boot/efi/meson.build
-@@ -157,7 +157,7 @@ if have_gnu_efi
- o_file = custom_target(file + '.o',
- input : file,
- output : file + '.o',
-- command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
-+ command : efi_cc.split() + ['-c', '@INPUT@', '-o', '@OUTPUT@']
- + compile_args,
- depend_files : efi_headers)
- if (common_sources + systemd_boot_sources).contains(file)
-@@ -168,7 +168,17 @@ if have_gnu_efi
- endif
- endforeach
-
-- libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
-+ find_libgcc_cmd_all = efi_cc + ' -print-libgcc-file-name'
-+ find_libgcc_cmd = find_libgcc_cmd_all.split()[0]
-+ find_libgcc_args = []
-+ cmd_args_all = find_libgcc_cmd_all.split()
-+ foreach arg : cmd_args_all
-+ if arg != find_libgcc_cmd
-+ find_libgcc_args += arg
-+ endif
-+ endforeach
-+
-+ libgcc_file_name = run_command(find_libgcc_cmd, find_libgcc_args).stdout().strip()
- systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
- stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
- no_undefined_symbols = find_program('no-undefined-symbols.sh')
-@@ -179,7 +189,7 @@ if have_gnu_efi
- tuple[0],
- input : tuple[2],
- output : tuple[0],
-- command : [efi_ld, '-o', '@OUTPUT@'] +
-+ command : efi_ld.split() + ['-o', '@OUTPUT@'] +
- efi_ldflags + tuple[2] +
- ['-lefi', '-lgnuefi', libgcc_file_name])
-
---
-2.13.0
-
diff --git a/meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch b/meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
deleted file mode 100644
index ed14e25bce66..000000000000
--- a/meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0bf530aac152630500939db31f98d933158fdabd Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Tue, 26 Feb 2019 14:27:49 +0800
-Subject: [PATCH] Revert "meson: print EFI CC configuration nicely"
-
-This reverts commit c512dfb9ac948ddb1ced0dab07b9dac88b198293.
-
-This patch is here because we haven't figured out how to pass
-parameter to efi-cc if it's an array in systemd-boot recipe.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 70fb218..30df834 100644
---- a/meson.build
-+++ b/meson.build
-@@ -3138,7 +3138,7 @@ if conf.get('ENABLE_EFI') == 1
- if have_gnu_efi
- status += [
- 'EFI machine type: @0@'.format(EFI_MACHINE_TYPE_NAME),
-- 'EFI CC @0@'.format(' '.join(efi_cc)),
-+ 'EFI CC @0@'.format(efi_cc),
- 'EFI lib directory: @0@'.format(efi_libdir),
- 'EFI lds directory: @0@'.format(efi_ldsdir),
- 'EFI include directory: @0@'.format(efi_incdir)]
---
-2.7.4
-
diff --git a/meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch b/meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
deleted file mode 100644
index 0d2ebf62bd1f..000000000000
--- a/meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 0030dcbac1a9177ef7a28af209ac67149b899f5f Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Tue, 26 Feb 2019 14:17:25 +0800
-Subject: [PATCH] Revert "meson: use an array option for efi-cc"
-
-This reverts commit 595343fb4c99c2679d347ef7c19debfbfed6342e.
-
-This patch is here because we haven't figured out how to pass
-parameter to efi-cc if it's an array in systemd-boot recipe.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- meson_options.txt | 2 +-
- src/boot/efi/meson.build | 11 ++++++-----
- 2 files changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/meson_options.txt b/meson_options.txt
-index 044bb79..3d28bfd 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -292,7 +292,7 @@ option('dbus', type : 'combo', choices : ['auto', 'true', 'false'],
-
- option('gnu-efi', type : 'combo', choices : ['auto', 'true', 'false'],
- description : 'gnu-efi support for sd-boot')
--option('efi-cc', type : 'array',
-+option('efi-cc', type : 'string',
- description : 'the compiler to use for EFI modules')
- option('efi-ld', type : 'string',
- description : 'the linker to use for EFI modules')
-diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
-index 2140151..d8db3a1 100644
---- a/src/boot/efi/meson.build
-+++ b/src/boot/efi/meson.build
-@@ -34,8 +34,8 @@ stub_sources = '''
-
- if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
- efi_cc = get_option('efi-cc')
-- if efi_cc.length() == 0
-- efi_cc = cc.cmd_array()
-+ if efi_cc == ''
-+ efi_cc = ' '.join(cc.cmd_array())
- endif
- efi_ld = get_option('efi-ld')
- if efi_ld == ''
-@@ -57,7 +57,8 @@ if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
-
- efi_libdir = get_option('efi-libdir')
- if efi_libdir == ''
-- ret = run_command(efi_cc + ['-print-multi-os-directory'])
-+ cmd = 'cd /usr/lib/$(@0@ -print-multi-os-directory) && pwd'.format(efi_cc)
-+ ret = run_command('sh', '-c', cmd)
- if ret.returncode() == 0
- path = join_paths('/usr/lib', ret.stdout().strip())
- ret = run_command('realpath', '-e', path)
-@@ -152,7 +153,7 @@ if have_gnu_efi
- o_file = custom_target(file + '.o',
- input : file,
- output : file + '.o',
-- command : efi_cc + ['-c', '@INPUT@', '-o', '@OUTPUT@']
-+ command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
- + compile_args,
- depend_files : efi_headers)
- if (common_sources + systemd_boot_sources).contains(file)
-@@ -163,7 +164,7 @@ if have_gnu_efi
- endif
- endforeach
-
-- libgcc_file_name = run_command(efi_cc + ['-print-libgcc-file-name']).stdout().strip()
-+ libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
- systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
- stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
- no_undefined_symbols = find_program('no-undefined-symbols.sh')
---
-2.7.4
-
diff --git a/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch b/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
deleted file mode 100644
index 7d764b4115eb..000000000000
--- a/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 3f37ad5e083dcad51c21c1050b2829b70d240b52 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 6 Aug 2019 03:10:20 +0000
-Subject: [PATCH] meson: Add -Defi-objcopy option to specify objcopy
-
-This helps in cross compiling for x86 target on a aarch64 host e.g.
-Fixes
-TOPDIR/build/tmp/hosttools/objcopy:src/boot/efi/systemd_boot.so: Invalid bfd target
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- meson_options.txt | 2 ++
- src/boot/efi/meson.build | 5 ++++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/meson_options.txt b/meson_options.txt
-index d4ec37dda2..dc1c96e112 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -296,6 +296,8 @@ option('efi-cc', type : 'array',
- description : 'the compiler to use for EFI modules')
- option('efi-ld', type : 'string',
- description : 'the linker to use for EFI modules')
-+option('efi-objcopy', type : 'string',
-+ description : 'the objcopy to use for EFI')
- option('efi-libdir', type : 'string',
- description : 'path to the EFI lib directory')
- option('efi-ldsdir', type : 'string',
-diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
-index 0ae3191635..5a7137bc84 100644
---- a/src/boot/efi/meson.build
-+++ b/src/boot/efi/meson.build
-@@ -88,7 +88,10 @@ if have_gnu_efi
- output : 'efi_config.h',
- configuration : efi_conf)
-
-- objcopy = find_program('objcopy')
-+ objcopy = get_option('efi-objcopy')
-+ if objcopy == ''
-+ objcopy = find_program('objcopy', required: true)
-+ endif
-
- efi_ldsdir = get_option('efi-ldsdir')
- arch_lds = 'elf_@0@_efi.lds'.format(gnu_efi_path_arch)
---
-2.17.1
-
diff --git a/meta/recipes-core/systemd/systemd_244.1.bb b/meta/recipes-core/systemd/systemd_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd_244.1.bb
rename to meta/recipes-core/systemd/systemd_244.3.bb
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross
2020-02-15 9:44 [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross Alex Kiernan
2020-02-15 9:44 ` [PATCH v4 2/2] systemd: upgrade v244.1 -> v244.3 Alex Kiernan
@ 2020-02-15 21:18 ` Khem Raj
2020-02-15 21:39 ` Alex Kiernan
1 sibling, 1 reply; 5+ messages in thread
From: Khem Raj @ 2020-02-15 21:18 UTC (permalink / raw)
To: openembedded-core
On 2/15/20 1:44 AM, Alex Kiernan wrote:
> Add MESON_CROSS_BINARIES, MESON_CROSS_PROPERTIES as a colon separated
> list of meson properties which are exported into meson.cross.
>
I am seeing errors
13:14:54 File
"/mnt/jenkins/workspace/yocto-world-glibc/sources/openembedded-core/meta/classes/meson.bbclass",
line 130
13:14:54 echo "[properties]" > ${WORKDIR}/meson-tracker.cross
13:14:54 ^
13:14:54 SyntaxError: invalid syntax
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
>
> Changes in v4: None
> Changes in v3:
> - new
>
> Changes in v2: None
>
> meta/classes/meson.bbclass | 161 ++++++++++++++++++++-----------------
> 1 file changed, 86 insertions(+), 75 deletions(-)
>
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> index 06034e8b4731..e778e37d7f69 100644
> --- a/meta/classes/meson.bbclass
> +++ b/meta/classes/meson.bbclass
> @@ -34,88 +34,99 @@ MESON_CROSS_FILE = ""
> MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
> MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
>
> -def meson_array(var, d):
> - items = d.getVar(var).split()
> - return repr(items[0] if len(items) == 1 else items)
> -
> -# Map our ARCH values to what Meson expects:
> -# http://mesonbuild.com/Reference-tables.html#cpu-families
> -def meson_cpu_family(var, d):
> - import re
> - arch = d.getVar(var)
> - if arch == 'powerpc':
> - return 'ppc'
> - elif arch == 'powerpc64' or arch == 'powerpc64le':
> - return 'ppc64'
> - elif arch == 'armeb':
> - return 'arm'
> - elif arch == 'aarch64_be':
> - return 'aarch64'
> - elif arch == 'mipsel':
> - return 'mips'
> - elif arch == 'mips64el':
> - return 'mips64'
> - elif re.match(r"i[3-6]86", arch):
> - return "x86"
> - elif arch == "microblazeel":
> - return "microblaze"
> - else:
> - return arch
> -
> -# Map our OS values to what Meson expects:
> -# https://mesonbuild.com/Reference-tables.html#operating-system-names
> -def meson_operating_system(var, d):
> - os = d.getVar(var)
> - if "mingw" in os:
> - return "windows"
> - else:
> - return os
> -
> -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))
> +MESON_CROSS_BINARIES ??= "c:CC \
> + cpp:CXX \
> + ar:AR \
> + nm:NM \
> + strip:STRIP \
> + readelf:READELF"
> +
> +MESON_CROSS_PROPERTIES ??= "c_args:CFLAGS \
> + c_link_args:LDFLAGS \
> + cpp_args:CXXFLAGS \
> + cpp_link_args:LDFLAGS"
>
> addtask write_config before do_configure
> -do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS"
> -do_write_config() {
> - # This needs to be Py to split the args into single-element lists
> - cat >${WORKDIR}/meson.cross <<EOF
> +python do_write_config() {
> + def meson_array(var):
> + items = d.getVar(var).split()
> + return repr(items[0] if len(items) == 1 else items)
> +
> + # Map our ARCH values to what Meson expects:
> + # http://mesonbuild.com/Reference-tables.html#cpu-families
> + def meson_cpu_family(var):
> + import re
> + arch = d.getVar(var)
> + if arch == 'powerpc':
> + return 'ppc'
> + elif arch == 'powerpc64' or arch == 'powerpc64le':
> + return 'ppc64'
> + elif arch == 'armeb':
> + return 'arm'
> + elif arch == 'aarch64_be':
> + return 'aarch64'
> + elif arch == 'mipsel':
> + return 'mips'
> + elif arch == 'mips64el':
> + return 'mips64'
> + elif re.match(r"i[3-6]86", arch):
> + return "x86"
> + elif arch == "microblazeel":
> + return "microblaze"
> + else:
> + return arch
> +
> + # Map our OS values to what Meson expects:
> + # https://mesonbuild.com/Reference-tables.html#operating-system-names
> + def meson_operating_system(var):
> + os = d.getVar(var)
> + if "mingw" in os:
> + return "windows"
> + else:
> + return os
> +
> + def meson_endian(prefix):
> + 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))
> +
> + def meson_write_props(var, f):
> + for property in d.getVar(var).split():
> + (k, v) = property.split(':')
> + print("{} = {}".format(k, meson_array(v)), file=f)
> + d.appendVarFlag("do_write_config", "vardeps", v)
> +
> + with open(oe.path.join(d.getVar('WORKDIR'), "meson.cross"), "w") as f:
> + print("""\
> [binaries]
> -c = ${@meson_array('CC', d)}
> -cpp = ${@meson_array('CXX', d)}
> -ar = ${@meson_array('AR', d)}
> -nm = ${@meson_array('NM', d)}
> -strip = ${@meson_array('STRIP', d)}
> -readelf = ${@meson_array('READELF', d)}
> pkgconfig = 'pkg-config'
> -llvm-config = 'llvm-config${LLVMVERSION}'
> +llvm-config = 'llvm-config{}'""".format(d.getVar("LLVMVERSION")), file=f)
> +
> + meson_write_props('MESON_CROSS_BINARIES', f)
>
> + print("""\
> [properties]
> needs_exe_wrapper = true
> -c_args = ${@meson_array('CFLAGS', d)}
> -c_link_args = ${@meson_array('LDFLAGS', d)}
> -cpp_args = ${@meson_array('CXXFLAGS', d)}
> -cpp_link_args = ${@meson_array('LDFLAGS', d)}
> -gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
> -
> -[host_machine]
> -system = '${@meson_operating_system('HOST_OS', d)}'
> -cpu_family = '${@meson_cpu_family('HOST_ARCH', d)}'
> -cpu = '${HOST_ARCH}'
> -endian = '${@meson_endian('HOST', d)}'
> -
> -[target_machine]
> -system = '${@meson_operating_system('TARGET_OS', d)}'
> -cpu_family = '${@meson_cpu_family('TARGET_ARCH', d)}'
> -cpu = '${TARGET_ARCH}'
> -endian = '${@meson_endian('TARGET', d)}'
> -EOF
> +gtkdoc_exe_wrapper = '{}/gtkdoc-qemuwrapper'""".format(d.getVar('B')), file=f)
> +
> + meson_write_props('MESON_CROSS_PROPERTIES', f)
> +
> + print("[host_machine]", file=f)
> + print("system = '{}'".format(meson_operating_system('HOST_OS')), file=f)
> + print("cpu_family = '{}'".format(meson_cpu_family('HOST_ARCH')), file=f)
> + print("cpu = '{}'".format(d.getVar('HOST_ARCH')), file=f)
> + print("endian = '{}'".format(meson_endian('HOST')), file=f)
> +
> + print("[target_machine]", file=f)
> + print("system = '{}'".format(meson_operating_system('TARGET_OS')), file=f)
> + print("cpu_family = '{}'".format(meson_cpu_family('TARGET_ARCH')), file=f)
> + print("cpu = '{}'".format(d.getVar('TARGET_ARCH')), file=f)
> + print("endian = '{}'".format(meson_endian('TARGET')), file=f)
> }
>
> CONFIGURE_FILES = "meson.build"
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross
2020-02-15 21:18 ` [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross Khem Raj
@ 2020-02-15 21:39 ` Alex Kiernan
2020-02-15 23:06 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Alex Kiernan @ 2020-02-15 21:39 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On Sat, Feb 15, 2020 at 9:18 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On 2/15/20 1:44 AM, Alex Kiernan wrote:
> > Add MESON_CROSS_BINARIES, MESON_CROSS_PROPERTIES as a colon separated
> > list of meson properties which are exported into meson.cross.
> >
>
> I am seeing errors
>
> 13:14:54 File
> "/mnt/jenkins/workspace/yocto-world-glibc/sources/openembedded-core/meta/classes/meson.bbclass",
> line 130
> 13:14:54 echo "[properties]" > ${WORKDIR}/meson-tracker.cross
> 13:14:54 ^
> 13:14:54 SyntaxError: invalid syntax
>
Is that tracker from meta-gnome?
--
Alex Kiernan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross
2020-02-15 21:39 ` Alex Kiernan
@ 2020-02-15 23:06 ` Khem Raj
0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2020-02-15 23:06 UTC (permalink / raw)
To: Alex Kiernan; +Cc: Patches and discussions about the oe-core layer
On Sat, Feb 15, 2020 at 1:39 PM Alex Kiernan <alex.kiernan@gmail.com> wrote:
>
> On Sat, Feb 15, 2020 at 9:18 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On 2/15/20 1:44 AM, Alex Kiernan wrote:
> > > Add MESON_CROSS_BINARIES, MESON_CROSS_PROPERTIES as a colon separated
> > > list of meson properties which are exported into meson.cross.
> > >
> >
> > I am seeing errors
> >
> > 13:14:54 File
> > "/mnt/jenkins/workspace/yocto-world-glibc/sources/openembedded-core/meta/classes/meson.bbclass",
> > line 130
> > 13:14:54 echo "[properties]" > ${WORKDIR}/meson-tracker.cross
> > 13:14:54 ^
> > 13:14:54 SyntaxError: invalid syntax
> >
>
> Is that tracker from meta-gnome?
yes.
>
>
> --
> Alex Kiernan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-15 23:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-15 9:44 [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross Alex Kiernan
2020-02-15 9:44 ` [PATCH v4 2/2] systemd: upgrade v244.1 -> v244.3 Alex Kiernan
2020-02-15 21:18 ` [PATCH v4 1/2] meson.bbclass: Parameterise meson.cross Khem Raj
2020-02-15 21:39 ` Alex Kiernan
2020-02-15 23:06 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.