This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
RE: glibc build with gcov support
- From: Tatiana Udalova <t dot udalova at samsung dot com>
- To: 'Ondřej Bílka' <neleai at seznam dot cz>
- Cc: libc-help at sourceware dot org, 'Slava Garbuzov' <v dot garbuzov at samsung dot com>, 'Evgeny Gavrin' <e dot gavrin at samsung dot com>
- Date: Tue, 19 Nov 2013 12:55:04 +0400
- Subject: RE: glibc build with gcov support
- Authentication-results: sourceware.org; auth=none
- References: <001201cee4f4$36da6a80$a48f3f80$%udalova at samsung dot com> <20131119080808 dot GA13376 at domone dot podge>
I wanna check Glibc test coverage to be able to find untested functions.
As far as I understand oprofile isn't suitable for it:
It'll give me information about running code only.
Tatiana
-----Original Message-----
From: Ondřej Bílka [mailto:neleai@seznam.cz]
Sent: Tuesday, November 19, 2013 12:08 PM
To: Tatiana Udalova
Cc: libc-help@sourceware.org; 'Slava Garbuzov'; 'Evgeny Gavrin'
Subject: Re: glibc build with gcov support
On Tue, Nov 19, 2013 at 10:54:37AM +0400, Tatiana Udalova wrote:
> Hi!
>
> Could you advise the right way to build Glibc2.17 with gcov coverage
> testing support?
>
How do you plan to use gcov? Does oprofile not suffice?
> I couldn't find any working solution on how to do it.
>
> I was trying to add extra CFLAGS="--coverage" (or
> CFLAGS="-fprofile-arcs
> -ftest-coverage") for glibc configuration and build.
> The following configuration error occur:
> ./configure --prefix=/usr --host=arm-none-linux-gnueabi
> --enable-add-ons=ports,nptl --without-fp ...
> checking whether to put _rtld_local into .sdata section... no checking
> for .preinit_array/.init_array/.fini_array support... no
> configure: error: Need linker with .init_array/.fini_array support.
>
> Hence I can successfully build Glibc without mentioned CFLAGS.
>
> The second solution I've tried was configuring Glibc without extra
> CFLAGS and adding these CFLAGS on make stage only.
> Make stage failed with the following error:
>
> arm-none-linux-gnueabi-gcc -nostdlib -nostartfiles -r -o
> /home/t.udalova/glibc-build/elf/librtld.map.o '-Wl,-('
> /home/t.udalova/glibc-build/elf/dl-allobjs.os
> /home/t.udalova/glibc-build/libc_pic.a -lgcc '-Wl,-)'
> -Wl,-Map,/home/t.udalova/glibc-build/elf/librtld.mapT
> /home/t.udalova/glibc-build/libc_pic.a(dl-addr.os): In function
> `_GLOBAL__sub_I_65535_0_dl_addr.c':
> /home/t.udalova/sources/glibc/libc/elf/dl-addr.c:155: multiple
> definition of `_dl_addr_inside_object'
> /home/t.udalova/glibc-build/elf/dl-allobjs.os:/home/t.udalova/fox-p/vd
> 47_a15
> /toolchain/build/sources/glibc/libc/elf/dl-open.c:755: first defined
> here
> /home/t.udalova/glibc-build/libc_pic.a(init-first.os):(.data+0x0):
> multiple definition of `__libc_multiple_libcs'
> /home/t.udalova/glibc-build/elf/dl-allobjs.os:/home/t.udalova/fox-p/vd
> 47_a15
> /toolchain/build/sources/glibc/libc/elf/rtld.c:2160: first defined
> here
> /home/t.udalova/glibc-build/libc_pic.a(_itoa.os): In function `_itoa':
> /home/t.udalova/sources/glibc/libc/stdio-common/_itoa.c:199: multiple
> definition of `_itoa'
> /home/t.udalova/glibc-build/elf/dl-allobjs.os:/home/t.udalova/sources/
> glibc/
> libc/elf/dl-minimal.c:317: first defined here
> collect2: error: ld returned 1 exit status
>
> There are no --enable-coverage or --enable-gcov options for Glibc
> configuration.
>
> Tatiana
>
>