From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15170 invoked by alias); 8 May 2006 19:21:05 -0000 Received: (qmail 15149 invoked by uid 22791); 8 May 2006 19:21:05 -0000 X-Spam-Check-By: sourceware.org Received: from intranet.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 08 May 2006 19:21:02 +0000 Received: (qmail 18482 invoked from network); 8 May 2006 19:21:01 -0000 Received: from unknown (HELO ?10.0.0.101?) (shinwell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 May 2006 19:21:01 -0000 Message-ID: <445F9A15.7000103@codesourcery.com> Date: Mon, 08 May 2006 23:48:00 -0000 From: Mark Shinwell User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: binutils@sourceware.org Subject: [PATCH] enabling gprof for cross builds Content-Type: multipart/mixed; boundary="------------050609020404070008000401" X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00152.txt.bz2 This is a multi-part message in MIME format. --------------050609020404070008000401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 843 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 --------------050609020404070008000401 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="binutils-gprof.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="binutils-gprof.patch" Content-length: 938 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. --------------050609020404070008000401--