Skip to contentSkip to conversation

autotools.bbclass: Order CONFIG_SHELL before CACHED_CONFIGUREVARS

PATCH New Khem Raj 1 participant 1 message Oct 15, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 autotools.bbclass: Order CONFIG_SHELL before CACHED_CONFIGUREVARS

This helps in overriding CACHED_CONFIGUREVARS with wrappers to run configure under e.g. for static analysers like scan-build from clang, while it should not change the functionality in normal case.

Since CONFIG_SHELL was introduced, it silently broke this use case and failed running static analyser on autotool based recipes

---
 meta/classes/autotools.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/autotools.bbclass +1 -1
index 1f3c771c69..70804b82b4 100644
@@ -90,7 +90,7 @@ oe_runconf () {
 	cfgscript=`python3 -c "import os; print(os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.'))"`/$cfgscript_name
 	if [ -x "$cfgscript" ] ; then
 		bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-		if ! ${CACHED_CONFIGUREVARS} CONFIG_SHELL=/bin/bash $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
+		if ! CONFIG_SHELL=/bin/bash ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
 			bbnote "The following config.log files may provide further information."
 			bbnote `find ${B} -ignore_readdir_race -type f -name config.log`
 			bbfatal_log "configure failed"
Signature · 1 line
2.28.0