[OE-core] [PATCH v3] libsanitizer: Enable GCC sanitizers

Dan McGregor danismostlikely at gmail.com
Thu Nov 13 23:35:22 UTC 2014


On 4 November 2014 07:45, Burton, Ross <ross.burton at intel.com> wrote:
> Hi Dan,
>
> On 16 September 2014 19:45, Dan McGregor <danismostlikely at gmail.com> wrote:
>>
>> No worries. There's a new version up now. I did some experiments with
>> other machines. Turns out it doesn't
>> work on aarch64.
>
>
> Said I'd merge these once 1.7 out and sadly there's some bad news:
>
> |
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS):
> In function `__libc_csu_init':
> |
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-lsb/build/build/tmp/work/i586-poky-linux/glibc/2.20-r0/git/csu/elf-init.c:86:
> undefined reference to `__init_array_start'
> |
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.9.1/ld:
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS):
> relocation R_386_GOTOFF against undefined hidden symbol `__init_array_start'
> can not be used when making a shared object
> |
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.9.1/ld:
> final link failed: Bad value
> | collect2: error: ld returned 1 exit status
> | Makefile:407: recipe for target 'libasan.la' failed
>
> (https://autobuilder.yoctoproject.org/main/builders/nightly-x86-lsb/builds/87/steps/BuildImages/logs/stdio)
>
> |
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-arm-lsb/build/build/tmp/sysroots/imx53qsb/usr/lib/libc_nonshared.a(elf-init.oS):
> In function `__libc_csu_init':
> |
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-arm-lsb/build/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/glibc/2.20-r0/git/csu/elf-init.c:87:
> undefined reference to `__init_array_end'
> |
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-arm-lsb/build/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/glibc/2.20-r0/git/csu/elf-init.c:87:
> undefined reference to `__init_array_start'
> |
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-arm-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld:
> .libs/libasan.so.1.0.0: hidden symbol `__init_array_end' isn't defined
> |
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-arm-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.1/ld:
> final link failed: Bad value
> | collect2: error: ld returned 1 exit status
> | make[2]: *** [libasan.la] Error 1
>
> (https://autobuilder.yoctoproject.org/main/builders/nightly-fsl-arm-lsb/builds/85/steps/BuildImages/logs/stdio)
>
> ERROR: Nothing RPROVIDES 'libsanitizer' (but
> /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
> RDEPENDS on or otherwise requires it)
> ERROR: libsanitizer was skipped: incompatible with host mips-poky-linux (not
> in COMPATIBLE_HOST)
>
> (https://autobuilder.yoctoproject.org/main/builders/nightly-mips/builds/89/steps/BuildImages/logs/stdio)
>
> Will you be able to work on these?
>
> Ross

Looks like I needed to use the same security CFLAGS as gcc-runtime and
libgcc. There's a new version up on my bitbucket page.

I still haven't found an elegant solution to the package group issue
on MIPS/SPARC though.



More information about the Openembedded-core mailing list