public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [build] Move libgcov support to toplevel libgcc
@ 2011-07-08 11:33 Rainer Orth
  2011-07-08 11:42 ` Paolo Bonzini
  2011-07-08 14:35 ` Joseph S. Myers
  0 siblings, 2 replies; 6+ messages in thread
From: Rainer Orth @ 2011-07-08 11:33 UTC (permalink / raw)
  To: gcc-patches; +Cc: Paolo Bonzini, Ralf Wildenhues, Ian Lance Taylor

And another easy one: moving libgcov over to libgcc.

Bootstrapped without regressions on i386-pc-solaris2.11 and
x86_64-unknown-linux-gnu.

Ok for mainline?

After this one, and once the problems with the unwinder move are sorted
out, I've got a few more:

* gthr is just in the planning stage

* fp-bit is almost ready

* soft-fp just started to investigate

* libgcc_tm_file only an idea

	Rainer


2011-07-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* Makefile.in (LIBGCOV): Remove.
	(libgcc.mvars): Remove LIBGCOV.
	* libgov.c: Move to ../libgcc.

	libgcc:
	* Makfile.in (LIBGCOV): New variable.
	($(libgcov-objects)): Use $(srcdir) to refer to libgcov.c.
	* libgcov.c: New file.

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1524,14 +1524,6 @@ MOSTLYCLEANFILES = insn-flags.h insn-con
 # Defined in libgcc2.c, included only in the static library.
 LIB2FUNCS_ST = _eprintf __gcc_bcmp
 
-# Defined in libgcov.c, included only in gcov library
-LIBGCOV = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
-    _gcov_fork _gcov_execl _gcov_execlp _gcov_execle \
-    _gcov_execv _gcov_execvp _gcov_execve \
-    _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler \
-    _gcov_indirect_call_profiler _gcov_average_profiler _gcov_ior_profiler \
-    _gcov_merge_ior
-
 # These might cause a divide overflow trap and so are compiled with
 # unwinder info.
 LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
@@ -1877,7 +1869,6 @@ libgcc.mvars: config.status Makefile $(L
 	echo LIB1ASMSRC = '$(LIB1ASMSRC)' >> tmp-libgcc.mvars
 	echo LIB2FUNCS_ST = '$(LIB2FUNCS_ST)' >> tmp-libgcc.mvars
 	echo LIB2FUNCS_EXCLUDE = '$(LIB2FUNCS_EXCLUDE)' >> tmp-libgcc.mvars
-	echo LIBGCOV = '$(LIBGCOV)' >> tmp-libgcc.mvars
 	echo LIB2ADD = '$(call srcdirify,$(LIB2ADD))' >> tmp-libgcc.mvars
 	echo LIB2ADD_ST = '$(call srcdirify,$(LIB2ADD_ST))' >> tmp-libgcc.mvars
 	echo LIB2_SIDITI_CONV_FUNCS = '$(LIB2_SIDITI_CONV_FUNCS)' >> tmp-libgcc.mvars
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -793,9 +793,19 @@ iter-items := $(LIBUNWIND)
 include $(iterator)
 
 # Build libgcov components.
+
+# Defined in libgcov.c, included only in gcov library
+LIBGCOV = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
+    _gcov_fork _gcov_execl _gcov_execlp _gcov_execle \
+    _gcov_execv _gcov_execvp _gcov_execve \
+    _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler \
+    _gcov_indirect_call_profiler _gcov_average_profiler _gcov_ior_profiler \
+    _gcov_merge_ior
+
 libgcov-objects = $(patsubst %,%$(objext),$(LIBGCOV))
-$(libgcov-objects): %$(objext): $(gcc_srcdir)/libgcov.c
-	$(gcc_compile) -DL$* -c $(gcc_srcdir)/libgcov.c
+
+$(libgcov-objects): %$(objext): $(srcdir)/libgcov.c
+	$(gcc_compile) -DL$* -c $(srcdir)/libgcov.c
 
 
 # Static libraries.
diff --git a/gcc/libgcov.c b/libgcc/libgcov.c
rename from gcc/libgcov.c
rename to libgcc/libgcov.c

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [build] Move libgcov support to toplevel libgcc
  2011-07-08 11:33 [build] Move libgcov support to toplevel libgcc Rainer Orth
@ 2011-07-08 11:42 ` Paolo Bonzini
  2011-07-08 14:35 ` Joseph S. Myers
  1 sibling, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2011-07-08 11:42 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, Ralf Wildenhues, Ian Lance Taylor

On 07/08/2011 01:31 PM, Rainer Orth wrote:
> And another easy one: moving libgcov over to libgcc.
>
> Bootstrapped without regressions on i386-pc-solaris2.11 and
> x86_64-unknown-linux-gnu.
>
> Ok for mainline?
>
> After this one, and once the problems with the unwinder move are sorted
> out, I've got a few more:
>
> * gthr is just in the planning stage
>
> * fp-bit is almost ready
>
> * soft-fp just started to investigate
>
> * libgcc_tm_file only an idea
>
> 	Rainer
>

Ok!

Paolo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [build] Move libgcov support to toplevel libgcc
  2011-07-08 11:33 [build] Move libgcov support to toplevel libgcc Rainer Orth
  2011-07-08 11:42 ` Paolo Bonzini
@ 2011-07-08 14:35 ` Joseph S. Myers
  2011-07-08 15:43   ` Rainer Orth
  2011-07-08 19:08   ` Jan Hubicka
  1 sibling, 2 replies; 6+ messages in thread
From: Joseph S. Myers @ 2011-07-08 14:35 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, Paolo Bonzini, Ralf Wildenhues, Ian Lance Taylor

On Fri, 8 Jul 2011, Rainer Orth wrote:

> And another easy one: moving libgcov over to libgcc.

Do you have any specific plans regarding gcov-io.c and gcov-io.h?  Because 
they are genuinely used on both the host and the target they are a 
trickier case; I wonder if they should end up in their own toplevel 
directory like libdecnumber, building a proper library that exports 
different functions when configured for the host than for the target, that 
for the target gets included in libgcov and that for the host gets linked 
into cc1, gcov and gcov-dump rather than having files do the present 
'#include "gcov-io.c"'.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [build] Move libgcov support to toplevel libgcc
  2011-07-08 14:35 ` Joseph S. Myers
@ 2011-07-08 15:43   ` Rainer Orth
  2011-07-08 19:08   ` Jan Hubicka
  1 sibling, 0 replies; 6+ messages in thread
From: Rainer Orth @ 2011-07-08 15:43 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: gcc-patches, Paolo Bonzini, Ralf Wildenhues, Ian Lance Taylor

"Joseph S. Myers" <joseph@codesourcery.com> writes:

> On Fri, 8 Jul 2011, Rainer Orth wrote:
>
>> And another easy one: moving libgcov over to libgcc.
>
> Do you have any specific plans regarding gcov-io.c and gcov-io.h?  Because 

None so far: the issues outlined in the libgcov submission are currently
the end of what I plan to do on this front.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [build] Move libgcov support to toplevel libgcc
  2011-07-08 14:35 ` Joseph S. Myers
  2011-07-08 15:43   ` Rainer Orth
@ 2011-07-08 19:08   ` Jan Hubicka
  2011-07-13 14:03     ` Rainer Orth
  1 sibling, 1 reply; 6+ messages in thread
From: Jan Hubicka @ 2011-07-08 19:08 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: Rainer Orth, gcc-patches, Paolo Bonzini, Ralf Wildenhues,
	Ian Lance Taylor

> On Fri, 8 Jul 2011, Rainer Orth wrote:
> 
> > And another easy one: moving libgcov over to libgcc.
> 
> Do you have any specific plans regarding gcov-io.c and gcov-io.h?  Because 
> they are genuinely used on both the host and the target they are a 
> trickier case; I wonder if they should end up in their own toplevel 
> directory like libdecnumber, building a proper library that exports 
> different functions when configured for the host than for the target, that 
> for the target gets included in libgcov and that for the host gets linked 
> into cc1, gcov and gcov-dump rather than having files do the present 
> '#include "gcov-io.c"'.

I would also preffer libgcov to go into its own toplevel directory,
especially because there are plans to add non-stdlib i/o into it i.e.
for kernel profiling.  that way it would be handy to have libgcov
as a toplevel library with its own configure that allows it to be build
independently of rest of GCC.

Honza
> 
> -- 
> Joseph S. Myers
> joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [build] Move libgcov support to toplevel libgcc
  2011-07-08 19:08   ` Jan Hubicka
@ 2011-07-13 14:03     ` Rainer Orth
  0 siblings, 0 replies; 6+ messages in thread
From: Rainer Orth @ 2011-07-13 14:03 UTC (permalink / raw)
  To: Jan Hubicka
  Cc: Joseph S. Myers, gcc-patches, Paolo Bonzini, Ralf Wildenhues,
	Ian Lance Taylor

Jan,

> I would also preffer libgcov to go into its own toplevel directory,
> especially because there are plans to add non-stdlib i/o into it i.e.
> for kernel profiling.  that way it would be handy to have libgcov
> as a toplevel library with its own configure that allows it to be build
> independently of rest of GCC.

I'm probably not going to try that.  There's so much cleanup possible in
the toplevel libgcc move as is that will keep me busy for some time
(provided that I can testing and approval for the parts I can't easily
test myself ;-).

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-13 13:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-08 11:33 [build] Move libgcov support to toplevel libgcc Rainer Orth
2011-07-08 11:42 ` Paolo Bonzini
2011-07-08 14:35 ` Joseph S. Myers
2011-07-08 15:43   ` Rainer Orth
2011-07-08 19:08   ` Jan Hubicka
2011-07-13 14:03     ` Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).