public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: [PATCH] enabling gprof for cross builds
@ 2007-04-09 17:46 Sanjay Chadha
  2007-04-12  4:08 ` Ben Elliston
  0 siblings, 1 reply; 13+ messages in thread
From: Sanjay Chadha @ 2007-04-09 17:46 UTC (permalink / raw)
  To: binutils


I have a question regarding cross compiling gprof. There was a patch
which removed from gprof from native_only list.

-native_only="autoconf automake libtool fileutils find gawk gettext gzip
hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff
gprof target-groff guile perl time ash bash bzip2 prms gnuserv
target-gperf"
+native_only="autoconf automake libtool fileutils find gawk gettext gzip
hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff
target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
 
I am not sure if above change alone will make gprof cross compile (and
link). gprof uses libbfd.a which is compiled as a host_libs hence there
would be a mismatch between gprof and libbfd.a. To circumvent this I
gave the following command (so both host and target are the target mips
platform)
 
[schadha@devjava1-fc4 binutils-2.15.91.0.2]$ ./configure
--target=mipsel-linux --host==mipsel-linux
[schadha@devjava1-fc4 binutils-2.15.91.0.2]$ make


However the compiled gprof was compiled for the host (i386) machine. Any
ideas of what other changes may be required to cross compile gprof for
the mips machine.

Regards,
    Sanjay
 
S5 Systems - providing custom embedded engineering services   
Direct:  (613) 226-4764 
Mobile: (613) 355-9298

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH] enabling gprof for cross builds
@ 2006-05-08 23:48 Mark Shinwell
  2006-05-09  1:38 ` Daniel Jacobowitz
  2006-05-09  2:05 ` Ben Elliston
  0 siblings, 2 replies; 13+ messages in thread
From: Mark Shinwell @ 2006-05-08 23:48 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

Hi,

The attached patchette enables building of gprof for cross builds.
I believe gprof builds and executes correctly in this scenario with the 
single caveat that if you wish to examine gmon.out files produced on a 
target whose pointer size is 64 bits then you must compile gprof with a 
compiler that supports a 64-bit integer type.  As far as I can tell, 
endianness issues are handled automatically by virtue of the I/O 
routines going via bfd.

Does that caveat mean that a configure test (involving the build 
compiler's capability and the pointer size of the target) should be used 
to determine whether to build gprof?  I hear that this might be overkill.

Tested with cross builds from i686 to SPARC and ARM architectures.

Comments appreciated: I've recently started at CodeSourcery and so am 
somewhat new to all of this :-)

Mark

[-- Attachment #2: binutils-gprof.patch --]
[-- Type: text/plain, Size: 938 bytes --]

Index: configure.in
===================================================================
RCS file: /cvs/src/src/configure.in,v
retrieving revision 1.305
diff -U3 -p -r1.305 configure.in
--- configure.in	2 May 2006 00:16:50 -0000	1.305
+++ configure.in	8 May 2006 18:48:54 -0000
@@ -227,7 +227,7 @@ esac
 
 # Some tools are only suitable for building in a "native" situation.
 # Remove these if host!=target.  
-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
 
 # Similarly, some are only suitable for cross toolchains.
 # Remove these if host=target.

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

end of thread, other threads:[~2007-04-20 14:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-09 17:46 [PATCH] enabling gprof for cross builds Sanjay Chadha
2007-04-12  4:08 ` Ben Elliston
2007-04-12 15:13   ` Danny Backx
2007-04-13  1:09     ` John Tytgat
2007-04-19 21:54       ` Danny Backx
2007-04-20 14:28     ` Nick Clifton
  -- strict thread matches above, loose matches on Subject: below --
2006-05-08 23:48 Mark Shinwell
2006-05-09  1:38 ` Daniel Jacobowitz
2006-05-09  2:05 ` Ben Elliston
2006-05-09 20:33   ` Mark Shinwell
2006-05-24 12:31     ` Mark Shinwell
2006-05-24 14:28       ` Daniel Jacobowitz
2006-05-24 17:09         ` Mark Shinwell

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).