Author: andrew
Date: Mon Sep 14 16:18:53 2020
New Revision: 365727
URL: https://svnweb.freebsd.org/changeset/base/365727

Log:
  Cleanups for gprof:
  
   * Remove identical or almost identical headers
   * Only build aout.c on amd64 and i386. None of the the other current
     architectures ever supported running a.out binaries
   * Enable on all architectures
  
  Sponsored by: Innovate UK
  Differential Revision:        https://reviews.freebsd.org/D26369

Deleted:
  head/usr.bin/gprof/amd64.h
  head/usr.bin/gprof/arm.h
  head/usr.bin/gprof/i386.h
  head/usr.bin/gprof/mips.h
  head/usr.bin/gprof/powerpc.h
  head/usr.bin/gprof/riscv.h
  head/usr.bin/gprof/sparc64.h
Modified:
  head/usr.bin/Makefile
  head/usr.bin/gprof/Makefile
  head/usr.bin/gprof/gprof.h

Modified: head/usr.bin/Makefile
==============================================================================
--- head/usr.bin/Makefile       Mon Sep 14 16:12:28 2020        (r365726)
+++ head/usr.bin/Makefile       Mon Sep 14 16:18:53 2020        (r365727)
@@ -262,11 +262,7 @@ SUBDIR.${MK_TOOLCHAIN}+=   ctags
 SUBDIR.${MK_TOOLCHAIN}+=       cxxfilt
 SUBDIR.${MK_TOOLCHAIN}+=       objcopy
 SUBDIR.${MK_TOOLCHAIN}+=       file2c
-# ARM64TODO gprof does not build
-# RISCVTODO gprof does not build
-.if ${MACHINE_ARCH} != "aarch64"
 SUBDIR.${MK_TOOLCHAIN}+=       gprof
-.endif
 SUBDIR.${MK_TOOLCHAIN}+=       indent
 SUBDIR.${MK_TOOLCHAIN}+=       lex
 SUBDIR.${MK_TOOLCHAIN}+=       mkstr

Modified: head/usr.bin/gprof/Makefile
==============================================================================
--- head/usr.bin/gprof/Makefile Mon Sep 14 16:12:28 2020        (r365726)
+++ head/usr.bin/gprof/Makefile Mon Sep 14 16:18:53 2020        (r365727)
@@ -5,8 +5,7 @@ PROG=   gprof
 SRCS=  gprof.c arcs.c dfn.c elf.c lookup.c hertz.c \
        printgprof.c printlist.c kernel.c
 
-.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_CPUARCH} != "riscv" && \
-    ${MACHINE_ARCH} != "s390x"
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" 
 SRCS+= aout.c
 CFLAGS+=       -DWITH_AOUT
 .endif

Modified: head/usr.bin/gprof/gprof.h
==============================================================================
--- head/usr.bin/gprof/gprof.h  Mon Sep 14 16:12:28 2020        (r365726)
+++ head/usr.bin/gprof/gprof.h  Mon Sep 14 16:18:53 2020        (r365727)
@@ -39,27 +39,14 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#if __amd64__
-#   include "amd64.h"
-#endif
-#if __arm__
-#   include "arm.h"
-#endif
-#if __i386__
-#   include "i386.h"
-#endif
-#if __mips__
-#   include "mips.h"
-#endif
-#if __powerpc__
-#   include "powerpc.h"
-#endif
-#if __sparc64__
-#   include "sparc64.h"
-#endif
-#if __riscv
-#    include "riscv.h"
-#endif
+    /*
+     * offset (in bytes) of the code from the entry address of a routine.
+     * (see asgnsamples for use and explanation.)
+     */
+#define OFFSET_OF_CODE 0
+
+enum opermodes { dummy };
+typedef enum opermodes operandenum;
 
     /*
      * booleans
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to