This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions related to creation of libgcov.so


On 08/14/2018 10:35 PM, Joseph Myers wrote:
> On Tue, 14 Aug 2018, Martin Liška wrote:
> 
>> 2) Do I understand that correctly that I need to build .o files twice: 
>> once with hidden visibility and second time without for the shared 
>> library?
> 
> Yes.
> 

Done that, maybe there's a more simple syntax of:

libgcov-s-merge$(objext): $(srcdir)/libgcov-merge.c $(srcdir)/gcov.h $(srcdir)/libgcov.h
	$(gcc_compile) -DL_gcov_shared -c $(srcdir)/libgcov-merge.c
libgcov-s-profiler$(objext): $(srcdir)/libgcov-profiler.c $(srcdir)/gcov.h $(srcdir)/libgcov.h
	$(gcc_compile) -DL_gcov_shared -c $(srcdir)/libgcov-profiler.c
libgcov-s-interface$(objext): $(srcdir)/libgcov-interface.c $(srcdir)/gcov.h $(srcdir)/libgcov.h
	$(gcc_compile) -DL_gcov_shared -c $(srcdir)/libgcov-interface.c
libgcov-s-driver$(objext): $(srcdir)/libgcov-driver.c $(srcdir)/libgcov-driver-system.c $(srcdir)/gcov.h $(srcdir)/libgcov.h
	$(gcc_compile) -DL_gcov_shared -c $(srcdir)/libgcov-driver.c

libgcov-s-objects = libgcov-s-merge${objext} libgcov-s-profiler${objext} libgcov-s-interface${objext} libgcov-s-driver${objext}

?

I'm not such much familiar with Makefile syntax.
Thanks,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]