From patchwork Wed Jan 15 16:33:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 55637 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 DC4BCC02183 for ; Wed, 15 Jan 2025 16:33:34 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.25931.1736958810874344179 for ; Wed, 15 Jan 2025 08:33:30 -0800 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 B99F611FB for ; Wed, 15 Jan 2025 08:33:58 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.oss.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 071A43F673 for ; Wed, 15 Jan 2025 08:33:29 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/3] autotools: clean up aclocal/ search path assignments Date: Wed, 15 Jan 2025 16:33:16 +0000 Message-ID: <20250115163318.1110804-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 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 ; Wed, 15 Jan 2025 16:33:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209920 We need aclocal to look in two different $datadir/aclocal/ directories: the native (eg, for pkg.m4 from pkgconfig) and the target (eg, for alsa.m4 from alsa-lib). aclocal doesn't directly support this pattern, currently we use --system-acdir to specify the target directory and then add the native directory to the user include list. However, since automake 1.17 there is also an --aclocal-path option to augument the search list. As the relocated aclocal from automake-native already knows the correct path for the native aclocal directory we can use --aclocal-path to add the correct target aclocal directory. For simplicity I don't bother only doing this in non-native builds as this just adds the same path to the search twice. This removes ACLOCALDIR and ACLOCALEXTRAPATH. Recipes using these to add search paths should instead use EXTRA_AUTORECONF += "-I path". Signed-off-by: Ross Burton --- meta/classes-recipe/autotools.bbclass | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/meta/classes-recipe/autotools.bbclass b/meta/classes-recipe/autotools.bbclass index 4e7bf6696d7..99d3cb75833 100644 --- a/meta/classes-recipe/autotools.bbclass +++ b/meta/classes-recipe/autotools.bbclass @@ -139,11 +139,6 @@ do_compile[prefuncs] += "autotools_aclocals" do_install[prefuncs] += "autotools_aclocals" do_configure[postfuncs] += "autotools_postconfigure" -ACLOCALDIR = "${STAGING_DATADIR}/aclocal" -ACLOCALEXTRAPATH = "" -ACLOCALEXTRAPATH:class-target = " -I ${STAGING_DATADIR_NATIVE}/aclocal/" -ACLOCALEXTRAPATH:class-nativesdk = " -I ${STAGING_DATADIR_NATIVE}/aclocal/" - python autotools_aclocals () { sitefiles, searched = siteinfo_get_files(d, sysrootcache=True) d.setVar("CONFIG_SITE", " ".join(sitefiles)) @@ -171,8 +166,8 @@ autotools_do_configure() { if [ -e ${AUTOTOOLS_SCRIPT_PATH}/configure.in -o -e ${AUTOTOOLS_SCRIPT_PATH}/configure.ac ]; then olddir=`pwd` cd ${AUTOTOOLS_SCRIPT_PATH} - mkdir -p ${ACLOCALDIR} - ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/" + # aclocal looks in the native sysroot by default, so tell it to also look in the target sysroot. + ACLOCAL="aclocal --aclocal-path=${STAGING_DATADIR}/aclocal/" if [ x"${acpaths}" = xdefault ]; then acpaths= for i in `find ${AUTOTOOLS_SCRIPT_PATH} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \ @@ -182,7 +177,6 @@ autotools_do_configure() { else acpaths="${acpaths}" fi - acpaths="$acpaths ${ACLOCALEXTRAPATH}" # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look # like it was auto-generated. Work around this by blowing it away # by hand, unless the package specifically asked not to run aclocal. From patchwork Wed Jan 15 16:33:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 55638 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 DEBE7C02187 for ; Wed, 15 Jan 2025 16:33:34 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.25932.1736958811420052883 for ; Wed, 15 Jan 2025 08:33:31 -0800 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 68D9011FB for ; Wed, 15 Jan 2025 08:33:59 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.oss.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 A29CB3F673 for ; Wed, 15 Jan 2025 08:33:30 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/3] libtool: remove obsolete ACLOCALEXTRAPATH Date: Wed, 15 Jan 2025 16:33:17 +0000 Message-ID: <20250115163318.1110804-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250115163318.1110804-1-ross.burton@arm.com> References: <20250115163318.1110804-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 ; Wed, 15 Jan 2025 16:33:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209921 This variable no longer exists, and would have had the effect of not letting the target libtool see the contents of the native aclocal directory. I don't understand why this was needed but autotools has improved dramatically in the last eight years, so it's most likely obsolete now. Signed-off-by: Ross Burton --- meta/recipes-devtools/libtool/libtool_2.5.4.bb | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta/recipes-devtools/libtool/libtool_2.5.4.bb b/meta/recipes-devtools/libtool/libtool_2.5.4.bb index 835f2da9948..fa16d09d21a 100644 --- a/meta/recipes-devtools/libtool/libtool_2.5.4.bb +++ b/meta/recipes-devtools/libtool/libtool_2.5.4.bb @@ -12,8 +12,6 @@ SYSROOT_DIRS_IGNORE += " \ ${datadir}/libtool/build-aux \ " -ACLOCALEXTRAPATH:class-target = "" - inherit multilib_script MULTILIB_SCRIPTS = "${PN}:${bindir}/libtool" From patchwork Wed Jan 15 16:33:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 55636 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 DA2B1C02180 for ; Wed, 15 Jan 2025 16:33:34 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.26129.1736958812221800829 for ; Wed, 15 Jan 2025 08:33:32 -0800 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 1009911FB for ; Wed, 15 Jan 2025 08:34:00 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.oss.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 5321A3F673 for ; Wed, 15 Jan 2025 08:33:31 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/3] autoconf: rename autotools_aclocals and only run in do_configure Date: Wed, 15 Jan 2025 16:33:18 +0000 Message-ID: <20250115163318.1110804-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250115163318.1110804-1-ross.burton@arm.com> References: <20250115163318.1110804-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 ; Wed, 15 Jan 2025 16:33:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209922 Despite the name, autotools_aclocals() doesn't actually do anything with aclocal. Instead it reads all of the available autoconf site default files[1] and sets CONFIG_SITE appropriately. Rename the function to autotools_sitefiles to make this clear. Also there's no need to do this before do_configure or do_install, as the variable is only checked when configure runs. [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Site-Defaults.html Signed-off-by: Ross Burton --- meta/classes-recipe/autotools.bbclass | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meta/classes-recipe/autotools.bbclass b/meta/classes-recipe/autotools.bbclass index 99d3cb75833..b1829e83e24 100644 --- a/meta/classes-recipe/autotools.bbclass +++ b/meta/classes-recipe/autotools.bbclass @@ -134,12 +134,11 @@ EXTRACONFFUNCS ??= "" EXTRA_OECONF:append = " ${PACKAGECONFIG_CONFARGS}" -do_configure[prefuncs] += "autotools_preconfigure autotools_aclocals ${EXTRACONFFUNCS}" -do_compile[prefuncs] += "autotools_aclocals" -do_install[prefuncs] += "autotools_aclocals" +do_configure[prefuncs] += "autotools_preconfigure autotools_sitefiles ${EXTRACONFFUNCS}" do_configure[postfuncs] += "autotools_postconfigure" -python autotools_aclocals () { +# Tell autoconf to load the site defaults from siteinfo +python autotools_sitefiles () { sitefiles, searched = siteinfo_get_files(d, sysrootcache=True) d.setVar("CONFIG_SITE", " ".join(sitefiles)) }