This is the mail archive of the gcc-prs@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: target/5212: profiling support for i386-gnu specs file


The following reply was made to PR target/5212; it has been noted by GNATS.

From: Craig Rodrigues <rodrigc@mediaone.net>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   marcus.brinkmann@ruhr-uni-bochum.de, gcc-bugs@gcc.gnu.org,
   nobody@gcc.gnu.org
Cc:  
Subject: Re: target/5212: profiling support for i386-gnu specs file
Date: Sat, 05 Jan 2002 16:02:21 -0500

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5212
 
 The following was submitted by dan@debian.org.
 Do not modify the subject line when CC:'ing gcc-gnats@gcc.gnu.org
 
 ==================================================================================
 
  On Fri, Dec 28, 2001 at 07:53:31PM +0100, Marcus Brinkmann wrote:
  > >Description:
  > I fixed the Hurd specs file to support profiling (which was broken
  > for statically linked programs).  The specs file I successfully used
  > is attached, an analysis of what it does (or should do) is in the
  > table below.  The only relevant part of the specs file (the only
  > parts which I changed) are "cc1" and "startfile".
  >
  > The Hurd has the i386-gnu architecture.
  >
  > To profile the program only:
  > $ gcc -o main main.c -pg
  > $ ./main
  > $ gprof main gmon.out
  >
  > To profile the program and the C library:
  > $ gcc -o main main.c -profile
  > $ ./main
  > $ gprof main gmon.out
  >
  > The specs file implement the following option combinations:
  > Notes: -shared overrides (and prevents) profiling options at the
 linking
  > stage
  >        -profile forces to link the profiling C library statically
  >        -pg/-p does link to the normal C library (dynamically or
 statically)
  >
  > The cc1 option -p is added for all of -p/-pg/-profile (for the first
  > two automatically, for the third there is a rule in the specs file).
 
  This is inconsistent with the behavior of (the undocumented) -profile
  on Linux, IIRC; there it links in -lc_p but does not imply -pg.  Of
  course, perhaps that should just be fixed too :)  This option really
  should be added to the documentation.
 
  --
  Daniel Jacobowitz                           Carnegie Mellon University
  MontaVista Software                         Debian GNU/Linux Developer
 
 


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