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:48:01 +0000 |
| commit | 7aa33dba3b835f8be6f6c6f0831554fbc4cb5e39 (patch) | |
| tree | 42e07fa062d063e8d3003d8bfce8f4e8eaa65ddc | |
| parent | cd7da084868aa2af222eae3a966775dbcd146b3c (diff) | |
| download | poky-7aa33dba3b835f8be6f6c6f0831554fbc4cb5e39.tar.gz | |
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]
(From OE-Core rev: 4f31eb53fb0b1bfdf8be05356e57df607a6e82a9)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -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(): | |||
| 109 | 109 | ||
| 110 | 110 | ||
| 111 | # Currently not being used by default "desktop" | 111 | # Currently not being used by default "desktop" |
| 112 | WARN_QA ?= "ldflags useless-rpaths rpaths unsafe-references-in-binaries unsafe-references-in-scripts" | 112 | WARN_QA ?= "ldflags useless-rpaths rpaths unsafe-references-in-binaries unsafe-references-in-scripts staticdev" |
| 113 | ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms" | 113 | ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms" |
| 114 | 114 | ||
| 115 | def package_qa_clean_path(path,d): | 115 | def package_qa_clean_path(path,d): |
| @@ -192,6 +192,19 @@ def package_qa_check_dev(path, name, d, elf, messages): | |||
| 192 | messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \ | 192 | messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \ |
| 193 | (name, package_qa_clean_path(path,d))) | 193 | (name, package_qa_clean_path(path,d))) |
| 194 | 194 | ||
| 195 | QAPATHTEST[staticdev] = "package_qa_check_staticdev" | ||
| 196 | def package_qa_check_staticdev(path, name, d, elf, messages): | ||
| 197 | """ | ||
| 198 | Check for ".a" library in non-staticdev packages | ||
| 199 | There are a number of exceptions to this rule, -pic packages can contain | ||
| 200 | static libraries, the _nonshared.a belong with their -dev packages and | ||
| 201 | libgcc.a, libgcov.a will be skipped in their packages | ||
| 202 | """ | ||
| 203 | |||
| 204 | if not name.endswith("-pic") and not name.endswith("-staticdev") and path.endswith(".a") and not path.endswith("_nonshared.a"): | ||
| 205 | messages.append("non -staticdev package contains static .a library: %s path '%s'" % \ | ||
| 206 | (name, package_qa_clean_path(path,d))) | ||
| 207 | |||
| 195 | QAPATHTEST[debug-files] = "package_qa_check_dbg" | 208 | QAPATHTEST[debug-files] = "package_qa_check_dbg" |
| 196 | def package_qa_check_dbg(path, name, d, elf, messages): | 209 | def package_qa_check_dbg(path, name, d, elf, messages): |
| 197 | """ | 210 | """ |
