From 43fc8224dfc7e12af860e3b55af0ee1e5ad09fd7 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 28 Feb 2017 09:34:49 -0800 Subject: Macos needs a local ELF header, too Signed-off-by: Alexey Neyman --- .../110-macos-use-local-elf.h.patch | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 patches/elf2flt/4820f0dbb77cd6564d5fa0817218fe2a1fb99f32/110-macos-use-local-elf.h.patch (limited to 'patches/elf2flt/4820f0dbb77cd6564d5fa0817218fe2a1fb99f32/110-macos-use-local-elf.h.patch') diff --git a/patches/elf2flt/4820f0dbb77cd6564d5fa0817218fe2a1fb99f32/110-macos-use-local-elf.h.patch b/patches/elf2flt/4820f0dbb77cd6564d5fa0817218fe2a1fb99f32/110-macos-use-local-elf.h.patch new file mode 100644 index 00000000..b189b69f --- /dev/null +++ b/patches/elf2flt/4820f0dbb77cd6564d5fa0817218fe2a1fb99f32/110-macos-use-local-elf.h.patch @@ -0,0 +1,57 @@ +From 1c19bf8cc294e95c8de314cc457bcea6854c3a2d Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Tue, 28 Feb 2017 09:29:21 -0800 +Subject: [PATCH 2/2] Macos does not have and needs a local copy + +Also, move up - generic does not have +definitions for xtensa relocations. + +Local file, cygwin-elf.h, needs to include for standard +integer types which is POSIX - rather than glibc-originated . + +Signed-off-by: Alexey Neyman +--- + cygwin-elf.h | 2 +- + elf2flt.c | 7 +++++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/cygwin-elf.h b/cygwin-elf.h +index bd72b37..8e3dbff 100644 +--- a/cygwin-elf.h ++++ b/cygwin-elf.h +@@ -26,7 +26,7 @@ typedef uint16_t u_int16_t; + typedef uint32_t u_int32_t; + typedef uint64_t u_int64_t; + #else +-#include ++#include + #endif + /* Standard ELF types. */ + +diff --git a/elf2flt.c b/elf2flt.c +index 08296cf..19a4d4d 100644 +--- a/elf2flt.c ++++ b/elf2flt.c +@@ -58,14 +58,17 @@ const char *elf2flt_progname; + #include /* TARGET_* ELF support for the BFD library */ + #elif defined(TARGET_arm) + #include +-#elif defined(__CYGWIN__) || defined(__MINGW32__) || defined(TARGET_nios) || defined(TARGET_nios2) +-#include "cygwin-elf.h" /* Cygwin uses a local copy */ + #elif defined(TARGET_xtensa) + #include /* TARGET_* ELF support for the BFD library */ ++#elif defined(TARGET_nios) || defined(TARGET_nios2) ++#include "cygwin-elf.h" // does not have R_NIOS_* declarations + #elif defined(TARGET_microblaze) + #include /* TARGET_* ELF support for the BFD library */ + #elif defined(TARGET_v850) + #include ++#elif (__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) ++// FIXME: does Cygwin need this? It has in /usr/include ++#include "cygwin-elf.h" // Some systems don't have + #else + #include /* TARGET_* ELF support for the BFD library */ + #endif +-- +2.9.3 + -- cgit v1.2.3