[Bug 201204] stable/10 mips build fails in usr.bin/gcore

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jul 2 18:05:41 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201204

--- Comment #1 from na at rtfm.net ---
Based on a grep for that symbol, I think it's pretty certain that the tiny
patch below is correct. Any chance we can fix this before 10.2-RELEASE?

The complete grep:

./sys/arm/include/elf.h:#define    ELF_MACHINE_OK(x) ((x) == EM_ARM)
./sys/ia64/include/elf.h:#define    ELF_MACHINE_OK(x) ((x) == EM_IA_64)
./sys/mips/include/elf.h:#define    ELF_MACHINE_OK(x) ((x) == EM_MIPS)
./sys/powerpc/include/elf.h:#define    ELF_MACHINE_OK(x) ((x) == EM_PPC64)
./sys/powerpc/include/elf.h:#define    ELF_MACHINE_OK(x) ((x) == EM_PPC)
./sys/sparc64/include/elf.h:#define    ELF_MACHINE_OK(x)    ((x) == ELF_ARCH)
./sys/x86/include/elf.h:#define    ELF_MACHINE_OK(x) ((x) == EM_386 || (x) ==
EM_486)
./sys/x86/include/elf.h:#define    ELF_MACHINE_OK(x) ((x) == EM_X86_64)
./usr.bin/gcore/elfcore.c:    if (!ELF_MACHINE_OK(machine))

And the (obvious?) patch:

Index: sys/mips/include/elf.h
===================================================================
--- sys/mips/include/elf.h    (revision 285049)
+++ sys/mips/include/elf.h    (working copy)
@@ -77,6 +77,8 @@
 #define ELF_ARCH    EM_MIPS
 #define ELF_ARCH32    EM_MIPS

+#define    ELF_MACHINE_OK(x) ((x) == EM_MIPS)
+
 /* Define "machine" characteristics */
 #if __ELF_WORD_SIZE == 32
 #define    ELF_TARG_CLASS    ELFCLASS32

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list