Mercurial > hg > aboriginal
changeset 1832:76106c2cccf2 draft
Building uClibc's ldd using a musl host toolchain broke. Fix it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 04 Jan 2016 14:14:54 -0600 |
parents | a3e3a316b3ca |
children | d8233213e770 |
files | sources/patches/uClibc-lddwithmusl.patch |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/uClibc-lddwithmusl.patch Mon Jan 04 14:14:54 2016 -0600 @@ -0,0 +1,15 @@ +The uClibc ldd won't build with musl's elf.h because no ELFMAG_U32 symbol. +(Needed for CROSS_COMPILER_HOST=i686 now that toolchain's musl.) + +diff -ruN uClibc/utils/ldd.c uClibc.bak/utils/ldd.c +--- uClibc/utils/ldd.c 2016-01-03 17:56:54.737861633 -0600 ++++ uClibc.bak/utils/ldd.c 2016-01-03 17:58:39.165864429 -0600 +@@ -224,7 +224,7 @@ + + static int check_elf_header(ElfW(Ehdr) *const ehdr) + { +- if (!ehdr || *(uint32_t*)ehdr != ELFMAG_U32 ++ if (!ehdr || memcmp(ehdr, ELFMAG, 4) + || ehdr->e_ident[EI_CLASS] != ELFCLASSM + || ehdr->e_ident[EI_VERSION] != EV_CURRENT + ) {