From patchwork Mon Apr 27 13:08:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joao Marcos Costa X-Patchwork-Id: 87002 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 98494FF885E for ; Mon, 27 Apr 2026 13:09:03 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.44506.1777295340079690461 for ; Mon, 27 Apr 2026 06:09:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=T4QTx1pq; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 7DEC51A3442 for ; Mon, 27 Apr 2026 13:08:58 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 56354600D1; Mon, 27 Apr 2026 13:08:58 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 43B8B107281E7; Mon, 27 Apr 2026 15:08:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1777295337; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=2fkPzl+con9kugrmH+thE3dzpftTmdgHovImi84e350=; b=T4QTx1pqYeG2ThpFziy30lz9O6XnOHigzt/F/CwKzJKA5l8fV0G/+cZdcZB2OEq55QSgsX sNPTFTiKUKE7y6yLrH/fIDggUhqNTSXsTXmA6ZVejPWnvIuUAThROiresMuVXBQp4aPopt crbAOAVOsu7EXU+TEsq6LZUFviW+6h2wTL7KFTapBlV8jjkGnrKuFNfFAeUREtBDy2k5cM nzO4P3C9hFH4ZyExYah4R4+U80RjVa/e91KvBJUqVMpkt+j/SOeHITBysmcn0oxHShyODL 6QGWrZE/cQrRZOB013BnY0rt7phQ5I0CVbHmbUTWdCfv7uFf+lqAIOrNgqwVOA== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, quentin.schulz@cherry.de, qi.chen@windriver.com, =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= Subject: [PATCH v2 1/3] meta: simplify conditional operations with bb.utils.filter Date: Mon, 27 Apr 2026 15:08:44 +0200 Message-ID: <20260427130846.96013-2-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260427130846.96013-1-joaomarcos.costa@bootlin.com> References: <20260427130846.96013-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 27 Apr 2026 13:09:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/236009 Some recipes use bb.utils.contains to check for a string inside a variable, and return the exact same string if true. This can be simplified by a call to bb.utils.filter, since the result is the same, and the inline is shorter. Replace "bb.utils.contains(A, 'a', 'a', '', d)" by "bb.utils.filter(A, 'a', d)". Signed-off-by: João Marcos Costa Reviewed-by: Quentin Schulz --- meta/recipes-connectivity/connman/connman_2.0.bb | 2 +- meta/recipes-core/coreutils/coreutils_9.10.bb | 2 +- meta/recipes-core/ovmf/ovmf_git.bb | 2 +- meta/recipes-extended/at/at_3.2.5.bb | 2 +- meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb | 2 +- meta/recipes-graphics/waffle/waffle_1.8.1.bb | 2 +- .../gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/recipes-connectivity/connman/connman_2.0.bb b/meta/recipes-connectivity/connman/connman_2.0.bb index 6f7093301b..e9873f3163 100644 --- a/meta/recipes-connectivity/connman/connman_2.0.bb +++ b/meta/recipes-connectivity/connman/connman_2.0.bb @@ -169,7 +169,7 @@ FILES:${PN}-tools = "${bindir}/wispr" RDEPENDS:${PN}-tools = "${PN}" FILES:${PN}-tests = "${bindir}/*-test" -RDEPENDS:${PN}-tests = "${@bb.utils.contains('PACKAGECONFIG', 'iptables', 'iptables', '', d)}" +RDEPENDS:${PN}-tests = "${@bb.utils.filter('PACKAGECONFIG', 'iptables', d)}" FILES:${PN}-client = "${bindir}/connmanctl" RDEPENDS:${PN}-client = "${PN}" diff --git a/meta/recipes-core/coreutils/coreutils_9.10.bb b/meta/recipes-core/coreutils/coreutils_9.10.bb index 984c5b5292..744d930272 100644 --- a/meta/recipes-core/coreutils/coreutils_9.10.bb +++ b/meta/recipes-core/coreutils/coreutils_9.10.bb @@ -222,6 +222,6 @@ do_install_ptest:append:libc-musl () { } RDEPENDS:${PN}-ptest += "xz \ - ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'acl', '', d)} \ + ${@bb.utils.filter('PACKAGECONFIG', 'acl', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'xattr', 'attr', '', d)}" FILES:${PN}-ptest += "${bindir}/getlimits" diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb index d731bca7f2..38d5d090b4 100644 --- a/meta/recipes-core/ovmf/ovmf_git.bb +++ b/meta/recipes-core/ovmf/ovmf_git.bb @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://OvmfPkg/License.txt;md5=06357ddc23f46577c2aeaeaf7b776 # compiling OVMF twice, so it is disabled by default. Distros # may change that default. PACKAGECONFIG ??= "" -PACKAGECONFIG += "${@bb.utils.contains('MACHINE_FEATURES', 'tpm', 'tpm', '', d)}" +PACKAGECONFIG += "${@bb.utils.filter('MACHINE_FEATURES', 'tpm', d)}" PACKAGECONFIG += "${@bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'tpm', '', d)}" PACKAGECONFIG[debug] = ",,," PACKAGECONFIG[secureboot] = ",,," diff --git a/meta/recipes-extended/at/at_3.2.5.bb b/meta/recipes-extended/at/at_3.2.5.bb index 112d1c4adc..ee485f67ec 100644 --- a/meta/recipes-extended/at/at_3.2.5.bb +++ b/meta/recipes-extended/at/at_3.2.5.bb @@ -9,7 +9,7 @@ DEPENDS = "flex flex-native bison-native \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" PACKAGECONFIG ?= "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \ " PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux," diff --git a/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb b/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb index 18eeaa5523..c76763f811 100644 --- a/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb +++ b/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb @@ -14,7 +14,7 @@ REQUIRED_DISTRO_FEATURES = "opengl glvnd" inherit meson pkgconfig features_check PACKAGECONFIG ?= "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl gles1 gles2', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'glx', '', d)} \ " diff --git a/meta/recipes-graphics/waffle/waffle_1.8.1.bb b/meta/recipes-graphics/waffle/waffle_1.8.1.bb index aefa0069cf..5d993cf254 100644 --- a/meta/recipes-graphics/waffle/waffle_1.8.1.bb +++ b/meta/recipes-graphics/waffle/waffle_1.8.1.bb @@ -21,7 +21,7 @@ DEPENDS:append = " python3" # This should be overridden per-machine to reflect the capabilities of the GL # stack. PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11-egl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gbm surfaceless-egl', '', d)} \ " diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb index cdf3a20dff..9945e79bf7 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.28.2.bb @@ -25,7 +25,7 @@ PACKAGECONFIG ??= " \ ${GSTREAMER_ORC} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \ sndfile ttml uvch264 webp analytics \ From patchwork Mon Apr 27 13:08:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joao Marcos Costa X-Patchwork-Id: 87003 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 6C28DFF885E for ; Mon, 27 Apr 2026 13:09:13 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.44510.1777295351708063572 for ; Mon, 27 Apr 2026 06:09:12 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=qizJLLrc; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 717F5C5CD4A; Mon, 27 Apr 2026 13:09:52 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 498C3600D1; Mon, 27 Apr 2026 13:09:09 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 91E5D10728039; Mon, 27 Apr 2026 15:09:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1777295348; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=d5ZZm8YZ1X1LYF4bjxvYdWQ+qfw/3TE8gfFK4Vhr2J0=; b=qizJLLrcx411B0yEcPSWeryHek93im0lH6nzyOGxgbcOesL9/aaLkDVshy/uFxHZnuiivV rMygpl3dfahzEDQGWVtd2jUuB62baWEdxo0DXjteUlhIqOxCdzeR0pIRA7Tr0GGxFx0qG/ x5jmihJsJMWi/CWPr+vNBTCNOiQ4871V/ClTnbtxQtRn8wUgSBtCA+/HwjheXKlzVkdQ8A XlZ8SUahKBNFAMV2J+mu6v0YsnGAZY6+tRqeJ8u7wEEz9msKSSMb5heLrxU5FmQF+rAug0 BeWdmwV7Oql5Bmy+zJPUWY34s9L8PN2ZS4Nd9bjuee52NS98n4EJDrui9/cFtg== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, quentin.schulz@cherry.de, qi.chen@windriver.com, =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= Subject: [PATCH v2 2/3] classes-global: insane.bbclass : simplify conditional operations with bb.utils.filter Date: Mon, 27 Apr 2026 15:08:45 +0200 Message-ID: <20260427130846.96013-3-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260427130846.96013-1-joaomarcos.costa@bootlin.com> References: <20260427130846.96013-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 27 Apr 2026 13:09:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/236010 The append override on ERROR_QA uses bb.utils.contains to check for a string inside a variable, and return the exact same string if true. This can be simplified by a call to bb.utils.filter, since the result is the same, and the inline is shorter. Replace "bb.utils.contains(A, 'a', 'a', '', d)" by "bb.utils.filter(A, 'a', d)". Signed-off-by: João Marcos Costa Reviewed-by: Quentin Schulz --- meta/classes-global/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index feddfe0335..04700be71c 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -46,7 +46,7 @@ ERROR_QA ?= "\ ${CHECKLAYER_REQUIRED_TESTS}" # Add usrmerge QA check based on distro feature -ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}" +ERROR_QA:append = " ${@bb.utils.filter('DISTRO_FEATURES', 'usrmerge', d)}" WARN_QA:append:layer-core = " missing-metadata missing-maintainer" FAKEROOT_QA = "host-user-contaminated" From patchwork Mon Apr 27 13:08:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joao Marcos Costa X-Patchwork-Id: 87004 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 71C8DFF885E for ; Mon, 27 Apr 2026 13:09:23 +0000 (UTC) Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.44880.1777295360151661303 for ; Mon, 27 Apr 2026 06:09:20 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=l6M9a4pK; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 5B7664E42B33; Mon, 27 Apr 2026 13:09:18 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 329B6600D1; Mon, 27 Apr 2026 13:09:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A9C8110728203; Mon, 27 Apr 2026 15:09:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1777295355; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=G+oM7SGjrLlcOqHICJUFq+DJGxcoEgQ/LCCC8WVbZKE=; b=l6M9a4pK1Z7lmvhvqLH0R4JhTB5dfV4VFFnZJwAokZO5wvZ9dK4bfynmYjDlDYPFnS6ZYX 0I1O3NurXfpjDhwj2J+m5z15+SskoFAe2fXfIdHKZzrcqt3PzDdNXBD1yywFxt9iObo4Gp TB1SB4dRqJb0477XJ/SBpA5Eu7QEu5ZuCSV7ZFwPJvqSN+K9wTKDlQLQ4+L4gsmkY3JExU iWoVHjQK0qhX21jHZbML2yIZligmyAjr4Lshmxr1FCIotb+nZqw4IChSpDTo+ZO09L874D rVXO33JQ40HSM0dwwraz9W6WJEsuJUF0LP1R7VNjKNpf1PxiQO6gze5MI4Dn7g== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, quentin.schulz@cherry.de, qi.chen@windriver.com, =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= Subject: [PATCH v2 3/3] machine: include: arm: simplify conditional operations with bb.utils.filter Date: Mon, 27 Apr 2026 15:08:46 +0200 Message-ID: <20260427130846.96013-4-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260427130846.96013-1-joaomarcos.costa@bootlin.com> References: <20260427130846.96013-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 27 Apr 2026 13:09:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/236011 Some configuration files use bb.utils.contains to check for a string inside a variable, and return the exact same string if true. This can be simplified by a call to bb.utils.filter, since the result is the same, and the inline is shorter. Replace "bb.utils.contains(A, 'a', 'a', '', d)" by "bb.utils.filter(A, 'a', d)". bb.utils.filter() does not return the string with a leading space, and this is handled by a leading space outside of the helper. This workaround, however, has its limitations: the leading space is always added. To avoid any potential issues, use .strip() when dereferencing TUNE_CCARGS_MFPU in the if statements. Signed-off-by: João Marcos Costa Reviewed-by: Quentin Schulz --- meta/conf/machine/include/arm/feature-arm-neon.inc | 8 ++++---- meta/conf/machine/include/arm/feature-arm-vfp.inc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meta/conf/machine/include/arm/feature-arm-neon.inc b/meta/conf/machine/include/arm/feature-arm-neon.inc index 174b9b9f2a..2ec354bfeb 100644 --- a/meta/conf/machine/include/arm/feature-arm-neon.inc +++ b/meta/conf/machine/include/arm/feature-arm-neon.inc @@ -5,16 +5,16 @@ # 'vfp', -mfloat-abi parameter and 'hf' suffix is implemented in feature-arm-vfp.inc TUNEVALID[neon] = "Enable Neon SIMD accelerator unit." -TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'neon', ' neon', '', d)}" +TUNE_CCARGS_MFPU .= " ${@bb.utils.filter('TUNE_FEATURES', 'neon', d)}" TUNEVALID[vfpv3d16] = "Enable Vector Floating Point Version 3 with 16 registers (vfpv3-d16) unit." -TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', ' vfpv3-d16', '', d)}" +TUNE_CCARGS_MFPU .= " ${@bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', ' vfpv3-d16', '', d)}" TUNEVALID[vfpv3] = "Enable Vector Floating Point Version 3 with 32 registers (vfpv3) unit." -TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3', ' vfpv3', '' , d)}" +TUNE_CCARGS_MFPU .= " ${@bb.utils.filter('TUNE_FEATURES', 'vfpv3', d)}" TUNEVALID[vfpv4] = "Enable Vector Floating Point Version 4 (vfpv4) unit." -TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv4', ' vfpv4', '', d)}" +TUNE_CCARGS_MFPU .= " ${@bb.utils.filter('TUNE_FEATURES', 'vfpv4', d)}" TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', [ 'vfpv4', 'neon' ], ' neon-vfpv4', '', d)}" TUNEVALID[vfpv4d16] = "Enable Vector Floating Point Version 4 with 16 registers (vfpv4-d16) unit." diff --git a/meta/conf/machine/include/arm/feature-arm-vfp.inc b/meta/conf/machine/include/arm/feature-arm-vfp.inc index d020100daa..22cd5e1767 100644 --- a/meta/conf/machine/include/arm/feature-arm-vfp.inc +++ b/meta/conf/machine/include/arm/feature-arm-vfp.inc @@ -3,14 +3,14 @@ # and this .inc file is included from armv5 TUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit." -TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', ' vfp', '', d)}" +TUNE_CCARGS_MFPU .= " ${@bb.utils.filter('TUNE_FEATURES', 'vfp', d)}" # simd is special, we don't pass this to the -mfpu, it's implied -TUNE_CCARGS .= "${@ (' -mfpu=%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}" +TUNE_CCARGS .= "${@ (' -mfpu=%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU').strip() != '') else ''}" # The following deals with both vfpv3-d16 and vfpv4-d16 -ARMPKGSFX_FPU = "${@ ('-%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1].replace('-d16', 'd16')) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}" +ARMPKGSFX_FPU = "${@ ('-%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1].replace('-d16', 'd16')) if (d.getVar('TUNE_CCARGS_MFPU').strip() != '') else ''}" TUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP." -TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '' or bb.utils.contains('TUNE_FEATURES', 'simd', True, False, d)) else '' }" +TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU').strip() != '' or bb.utils.contains('TUNE_FEATURES', 'simd', True, False, d)) else '' }" TUNE_CCARGS .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '') else ''}" ARMPKGSFX_EABI = "${@ 'hf' if (d.getVar('TUNE_CCARGS_MFLOAT') == 'hard') else ''}"