Cross Toolchain question re: non-native gprof

Dan Kegel dank@kegel.com
Thu Jul 22 05:50:00 GMT 2004


Njuguna Njoroge wrote:
> Hello Daniel,
> 
> First of all, I would like to thank you for your resourceful website and
> tools. I have been using the crosstools to extract gprof that is
> crosscompiled for the powerpc-405. Since gprof is supposed to work on
> various formatted binaries, it is  in the native_only list in the
> configure.in file (see this discussion:
> http://sources.redhat.com/ml/sid/2002-q2/msg00039.html). However, we
> want a crosscompiled version (like the executables that have the
> powerpc-405 prefix) because we found that gprof on a linux x86 handles
> ppc elf files differently than gprof on a linux ppc405. 

What was the symptom?  Did things generally work, or was native gprof
totally unable to process cross-profiles?  I seem to recall it
just working when I tried using an x86 gprof with ppc405 binaries,
but then I might be forgetting something.

(Another interesting message is
http://sources.redhat.com/ml/binutils/2002-04/msg00204.html
which indicates that cross-compiled gprof was new as of 2002.
Which version of binutils are you building?)

> I followed the
> suggestions in the link above, but no such executable was generated.

Heh.  Looks like you need to change configure, not just configure.in.
(Unless you're regenerating configure from configure.in.)
I just tried it, and got powerpc-405-linux-gnu-gprof as ordered.

> ... I'm sure there are some obvious steps I am overlooking. Nonetheless, if
> you could spare a few moments and provide some pointers, I would be
> grateful. Additionally/Alternatively, if you know of any discussion
> groups/e-mail lists to which I can post my questions, please refer them
> to me.

I'm cc'ing this to the crossgcc list.
The binutils mailing list also comes to mind.
- Dan

p.s. Here's a patch that does what the message suggested, but
does it to both files:

--- binutils-2.15/configure.old 2004-07-21 21:36:47.000000000 -0700
+++ binutils-2.15/configure     2004-07-21 21:37:08.000000000 -0700
@@ -999,7 +999,7 @@

  # 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.
--- binutils-2.15/configure.in.old      2004-07-21 21:37:19.000000000 -0700
+++ binutils-2.15/configure.in  2004-07-21 21:37:34.000000000 -0700
@@ -236,7 +236,7 @@

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


-- 
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list