On 2016年10月14日 17:32, Khem Raj wrote:
On Fri, Oct 14, 2016 at 11:02 AM, Kang Kai <kai.k...@windriver.com> wrote:
On 2016年10月13日 22:59, Burton, Ross wrote:


On 13 October 2016 at 15:40, Kang Kai <kai.k...@windriver.com> wrote:
gcc checks tsan and lsan support in source file
gcc/libsanitizer/configure.tgt, it seems only support x86_64. Then tsan and
lsan related packages will be empty for other target.
For qemuarm project, add in local.conf:

IMAGE_INSTALL_append = " libtsan"

If libtsan is x86-64 only, why not only add it for x86-64 images?  The
package not existing on machines it can't be built for is more obvious than
existing but being empty.


The real scenario is for x86-64 kernel with x86 rootfs. We created a
template to enable gcc sanitize support. It just simple adds sanitize
related packages to image:

LIBX_DEV ?= ""
LIBX_DEV_x86-64 = "liblsan-dev libtsan-dev"

IMAGE_INSTALL += " \
     gcc-sanitizers \
     libasan-dev \
     libubsan-dev \
     ${LIBX_DEV} \
"

When multilib is enabled, it fails for x86-64 kernel with x86 rootfs such as
lib32-xxx-image on qemux86-64. Var IMAGE_INSTALL will be expand with prefix
lib32 but lib32-lsan* and lib32-tsan* are empty then cause the failures.
perhaps we should build sanitizers for multilib too ?

The problem is that thread and leak sanitizers are not supported for x86 by checking in gcc/libsanitizer/configure.tgt:


# Filter out unsupported systems.
TSAN_TARGET_DEPENDENT_OBJECTS=
case "${target}" in
  x86_64-*-linux* | i?86-*-linux*)
        if test x$ac_cv_sizeof_void_p = x8; then
                TSAN_SUPPORTED=yes
                LSAN_SUPPORTED=yes
                TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_amd64.lo
        fi
        ;;
...

that causes packages lib32-lsan* and lib32-tsan* are empty.


--Kai


Regards,
Kai


Ross



--
Regards,
Neil | Kai Kang


--
Regards,
Neil | Kai Kang

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

Reply via email to