aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gprof/ChangeLog9
-rw-r--r--gprof/Makefile.in2
-rwxr-xr-xgprof/configure9
-rw-r--r--gprof/configure.in9
-rw-r--r--gprof/gmon_io.c2
5 files changed, 29 insertions, 2 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index a8add32..ab53b47 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -1,3 +1,12 @@
+Thu Feb 27 12:46:53 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Define BSD44_FORMAT if the target looks like a
+ BSD4.4 derived system.
+ * configure: Rebuild.
+ * Makefile.in (.c.o): Add @DEFS@.
+ * gmon_io.c (gmon_out_read): In BSD44_FORMAT code, get profrate
+ from profrate field, not version field.
+
Thu Jan 16 17:42:54 1997 Ian Lance Taylor <ian@cygnus.com>
* dummy.c (find_call): Clear ignore_direct_calls.
diff --git a/gprof/Makefile.in b/gprof/Makefile.in
index 2b4402e..db3f0f0 100644
--- a/gprof/Makefile.in
+++ b/gprof/Makefile.in
@@ -56,7 +56,7 @@ LDFLAGS=
HLDFLAGS = @HLDFLAGS@
HLDENV = @HLDENV@
.c.o:
- $(CC) -c -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -DMACHINE_H=\"$(MY_TARGET).h\" $(TCFLAGS) $(HCFLAGS) $(CFLAGS) $<
+ $(CC) -c -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd @DEFS@ -DMACHINE_H=\"$(MY_TARGET).h\" $(TCFLAGS) $(HCFLAGS) $(CFLAGS) $<
all: $(GEN_FILES) $(PROG)
diff --git a/gprof/configure b/gprof/configure
index 7799ca8..cf951d9 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -925,6 +925,15 @@ esac
+case "${target}" in
+*-*-bsd4.4* | *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
+ cat >> confdefs.h <<\EOF
+#define BSD44_FORMAT 1
+EOF
+
+ ;;
+esac
+
BFDLIB='-L../bfd -lbfd'
# We need to handle some special cases if BFD was built shared.
diff --git a/gprof/configure.in b/gprof/configure.in
index 074ace7..30bb9b2 100644
--- a/gprof/configure.in
+++ b/gprof/configure.in
@@ -33,6 +33,15 @@ esac
AC_SUBST(MY_TARGET)
+dnl We need to set BSD44_FORMAT on a host which uses the additional
+dnl header fields. This is an attempt to do that. I can't think of a
+dnl good feature test for this.
+case "${target}" in
+*-*-bsd4.4* | *-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
+ AC_DEFINE(BSD44_FORMAT)
+ ;;
+esac
+
BFDLIB='-L../bfd -lbfd'
# We need to handle some special cases if BFD was built shared.
diff --git a/gprof/gmon_io.c b/gprof/gmon_io.c
index 1f0e1ac..d66b969 100644
--- a/gprof/gmon_io.c
+++ b/gprof/gmon_io.c
@@ -188,7 +188,7 @@ DEFUN (gmon_out_read, (filename), const char *filename)
{
int profrate;
- profrate = bfd_get_32 (core_bfd, (bfd_byte *) &raw.version[0]);
+ profrate = bfd_get_32 (core_bfd, (bfd_byte *) &raw.profrate[0]);
if (!s_highpc)
hz = profrate;
else if (hz != profrate)