nss build question:how to set CFLAGS and LDFLAGS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

nss build question:how to set CFLAGS and LDFLAGS

chenchaotoc
NSS-3.33

I wanted to get code coverage of nss(mainly certutil).So I tried to add '-fprofile-arcs -ftest-coverage' to CFLAGS in command.mk. While it failed, it seems it's because compiling and linking are separate. '-fprofile-arcs -ftest-coverage' also need to be added to LDFLAGS,while I didn't find it.

Can you tell me how to configure Makefile or others to get code coverage, or is there any convenient way to set CFLAGS CXXFLAGS and LDFLAGS, just like './configure CFLAGS=...'

Thanks
_______________________________________________
dev-security mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-security
Reply | Threaded
Open this post in threaded view
|

Re: nss build question:how to set CFLAGS and LDFLAGS

Hubert Kario
On Wednesday, 16 May 2018 15:05:21 CEST [hidden email] wrote:

> NSS-3.33
>
> I wanted to get code coverage of nss(mainly certutil).So I tried to add
> '-fprofile-arcs -ftest-coverage' to CFLAGS in command.mk. While it failed,
> it seems it's because compiling and linking are separate. '-fprofile-arcs
> -ftest-coverage' also need to be added to LDFLAGS,while I didn't find it.
>
> Can you tell me how to configure Makefile or others to get code coverage, or
> is there any convenient way to set CFLAGS CXXFLAGS and LDFLAGS, just like
> './configure CFLAGS=...'
I believe that compiling the library with USE_GCOV=1 environment variable set
should be enough.
--
Regards,
Hubert Kario
Senior Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purky┼łova 115, 612 00  Brno, Czech Republic
_______________________________________________
dev-security mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-security

signature.asc (849 bytes) Download Attachment