When building binutils-2.18 on hppa-hpux11.11 (without gcc), linking gprof fails: /bin/sh ./libtool --tag=CC --mode=link cc -Wp,-H256000 -O3 -o gprof basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o ../bfd/libbfd.la ../libiberty/libiberty.a libtool: link: cc -Wp,-H256000 -O3 -o gprof basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a /usr/ccs/bin/ld: Unsatisfied symbols: fabs (first referenced in hist.o) (code) gmake[4]: *** [gprof] Error 1 gmake[4]: Leaving directory `/build/binutils-2.18/gprof' gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory `/build/binutils-2.18/gprof' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/build/binutils-2.18/gprof' gmake[1]: *** [all-gprof] Error 2 gmake[1]: Leaving directory `/build/binutils-2.18' gmake: *** [all] Error 2 It does help to check for fabs() in libm, like done for frexp() in binutils/configure: --- binutils-2.18/gprof/configure.in.orig 2007-10-09 09:22:17.289705000 +0200 +++ binutils-2.18/gprof/configure.in 2007-10-09 09:24:26.745972000 +0200 @@ -44,6 +44,9 @@ [Is the prototype for getopt in <unistd.h> in the expected format?]) fi +# Some systems have fabs only in -lm, not in -lc. +AC_SEARCH_LIBS(fabs, m) + AM_BINUTILS_WARNINGS dnl Required by html and install-html
Hi Michael, Thanks for the bug report and patch. I have checked your suggested fix in together with this changelog entry. Cheers Nick gprof/ChangeLog 2007-10-12 Michael Haubenwallner <haubi@gentoo.org> PR gprof/5147 * configure.in: Add check for fabs() being in libm. * configure: Regenerate.