libbsd: Branch 'master'
Guillem Jover
guillem at kemper.freedesktop.org
Wed Apr 4 00:32:48 UTC 2018
src/local-elf.h | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit f6ed7c278bf9cf5db89da375505f636de3009598
Author: Baruch Siach <baruch at tkos.co.il>
Date: Tue Apr 3 20:10:14 2018 +0300
Fix build for openrisc with uClibc
uClibc defines EM_OR1K instead of EM_OPENRISC for the OpenRISC ELF
e_machine ID. Use EM_OR1K when EM_OPENRISC is not defined.
This fixes the following build failure:
In file included from nlist.c:44:0:
nlist.c: In function ‘__elf_is_okay__’:
local-elf.h:224:23: error: ‘EM_OPENRISC’ undeclared (first use in this function)
#define ELF_TARG_MACH EM_OPENRISC
^
nlist.c:77:26: note: in expansion of macro ‘ELF_TARG_MACH’
if (ehdr->e_machine == ELF_TARG_MACH &&
^
Signed-off-by: Guillem Jover <guillem at hadrons.org>
diff --git a/src/local-elf.h b/src/local-elf.h
index c11bf6e..83ca253 100644
--- a/src/local-elf.h
+++ b/src/local-elf.h
@@ -225,7 +225,11 @@
#elif defined(__or1k__)
+#if defined(EM_OPENRISC)
#define ELF_TARG_MACH EM_OPENRISC
+#else
+#define ELF_TARG_MACH EM_OR1K
+#endif
#define ELF_TARG_CLASS ELFCLASS32
#define ELF_TARG_DATA ELFDATA2MSB
More information about the libbsd
mailing list