diff options
author | Saul Wold <sgw@linux.intel.com> | 2012-01-25 11:29:38 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-26 20:47:21 +0000 |
commit | 4f31eb53fb0b1bfdf8be05356e57df607a6e82a9 (patch) | |
tree | 99f0079cf5c787c4b0b898568427bc056012a3c2 /meta | |
parent | 6d4ff87b935d61aae63260262c0f48fe7e9d2a48 (diff) | |
download | openembedded-core-4f31eb53fb0b1bfdf8be05356e57df607a6e82a9.tar.gz openembedded-core-4f31eb53fb0b1bfdf8be05356e57df607a6e82a9.tar.bz2 openembedded-core-4f31eb53fb0b1bfdf8be05356e57df607a6e82a9.zip |
insane.bbclass: Add test for static .a libraries in non-staticdev packages
This check verifies that non staticdev and non pic packages do not
have static libraries in them. There are a few exceptions for the
libgcc-dev and libgcov-dev packages which are whitelisted, also the
*_nonshared.a need to be part of their respective -dev packages.
This is currently a warning to work out any other issues in the upper
layers but will be moved to ERROR at somepoint in the future.
[YOCTO #663]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/insane.bbclass | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index ce21496f99..ead6ec1a86 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -109,7 +109,7 @@ def package_qa_get_machine_dict(): # Currently not being used by default "desktop" -WARN_QA ?= "ldflags useless-rpaths rpaths unsafe-references-in-binaries unsafe-references-in-scripts" +WARN_QA ?= "ldflags useless-rpaths rpaths unsafe-references-in-binaries unsafe-references-in-scripts staticdev" ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms" def package_qa_clean_path(path,d): @@ -192,6 +192,19 @@ def package_qa_check_dev(path, name, d, elf, messages): messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \ (name, package_qa_clean_path(path,d))) +QAPATHTEST[staticdev] = "package_qa_check_staticdev" +def package_qa_check_staticdev(path, name, d, elf, messages): + """ + Check for ".a" library in non-staticdev packages + There are a number of exceptions to this rule, -pic packages can contain + static libraries, the _nonshared.a belong with their -dev packages and + libgcc.a, libgcov.a will be skipped in their packages + """ + + if not name.endswith("-pic") and not name.endswith("-staticdev") and path.endswith(".a") and not path.endswith("_nonshared.a"): + messages.append("non -staticdev package contains static .a library: %s path '%s'" % \ + (name, package_qa_clean_path(path,d))) + QAPATHTEST[debug-files] = "package_qa_check_dbg" def package_qa_check_dbg(path, name, d, elf, messages): """ |