[OE-core] [PATCH] gcc-sanitizers: allow empty for lsan and tsan packages

kai.kang at windriver.com kai.kang at windriver.com
Wed Oct 12 02:37:34 UTC 2016


From: Kai Kang <kai.kang at windriver.com>

gcc checks threads and leak sanitizers support when do configure. If not
supported, packages of tsan and lsan are empty. If add such package to
image it fails to build:

| ERROR: core-image-minimal-1.0-r0 do_rootfs: libtsan-dev not found in the feeds
| ERROR: core-image-minimal-1.0-r0 do_rootfs: This is often caused by an empty
| package declared in a recipe's PACKAGES variable. (Empty packages are not
| constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)

Set ALLOW_EMPTY for these packages to resolve the issue.

Signed-off-by: Kai Kang <kai.kang at windriver.com>
---
 meta/recipes-devtools/gcc/gcc-sanitizers.inc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index df4e297..03d23ec 100644
--- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -59,6 +59,13 @@ PACKAGES += "libasan libubsan liblsan libtsan"
 PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev"
 PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev"
 
+ALLOW_EMPTY_${MLPREFIX}liblsan = "1"
+ALLOW_EMPTY_${MLPREFIX}liblsan-dev = "1"
+ALLOW_EMPTY_${MLPREFIX}liblsan-staticdev = "1"
+ALLOW_EMPTY_${MLPREFIX}libtsan = "1"
+ALLOW_EMPTY_${MLPREFIX}libtsan-dev = "1"
+ALLOW_EMPTY_${MLPREFIX}libtsan-staticdev = "1"
+
 RDEPENDS_libasan += "libstdc++"
 RDEPENDS_libubsan += "libstdc++"
 RDEPENDS_liblsan += "libstdc++"
-- 
2.9.3




More information about the Openembedded-core mailing list