Mail Archives: djgpp-workers/2003/01/31/18:08:24
do we?
------- Start of forwarded message -------
Date: Fri, 31 Jan 2003 15:07:23 -0800 (PST)
From: Geoffrey Keating <gkeating AT apple DOT com>
To: gcc-patches AT gcc DOT gnu DOT org
CC: Nathan Sidwell <nathan AT codesourcery DOT com>, dj AT delorie DOT com
Subject: fix profiling on Darwin
This patch:
2003-01-27 Nathan Sidwell <nathan AT codesourcery DOT com>
* Makefile.in (LIB2FUNCS_ST): Remove _gcov.
(LIBGCOV): New variable.
(libgcc.mk): Add LIBGCOV.
(LIBGCC_DEPS): Add libgcov.c.
(libgcov.a): New target.
(clean): Remove libgcov.a.
(install-libgcc): Do libgcov too.
(stage1-start, stage2-start, stage3-start, stage4-start): Deal
with libgcov.a.
* libgcc2.c (L_gcov): Move into ...
* libgcov.c: ... here. New file.
* mklibgcc.in: Add libgcov rules.
* gcc.c (LINK_COMMAND_SPEC): Add -lgcov when profiling.
broke profiling on Darwin because Darwin has its own
LINK_COMMAND_SPEC and Nathan didn't update it. This patch fixes it.
Probably djgpp also needs a similar patch since it also has its own
LINK_COMMAND_SPEC.
Bootstrapped & tested on powerpc-darwin.
- --
- - Geoffrey Keating <geoffk AT apple DOT com>
===File ~/patches/gcc-darwingprof.patch=====================
2003-01-31 Geoffrey Keating <geoffk AT apple DOT com>
* config/darwin.h (LINK_COMMAND_SPEC): Update for Nathan's recent
change to LINK_COMMAND_SPEC in gcc.c.
Index: config/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.h,v
retrieving revision 1.47
diff -u -p -u -p -r1.47 darwin.h
- --- config/darwin.h 3 Jan 2003 23:09:32 -0000 1.47
+++ config/darwin.h 31 Jan 2003 23:03:31 -0000
@@ -190,7 +190,8 @@ Boston, MA 02111-1307, USA. */
%{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
%{@:-o %f%u.out}%{!@:%{o*}%{!o:-o a.out}} \
%{!Zdynamiclib:%{!A:%{!nostdlib:%{!nostartfiles:%S}}}} \
- - %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%G %L}} \
+ %{L*} %(link_libgcc) %o %{fprofile-arcs:-lgcov} \
+ %{!nostdlib:%{!nodefaultlibs:%G %L}} \
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} \
%{!--help:%{!no-c++filt|c++filt:| c++filt3 }} }}}}}}}}"
============================================================
------- End of forwarded message -------
- Raw text -