summaryrefslogtreecommitdiff
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-10-08 14:30:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-14 16:54:30 +0100
commit1b51688d2ea5174334cc8a8a559461b2c4a15a77 (patch)
tree1e0e203d8081027736326b8790a676df3986668d /meta/classes/insane.bbclass
parentf05ae5f57d9d1bd839fae0e3f353d4e0e303a183 (diff)
downloadopenembedded-core-1b51688d2ea5174334cc8a8a559461b2c4a15a77.tar.gz
openembedded-core-1b51688d2ea5174334cc8a8a559461b2c4a15a77.tar.bz2
openembedded-core-1b51688d2ea5174334cc8a8a559461b2c4a15a77.zip
insane: configure option checking
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 7ef3d8e0a0..d73cc2b9b0 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -42,6 +42,8 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
ALL_QA = "${WARN_QA} ${ERROR_QA}"
+UNKNOWN_CONFIGURE_WHITELIST ?= "--enable-nls --disable-nls --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot"
+
#
# dictionary for elf headers
#
@@ -916,6 +918,24 @@ Missing inherit gettext?""" % (gt, config))
if not package_qa_check_license(workdir, d):
bb.fatal("Licensing Error: LIC_FILES_CHKSUM does not match, please fix")
+ ###########################################################################
+ # Check unrecognised configure options (with a white list)
+ ###########################################################################
+ if bb.data.inherits_class("autotools", d):
+ bb.note("Checking configure output for unrecognised options")
+ try:
+ flag = "WARNING: unrecognized options:"
+ log = os.path.join(d.getVar('B', True), 'config.log')
+ output = subprocess.check_output(['grep', '-F', flag, log])
+ options = set(map(lambda s: s.strip(' ,'), output.partition(flag)[2].split()))
+ whitelist = set(d.getVar("UNKNOWN_CONFIGURE_WHITELIST", True).split())
+ options -= whitelist
+ if options:
+ pn = d.getVar('PN', True)
+ error_msg = pn + ": configure was passed unrecognised options: " + " ".join(options)
+ package_qa_handle_error("unknown-configure-option", error_msg, d)
+ except subprocess.CalledProcessError:
+ pass
}
# The Staging Func, to check all staging
#addtask qa_staging after do_populate_sysroot before do_build