Compiling Busybox for gcov coverage testing

Jiaqi Tan tanjiaqi at gmail.com
Thu Mar 8 09:52:38 UTC 2012


Hi,

I'm sorry if this has been asked before, but has anyone tried
compiling Busybox on x86 for gcov coverage testing before? I tried
using CFLAGS="-fprofile-arcs -ftest-coverage" but the compilation
failed with the following errors:

  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf.o: In function `global constructors keyed to
65535_0_input_mode':
HOME/busybox/scripts/kconfig/conf.c:612: undefined reference to `__gcov_init'
scripts/kconfig/conf.o:(.data+0x84): undefined reference to `__gcov_merge_add'
scripts/kconfig/zconf.tab.o: In function `global constructors keyed to
65535_0_kconf_id_lookup':
HOME/busybox/out-grep-gcov/scripts/kconfig/zconf.tab.c:2172: undefined
reference to `__gcov_init'
scripts/kconfig/zconf.tab.o:(.data+0x624): undefined reference to
`__gcov_merge_add'
collect2: ld returned 1 exit status
make[4]: *** [scripts/kconfig/conf] Error 1
make[3]: *** [silentoldconfig] Error 2
make[2]: *** [include/autoconf.h] Error 2
make[1]: *** [_all] Error 2
make: *** [all] Error 2

Has anyone managed to successfully compile Busybox for gcov testing before?

Thanks!
Jiaqi


More information about the busybox mailing list