I met the following error when compiling some projects.

| configure: error: `LDFLAGS' has changed since the previous run:
| configure:   former value:  `-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed'
| configure:   current value: `-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed 
-fstack-protector-strong -Wl,-z,relro,-z,now'
[snip]
| configure: error: changes in the environment can compromise the build
| configure: error: run `make distclean' and/or `rm .././config.cache' and 
start over

I think when some recipe inherits autotools-brokensep, it should try to
do more cleanups before configure. So also do 'make distclean' and remove
config.cache just as what the error message told us.

Signed-off-by: Chen Qi <qi.c...@windriver.com>
---
 meta/classes/autotools.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 8768a6a..f577461 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -113,6 +113,8 @@ autotools_preconfigure() {
                                cd ${S}
                                if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile 
-o -e makefile -o -e GNUmakefile \) ]; then
                                        oe_runmake clean
+                                       oe_runmake distclean
+                                       rm -f ${B}/config.cache
                                fi
                                find ${S} -ignore_readdir_race -name \*.la 
-delete
                        fi
-- 
1.9.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to