This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] enabling gprof for cross builds
- From: Mark Shinwell <shinwell at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Mon, 08 May 2006 20:20:53 +0100
- Subject: [PATCH] enabling gprof for cross builds
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
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.