Skip to contentSkip to conversation

autotools: don't wipe elfutils macros

PATCH Superseded Yu, Mingli 3 participants 3 messages Mar 18, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yu, Mingli

author
#0 lore raw

PATCH 1/1 autotools: don't wipe elfutils macros

From: Mingli Yu <[email protected]>

The below m4 macros files shipped with recipe will be removed if the recipe use AM_GNU_GETTEXT.
gettext.m4
iconv.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
nls.m4 po.m4
progtest.m4

After elfutils upgrades to 0.183, it begins to use AM_GNU_GETTEXT as the commit (dd52d2ab Modernize gettext infrastructure) included, so the above m4 macros files such as iconv.m4 is removed and it's bad as we need to patch against iconv.m4 shippped with elfutils.

So we skip elfutils to not let the elfutils m4 macros removed and also fix below issue:

 $ bitbake elfutils -cconfigure && bitbake elfutils -cpatch
---
 meta/classes/autotools.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/autotools.bbclass +1 -1
index 9dc8ebdaa7..4b462c5aba 100644
@@ -203,7 +203,7 @@ autotools_do_configure() {
 				bbnote Executing glib-gettextize --force --copy
 				echo "no" | glib-gettextize --force --copy
 			fi
-		elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
+		elif [ "${BPN}" != "gettext" -a "${BPN}" != "elfutils" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
 			# We'd call gettextize here if it wasn't so broken...
 			cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
 			if [ -d ${S}/po/ ]; then
Signature · 1 line
2.17.1
#1 lore raw
Quoted 37 lines · Mingli

From: Mingli Yu <[email protected]>

The below m4 macros files shipped with recipe will be removed if the recipe use AM_GNU_GETTEXT.
gettext.m4
iconv.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
nls.m4 po.m4
progtest.m4

After elfutils upgrades to 0.183, it begins to use AM_GNU_GETTEXT as the commit (dd52d2ab Modernize gettext infrastructure) included, so the above m4 macros files such as iconv.m4 is removed and it's bad as we need to patch against iconv.m4 shippped with elfutils.

So we skip elfutils to not let the elfutils m4 macros removed and also fix below issue:

 $ bitbake elfutils -cconfigure && bitbake elfutils -cpatch
---
 meta/classes/autotools.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/autotools.bbclass +0 -2
index 9dc8ebdaa7..4b462c5aba 100644
@@ -203,7 +203,7 @@ autotools_do_configure() {
                                bbnote Executing glib-gettextize --force
--copy
                                echo "no" | glib-gettextize --force --copy
                        fi
-               elif [ "${BPN}" != "gettext" ] && grep -q
Quoted 3 lines

"^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
+ elif [ "${BPN}" != "gettext" -a "${BPN}" != "elfutils" ]
&& grep -q "^[[:space:]]*AM_GNU_GETTEXT"

This looks a bit iffy to me where we are moving recipe specific knowledge into a generic class

Please find a solution that works in recipe space
Perhaps move these macros to different folder before regenerating them and then move back as desired or perhaps look at if the gettext change we did for elfutils is too deep a cut then we might want to revert that

$CONFIGURE_AC; then

Quoted 12 lines

# We'd call gettextize here if it wasn't so
broken...

                        cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath
${AUTOTOOLS_AUXDIR}/
                        if [ -d ${S}/po/ ]; then

--
2.17.1

#2 lore raw
In reply to Yu, Mingli

That's not an acceptable solution, as Khem says. If the recipe is using gettext properly then the gettext support in autotools and friends should work fine.

Ross

Quoted 46 lines · Mingli

From: Mingli Yu <[email protected]>

The below m4 macros files shipped with recipe will be removed if the recipe use AM_GNU_GETTEXT.
gettext.m4
iconv.m4
lib-ld.m4
lib-link.m4
lib-prefix.m4
nls.m4 po.m4
progtest.m4

After elfutils upgrades to 0.183, it begins to use AM_GNU_GETTEXT as the commit (dd52d2ab Modernize gettext infrastructure) included, so the above m4 macros files such as iconv.m4 is removed and it's bad as we need to patch against iconv.m4 shippped with elfutils.

So we skip elfutils to not let the elfutils m4 macros removed and also fix below issue:

 $ bitbake elfutils -cconfigure && bitbake elfutils -cpatch
---
 meta/classes/autotools.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/autotools.bbclass +1 -2
index 9dc8ebdaa7..4b462c5aba 100644
@@ -203,7 +203,7 @@ autotools_do_configure() {
                                bbnote Executing glib-gettextize --force --copy
                                echo "no" | glib-gettextize --force --copy
                        fi
-               elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
+               elif [ "${BPN}" != "gettext" -a "${BPN}" != "elfutils" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
                        # We'd call gettextize here if it wasn't so broken...
                        cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
                        if [ -d ${S}/po/ ]; then
--

2.17.1