From patchwork Thu Aug 10 16:24:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 28667 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48063C04E69 for ; Thu, 10 Aug 2023 16:24:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.21982.1691684694917875590 for ; Thu, 10 Aug 2023 09:24:55 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9369D75; Thu, 10 Aug 2023 09:25:36 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CFF463F6C4; Thu, 10 Aug 2023 09:24:53 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 1/9] meson.bbclass: add MESON_TARGET Date: Thu, 10 Aug 2023 17:24:43 +0100 Message-Id: <20230810162451.1766532-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Aug 2023 16:24:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185802 From: Ross Burton Add a variable to control what target gets built in do_compile. By default this value is unset so meson builds the default target, but by setting MESON_TARGET a specific target can be built. Signed-off-by: Ross Burton --- meta/classes-recipe/meson.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass index 7f5e9b19433..582b41a91b1 100644 --- a/meta/classes-recipe/meson.bbclass +++ b/meta/classes-recipe/meson.bbclass @@ -20,6 +20,9 @@ do_configure[cleandirs] = "${B}" # Where the meson.build build configuration is MESON_SOURCEPATH = "${S}" +# The target to build in do_compile. If unset the default targets are built. +MESON_TARGET ?= "" + def noprefix(var, d): return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1) @@ -170,7 +173,7 @@ do_configure[postfuncs] += "meson_do_qa_configure" do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+" meson_do_compile() { - meson compile -v ${PARALLEL_MAKE} + meson compile -v ${PARALLEL_MAKE} ${MESON_TARGET} } meson_do_install() { From patchwork Thu Aug 10 16:24:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 28665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A67FC41513 for ; Thu, 10 Aug 2023 16:24:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.21983.1691684695501239263 for ; Thu, 10 Aug 2023 09:24:55 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 92904113E; Thu, 10 Aug 2023 09:25:37 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 99E5E3F6C4; Thu, 10 Aug 2023 09:24:54 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 2/9] meson.bbclass:: update do_write_config vardeps Date: Thu, 10 Aug 2023 17:24:44 +0100 Message-Id: <20230810162451.1766532-2-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810162451.1766532-1-ross.burton@arm.com> References: <20230810162451.1766532-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Aug 2023 16:24:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185803 From: Ross Burton Add OBJCOPY and EXEWRAPPER_ENABLED, remove LD as it isn't used anymore. Signed-off-by: Ross Burton --- meta/classes-recipe/meson.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass index 582b41a91b1..d08a83d555f 100644 --- a/meta/classes-recipe/meson.bbclass +++ b/meta/classes-recipe/meson.bbclass @@ -61,7 +61,7 @@ def rust_tool(d, target_var): return "rust = %s" % repr(cmd) addtask write_config before do_configure -do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS RUSTC RUSTFLAGS" +do_write_config[vardeps] += "CC CXX AR NM STRIP READELF OBJCOPY CFLAGS CXXFLAGS LDFLAGS RUSTC RUSTFLAGS EXEWRAPPER_ENABLED" do_write_config() { # This needs to be Py to split the args into single-element lists cat >${WORKDIR}/meson.cross < X-Patchwork-Id: 28666 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5118BC001B0 for ; Thu, 10 Aug 2023 16:24:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.21986.1691684696353983414 for ; Thu, 10 Aug 2023 09:24:56 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E4E7D75; Thu, 10 Aug 2023 09:25:38 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 631993F6C4; Thu, 10 Aug 2023 09:24:55 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 3/9] systemd-boot: use MESON_TARGET Date: Thu, 10 Aug 2023 17:24:45 +0100 Message-Id: <20230810162451.1766532-3-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810162451.1766532-1-ross.burton@arm.com> References: <20230810162451.1766532-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Aug 2023 16:24:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185804 From: Ross Burton Instead of re-implementing do_compile, use MESON_TARGET. Signed-off-by: Ross Burton --- meta/recipes-core/systemd/systemd-boot_254.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb b/meta/recipes-core/systemd/systemd-boot_254.bb index 5d69cf83abc..43eb05ade84 100644 --- a/meta/recipes-core/systemd/systemd-boot_254.bb +++ b/meta/recipes-core/systemd/systemd-boot_254.bb @@ -23,6 +23,8 @@ c_ld = ${@meson_array('EFI_LD', d)} EOF } +MESON_TARGET = "systemd-boot" + EXTRA_OEMESON += "-Defi=true \ -Dbootloader=true \ -Dman=false \ @@ -52,10 +54,6 @@ TUNE_CCARGS:remove = "-mfpmath=sse" COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux" COMPATIBLE_HOST:x86-x32 = "null" -do_compile() { - ninja systemd-boot -} - do_install() { install -d ${D}${EFI_FILES_PATH} install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE} From patchwork Thu Aug 10 16:24:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 28669 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45625C41513 for ; Thu, 10 Aug 2023 16:25:07 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.21987.1691684697169720966 for ; Thu, 10 Aug 2023 09:24:57 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 31280113E; Thu, 10 Aug 2023 09:25:39 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 405653F6C4; Thu, 10 Aug 2023 09:24:56 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 4/9] systemd-boot: improve cross file generation Date: Thu, 10 Aug 2023 17:24:46 +0100 Message-Id: <20230810162451.1766532-4-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810162451.1766532-1-ross.burton@arm.com> References: <20230810162451.1766532-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Aug 2023 16:25:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185805 From: Ross Burton The meson.cross generated by the class already has c and objcopy entries, so these can be removed. Pass the --cross-file option in MESON_CROSS_FILE to ensure the ordering is always correct. Signed-off-by: Ross Burton --- meta/recipes-core/systemd/systemd-boot_254.bb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb b/meta/recipes-core/systemd/systemd-boot_254.bb index 43eb05ade84..4fee99beada 100644 --- a/meta/recipes-core/systemd/systemd-boot_254.bb +++ b/meta/recipes-core/systemd/systemd-boot_254.bb @@ -13,22 +13,21 @@ LDFLAGS:prepend = "${@ " ".join(d.getVar('LD').split()[1:])} " EFI_LD = "bfd" LDFLAGS:append = " -fuse-ld=${EFI_LD}" -do_write_config[vardeps] += "CC OBJCOPY EFI_LD" +do_write_config[vardeps] += "EFI_LD" do_write_config:append() { cat >${WORKDIR}/meson-${PN}.cross < X-Patchwork-Id: 28673 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64BE0C001B0 for ; Thu, 10 Aug 2023 16:25:07 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.21889.1691684697800957576 for ; Thu, 10 Aug 2023 09:24:58 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ECC46D75; Thu, 10 Aug 2023 09:25:39 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 00EFB3F6C4; Thu, 10 Aug 2023 09:24:56 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 5/9] meson: add back warning when default value for external properties are used Date: Thu, 10 Aug 2023 17:24:47 +0100 Message-Id: <20230810162451.1766532-5-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810162451.1766532-1-ross.burton@arm.com> References: <20230810162451.1766532-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Aug 2023 16:25:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185806 From: Ross Burton This is adding back a warning that was removed in the upgrade to Meson 0.58 (cb2a7dcc) as source evolution meant the patch didn't apply. Meson scripts which want to identify runtime behaviour often use external properties (meson.get_external_property(), set via the cross and native files) to define default behaviour if they can't run code at configure time. These defaults may or may not be correct, so emit a warning that this is happening. The recipe should then provide a cross file fragment which sets the value appropriately. In the long term I hope to be able to remove this patch as Meson evolves cc.run() to support fallback values directly, and Meson will log the use of defaults itself. Signed-off-by: Ross Burton --- .../meson/meson/default.patch | 24 +++++++++++++++++++ meta/recipes-devtools/meson/meson_1.1.1.bb | 1 + 2 files changed, 25 insertions(+) create mode 100644 meta/recipes-devtools/meson/meson/default.patch diff --git a/meta/recipes-devtools/meson/meson/default.patch b/meta/recipes-devtools/meson/meson/default.patch new file mode 100644 index 00000000000..60adfc8cf4d --- /dev/null +++ b/meta/recipes-devtools/meson/meson/default.patch @@ -0,0 +1,24 @@ +Emit a warning if a cross property is used (via meson.get_external_property()) +without an explicit value being set. + +All default values should be validated to be sure that they're correct, so if we +emit a warning in Meson then meson.bbclass can catch and expose it. + +This is inappropriate as upstream are thinking about improving how cc.run() +handles the cross case. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +diff --git a/mesonbuild/interpreter/mesonmain.py b/mesonbuild/interpreter/mesonmain.py +index 01d0029a7..936b03fbf 100644 +--- a/mesonbuild/interpreter/mesonmain.py ++++ b/mesonbuild/interpreter/mesonmain.py +@@ -416,6 +416,7 @@ class MesonMain(MesonInterpreterObject): + return self.interpreter.environment.properties[machine][propname] + except KeyError: + if fallback is not None: ++ mlog.warning(f"Cross property {propname} is using default value {fallback}") + return fallback + raise InterpreterException(f'Unknown property for {machine.get_lower_case_name()} machine: {propname}') + diff --git a/meta/recipes-devtools/meson/meson_1.1.1.bb b/meta/recipes-devtools/meson/meson_1.1.1.bb index 500e13775f4..d017d2dccd9 100644 --- a/meta/recipes-devtools/meson/meson_1.1.1.bb +++ b/meta/recipes-devtools/meson/meson_1.1.1.bb @@ -14,6 +14,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/meson-${PV}.tar.gz \ file://0001-python-module-do-not-manipulate-the-environment-when.patch \ file://0001-Make-CPU-family-warnings-fatal.patch \ file://0002-Support-building-allarch-recipes-again.patch \ + file://default.patch \ " SRC_URI[sha256sum] = "d04b541f97ca439fb82fab7d0d480988be4bd4e62563a5ca35fadb5400727b1c" From patchwork Thu Aug 10 16:24:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 28672 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 512F4C04FE0 for ; Thu, 10 Aug 2023 16:25:07 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.21892.1691684698542267715 for ; Thu, 10 Aug 2023 09:24:58 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AD5B0113E; Thu, 10 Aug 2023 09:25:40 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BDA643F6C4; Thu, 10 Aug 2023 09:24:57 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 6/9] p11-kit: fix build without qemu-usermode Date: Thu, 10 Aug 2023 17:24:48 +0100 Message-Id: <20230810162451.1766532-6-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810162451.1766532-1-ross.burton@arm.com> References: <20230810162451.1766532-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Aug 2023 16:25:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185807 From: Ross Burton If qemu-usermode is not available then p11-kit fails to configure: meson.build:313:24: ERROR: Can not run test applications in this cross environment. This has already been fixed upstream, so backport the patches. Signed-off-by: Ross Burton --- .../p11-kit/files/strerror-1.patch | 76 +++++++++++++++++++ .../p11-kit/files/strerror-2.patch | 30 ++++++++ .../recipes-support/p11-kit/p11-kit_0.25.0.bb | 4 +- 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/p11-kit/files/strerror-1.patch create mode 100644 meta/recipes-support/p11-kit/files/strerror-2.patch diff --git a/meta/recipes-support/p11-kit/files/strerror-1.patch b/meta/recipes-support/p11-kit/files/strerror-1.patch new file mode 100644 index 00000000000..6af4fee7249 --- /dev/null +++ b/meta/recipes-support/p11-kit/files/strerror-1.patch @@ -0,0 +1,76 @@ +From 3ba2c55dfdc8ff20de369f07f6c57d08718d3add Mon Sep 17 00:00:00 2001 +From: Adam Sampson +Date: Sun, 2 Jul 2023 15:22:49 +0100 +Subject: [PATCH] Check for GNU strerror_r using the compiler only + +The new test that was added to distinguish GNU/XSI strerror_r ran a +compiled program, which doesn't work when cross-compiling. The only +difference at compile time is that the GNU version returns char * and +the XSI version returns int, so detect it by compiling a program that +dereferences the return value. + +Signed-off-by: Adam Sampson + +Upstream-Status: Backport +Signed-off-by: Ross Burton +--- + configure.ac | 19 +++++++------------ + meson.build | 10 +++++----- + 2 files changed, 12 insertions(+), 17 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 40f5a583..29890622 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -146,19 +146,14 @@ if test "$os_unix" = "yes"; then + + AC_CHECK_FUNC( + [strerror_r], +- [AC_RUN_IFELSE( +- [AC_LANG_SOURCE([[ +- #include +- #include +- +- int main (void) +- { +- char buf[32]; +- return strerror_r (EINVAL, buf, 32); +- } +- ]])], +- [AC_DEFINE([HAVE_XSI_STRERROR_R], 1, [Whether XSI-compliant strerror_r() is available])], ++ [AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM([[#include ++ #include ]], ++ [[/* GNU strerror_r returns char *, XSI returns int */ ++ char buf[32]; ++ return *strerror_r (EINVAL, buf, 32);]])], + [AC_DEFINE([HAVE_GNU_STRERROR_R], 1, [Whether GNU-specific strerror_r() is available])], ++ [AC_DEFINE([HAVE_XSI_STRERROR_R], 1, [Whether XSI-compliant strerror_r() is available])], + [])], + []) + +diff --git a/meson.build b/meson.build +index 0f8c8da0..4cc3f89a 100644 +--- a/meson.build ++++ b/meson.build +@@ -306,15 +306,15 @@ if cc.has_function('strerror_r', prefix: '#include ') + + int main (void) + { ++ /* GNU strerror_r returns char *, XSI returns int */ + char buf[32]; +- return strerror_r (EINVAL, buf, 32); ++ return *strerror_r (EINVAL, buf, 32); + } + ''' +- strerror_r_check = cc.run(strerror_r_code, name : 'strerror_r check') +- if strerror_r_check.returncode() == 0 +- conf.set('HAVE_XSI_STRERROR_R', 1) +- else ++ if cc.compiles(strerror_r_code, name : 'GNU strerror_r check') + conf.set('HAVE_GNU_STRERROR_R', 1) ++ else ++ conf.set('HAVE_XSI_STRERROR_R', 1) + endif + endif + diff --git a/meta/recipes-support/p11-kit/files/strerror-2.patch b/meta/recipes-support/p11-kit/files/strerror-2.patch new file mode 100644 index 00000000000..1a9180b508c --- /dev/null +++ b/meta/recipes-support/p11-kit/files/strerror-2.patch @@ -0,0 +1,30 @@ +From 7aa6251bf4ce36d027d53c9c96bb05f90ef7eb5b Mon Sep 17 00:00:00 2001 +From: Adam Sampson +Date: Sun, 2 Jul 2023 15:44:06 +0100 +Subject: [PATCH] Define _GNU_SOURCE when testing for strerror_r + +The Meson check for GNU/XSI strerror_r didn't inherit the project +options that include _GNU_SOURCE (unlike the autoconf version), so the +result didn't match how the code that uses it will be compiled. Add +_GNU_SOURCE explicitly as with the following checks. + +Signed-off-by: Adam Sampson + +Upstream-Status: Backport +Signed-off-by: Ross Burton +--- + meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/meson.build b/meson.build +index 4cc3f89a..9a72e148 100644 +--- a/meson.build ++++ b/meson.build +@@ -301,6 +301,7 @@ endforeach + + if cc.has_function('strerror_r', prefix: '#include ') + strerror_r_code = ''' ++#define _GNU_SOURCE + #include + #include + diff --git a/meta/recipes-support/p11-kit/p11-kit_0.25.0.bb b/meta/recipes-support/p11-kit/p11-kit_0.25.0.bb index ad207d0c9fd..ad1fda3f3b7 100644 --- a/meta/recipes-support/p11-kit/p11-kit_0.25.0.bb +++ b/meta/recipes-support/p11-kit/p11-kit_0.25.0.bb @@ -10,7 +10,9 @@ DEPENDS = "libtasn1 libtasn1-native libffi" DEPENDS:append = "${@' glib-2.0' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}" -SRC_URI = "git://github.com/p11-glue/p11-kit;branch=master;protocol=https" +SRC_URI = "git://github.com/p11-glue/p11-kit;branch=master;protocol=https \ + file://strerror-1.patch \ + file://strerror-2.patch" SRCREV = "a8cce8bd8065bbf80bd47219f85f0cd9cf27dd0c" S = "${WORKDIR}/git" From patchwork Thu Aug 10 16:24:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 28670 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46522C04E69 for ; Thu, 10 Aug 2023 16:25:07 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.21894.1691684699319442751 for ; Thu, 10 Aug 2023 09:24:59 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E34FD75; Thu, 10 Aug 2023 09:25:41 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7E33F3F793; Thu, 10 Aug 2023 09:24:58 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 7/9] gi-docgen: depend on qemu-usermode MACHINE_FEATURES Date: Thu, 10 Aug 2023 17:24:49 +0100 Message-Id: <20230810162451.1766532-7-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810162451.1766532-1-ross.burton@arm.com> References: <20230810162451.1766532-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Aug 2023 16:25:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185808 From: Ross Burton gi-docgen uses GObject Introspection, so depends on qemu-usermode working. Signed-off-by: Ross Burton --- meta/classes-recipe/gi-docgen.bbclass | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meta/classes-recipe/gi-docgen.bbclass b/meta/classes-recipe/gi-docgen.bbclass index b4d7b177610..b178d1c3877 100644 --- a/meta/classes-recipe/gi-docgen.bbclass +++ b/meta/classes-recipe/gi-docgen.bbclass @@ -8,9 +8,10 @@ # seems to be a successor to gtk-doc: # https://gitlab.gnome.org/GNOME/gi-docgen -# This variable is set to True if api-documentation and -# gobject-introspection-data are in DISTRO_FEATURES, False otherwise. -GIDOCGEN_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation gobject-introspection-data', 'True', 'False', d)}" +# True if api-documentation and gobject-introspection-data are in DISTRO_FEATURES, +# and qemu-user is in MACHINE_FEATURES, False otherwise. +GIDOCGEN_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation gobject-introspection-data', \ + bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}" # When building native recipes, disable gi-docgen, as it is not necessary, # pulls in additional dependencies, and makes build times longer From patchwork Thu Aug 10 16:24:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 28668 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4166EC04A6A for ; Thu, 10 Aug 2023 16:25:07 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.21990.1691684700085689283 for ; Thu, 10 Aug 2023 09:25:00 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 36DE1113E; Thu, 10 Aug 2023 09:25:42 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3E53A3F6C4; Thu, 10 Aug 2023 09:24:59 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 8/9] python3-pygobject: add explicit check for qemu-usermode MACHINE_FEATURE Date: Thu, 10 Aug 2023 17:24:50 +0100 Message-Id: <20230810162451.1766532-8-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810162451.1766532-1-ross.burton@arm.com> References: <20230810162451.1766532-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Aug 2023 16:25:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185809 From: Ross Burton When building for the target this recipe absolutely needs gobject-introspection to be enabled, so add an explict --- meta/recipes-devtools/python/python3-pygobject_3.44.1.bb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb b/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb index 6f7d9a09ecd..797a7cec8ba 100644 --- a/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb +++ b/meta/recipes-devtools/python/python3-pygobject_3.44.1.bb @@ -8,9 +8,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7" GNOMEBASEBUILDCLASS = "meson" GIR_MESON_OPTION = "" -inherit gnomebase setuptools3-base gobject-introspection upstream-version-is-even features_check +inherit gnomebase setuptools3-base gobject-introspection upstream-version-is-even -REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" +python() { + if d.getVar('CLASSOVERRIDE') == "class-target" and not bb.utils.to_boolean(d.getVar("GI_DATA_ENABLED")): + raise bb.parse.SkipRecipe("GI not available") +} DEPENDS += "python3 glib-2.0" From patchwork Thu Aug 10 16:24:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 28671 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51243C04FDF for ; Thu, 10 Aug 2023 16:25:07 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.21896.1691684700869491669 for ; Thu, 10 Aug 2023 09:25:00 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EB2CFD75; Thu, 10 Aug 2023 09:25:42 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 075093F6C4; Thu, 10 Aug 2023 09:24:59 -0700 (PDT) From: ross.burton@arm.com To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH 9/9] graphene: fix runtime detection of IEEE754 behaviour Date: Thu, 10 Aug 2023 17:24:51 +0100 Message-Id: <20230810162451.1766532-9-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810162451.1766532-1-ross.burton@arm.com> References: <20230810162451.1766532-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 10 Aug 2023 16:25:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/185810 From: Ross Burton Graphene gates a runtime check on whether it is cross-compiling, when it should be whether it can run target binaries. Signed-off-by: Ross Burton --- .../graphene/files/float-div.patch | 28 +++++++++++++++++++ .../graphene/graphene_1.10.8.bb | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 meta/recipes-graphics/graphene/files/float-div.patch diff --git a/meta/recipes-graphics/graphene/files/float-div.patch b/meta/recipes-graphics/graphene/files/float-div.patch new file mode 100644 index 00000000000..bf74101b1c7 --- /dev/null +++ b/meta/recipes-graphics/graphene/files/float-div.patch @@ -0,0 +1,28 @@ +From c19d1f4a7e44e071df3a2612ae2eb20c84e831a6 Mon Sep 17 00:00:00 2001 +From: Emmanuele Bassi +Date: Thu, 10 Aug 2023 12:44:49 +0100 +Subject: [PATCH] build: Allow host builds when cross-compiling + +Environments that set up execution wrappers when cross-compiling should +be allowed to run code. We only fall back on external properties if we +really can't run any native code on the host machine. + +Upstream-Status: Backport +Signed-off-by: Ross Burton +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 48f22d7..7dcb9e6 100644 +--- a/meson.build ++++ b/meson.build +@@ -270,7 +270,7 @@ int main() { + return 0; + } + ''' +-if meson.is_cross_build() ++if not meson.can_run_host_binaries() + ieee754_float_div = meson.get_external_property('ieee754_float_div', cc.get_id() in ['gcc', 'clang']) + message('Cross-building, assuming IEEE 754 division:', ieee754_float_div) + else diff --git a/meta/recipes-graphics/graphene/graphene_1.10.8.bb b/meta/recipes-graphics/graphene/graphene_1.10.8.bb index 9f5b4d0e2d3..55d8a2d74ee 100644 --- a/meta/recipes-graphics/graphene/graphene_1.10.8.bb +++ b/meta/recipes-graphics/graphene/graphene_1.10.8.bb @@ -7,6 +7,8 @@ GNOMEBASEBUILDCLASS = "meson" inherit gnomebase gobject-introspection gtk-doc +SRC_URI += "file://float-div.patch" + SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da31dfde2928f279a" # Disable neon support by default on ARM-32 platforms because of the