From 2c6b185c418c128aed36b91199c064be28c163d0 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 14 Feb 2019 20:16:05 -0800 Subject: Patch elf2flt to fix the breakage with host GCC8 ... and binutils 2.32 (more headers needed). Signed-off-by: Alexey Neyman --- .../0000-Create-more-symlinks-to-BFD-headers.patch | 38 ++++++++++++++++++++++ .../elf2flt/git-6d80ab6c/0000-diagnostics.h.patch | 30 ----------------- .../0001-Check-output_elf-for-being-NULL.patch | 32 ++++++++++++++++++ 3 files changed, 70 insertions(+), 30 deletions(-) create mode 100644 packages/elf2flt/git-6d80ab6c/0000-Create-more-symlinks-to-BFD-headers.patch delete mode 100644 packages/elf2flt/git-6d80ab6c/0000-diagnostics.h.patch create mode 100644 packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch (limited to 'packages') diff --git a/packages/elf2flt/git-6d80ab6c/0000-Create-more-symlinks-to-BFD-headers.patch b/packages/elf2flt/git-6d80ab6c/0000-Create-more-symlinks-to-BFD-headers.patch new file mode 100644 index 00000000..4b0fb908 --- /dev/null +++ b/packages/elf2flt/git-6d80ab6c/0000-Create-more-symlinks-to-BFD-headers.patch @@ -0,0 +1,38 @@ +From 902813b98dc5dd25719530d90a1d1502258eb458 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Sat, 29 Sep 2018 13:12:08 -0700 +Subject: [PATCH] Create more symlinks to BFD headers + +... diagnostics.h and bfd_stdint.h, included by . + +Signed-off-by: Alexey Neyman +--- + Makefile.in | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index cfad06c..ed63bea 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -123,11 +123,16 @@ sinclude .deps + $(CC) -MM $(CPPFLAGS) $(srcdir)/*.c > .deps + + ++# Some versions of binutils may not have all these headers (diagnostics.h ++# appeared in binutils 2.31; bfd_stdint.h in 2.32) so some symlinks may be ++# dangling. + bfd-headers/.stamp: + rm -rf bfd-headers + mkdir bfd-headers +- ln -sf $(BFD_INCLUDE_DIR)/bfd.h bfd-headers/bfd.h +- for f in ansidecl filenames hashtab libiberty symcat; do \ ++ for f in bfd bfd_stdint; do \ ++ ln -sf $(BFD_INCLUDE_DIR)/$$f.h bfd-headers/$$f.h || exit 1; \ ++ done ++ for f in ansidecl filenames hashtab libiberty symcat diagnostics; do \ + ln -sf $(BINUTILS_INCLUDE_DIR)/$$f.h bfd-headers/$$f.h || exit 1; \ + done + ln -sf $(BINUTILS_INCLUDE_DIR)/elf bfd-headers/elf +-- +2.19.1 + diff --git a/packages/elf2flt/git-6d80ab6c/0000-diagnostics.h.patch b/packages/elf2flt/git-6d80ab6c/0000-diagnostics.h.patch deleted file mode 100644 index b74a0ac2..00000000 --- a/packages/elf2flt/git-6d80ab6c/0000-diagnostics.h.patch +++ /dev/null @@ -1,30 +0,0 @@ -commit 2c8ab83ec84662f4916b5237da3e4330956a32eb -Author: Alexey Neyman -Date: Sat Sep 29 13:12:08 2018 -0700 - - Create symlink to in bfd-headers - - Included by . - - Signed-off-by: Alexey Neyman - -diff --git a/Makefile.in b/Makefile.in -index cfad06c..8162cba 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -123,11 +123,14 @@ sinclude .deps - $(CC) -MM $(CPPFLAGS) $(srcdir)/*.c > .deps - - -+# Not all versions of binutils have all these headers, some may end up -+# as dangling symlinks - bfd-headers/.stamp: - rm -rf bfd-headers - mkdir bfd-headers - ln -sf $(BFD_INCLUDE_DIR)/bfd.h bfd-headers/bfd.h -- for f in ansidecl filenames hashtab libiberty symcat; do \ -+ ln -sf $(BFD_INCLUDE_DIR)/diagnostics.h bfd-headers/diagnostics.h -+ for f in ansidecl filenames hashtab libiberty symcat diagnostics; do \ - ln -sf $(BINUTILS_INCLUDE_DIR)/$$f.h bfd-headers/$$f.h || exit 1; \ - done - ln -sf $(BINUTILS_INCLUDE_DIR)/elf bfd-headers/elf diff --git a/packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch b/packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch new file mode 100644 index 00000000..06c4044a --- /dev/null +++ b/packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch @@ -0,0 +1,32 @@ +From b6a77bbebb4573d1899cc72e964e9875aae64436 Mon Sep 17 00:00:00 2001 +From: Alexey Neyman +Date: Thu, 14 Feb 2019 20:12:34 -0800 +Subject: [PATCH] Check `output_elf' for being NULL + +... before passing it to unlink(). GCC8.2 detects that one of the +branches in do_final_link() does not initialize it from its original +value, NULL. + +Signed-off-by: Alexey Neyman +--- + ld-elf2flt.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/ld-elf2flt.c b/ld-elf2flt.c +index de39fe0..ccb09b5 100644 +--- a/ld-elf2flt.c ++++ b/ld-elf2flt.c +@@ -568,7 +568,9 @@ int main(int argc, char *argv[]) + if (!flag_verbose) { + unlink(tmp_file); + unlink(output_flt); +- unlink(output_elf); ++ if (output_elf) { ++ unlink(output_elf); ++ } + } else { + fprintf(stderr, + "leaving elf2flt temp files behind:\n" +-- +2.19.1 + -- cgit v1.2.3 From d5c73fd9e688ccb4b060d3295574e9333c4bbff5 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 15 Feb 2019 13:39:50 -0800 Subject: strace 4.26 doesn't build on mips/o32 ... so pick up a patch from upstream. Signed-off-by: Alexey Neyman --- packages/strace/4.26/0000-mips-o32-fix-build.patch | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 packages/strace/4.26/0000-mips-o32-fix-build.patch (limited to 'packages') diff --git a/packages/strace/4.26/0000-mips-o32-fix-build.patch b/packages/strace/4.26/0000-mips-o32-fix-build.patch new file mode 100644 index 00000000..d3c828ec --- /dev/null +++ b/packages/strace/4.26/0000-mips-o32-fix-build.patch @@ -0,0 +1,91 @@ +commit 2c8b6de913973274e877639658e9e7273a012adb +Author: Dmitry V. Levin +Date: Tue Jan 8 19:23:44 2019 +0000 + + mips o32: fix build + + Commit 917c2ccf3a67 "Refactor stack pointers" moved mips_REG_* macros + from linux/mips/arch_regs.h to linux/mips/arch_regs.c because these + macros are no longer used outside syscall.c or files included by + syscall.c, but this caused a build regression on mips o32 because + decode_syscall_subcall() uses mips_REG_SP prior to its definition. + + * syscall.c (decode_syscall_subcall): Move ... + * linux/mips/get_syscall_args.c: ... here. + * NEWS: Mention this fix. + + Reported-by: Baruch Siach + Fixes: v4.26~61 "Refactor stack pointers" + +diff --git a/linux/mips/get_syscall_args.c b/linux/mips/get_syscall_args.c +index 387aa852..e2889f98 100644 +--- a/linux/mips/get_syscall_args.c ++++ b/linux/mips/get_syscall_args.c +@@ -37,3 +37,29 @@ arch_get_syscall_args(struct tcb *tcp) + #endif + return 1; + } ++ ++#ifdef SYS_syscall_subcall ++static void ++decode_syscall_subcall(struct tcb *tcp) ++{ ++ if (!scno_is_valid(tcp->u_arg[0])) ++ return; ++ tcp->scno = tcp->u_arg[0]; ++ tcp->qual_flg = qual_flags(tcp->scno); ++ tcp->s_ent = &sysent[tcp->scno]; ++ memmove(&tcp->u_arg[0], &tcp->u_arg[1], ++ sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); ++ /* ++ * Fetching the last arg of 7-arg syscalls (fadvise64_64 ++ * and sync_file_range) requires additional code, ++ * see linux/mips/get_syscall_args.c ++ */ ++ if (tcp->s_ent->nargs == MAX_ARGS) { ++ if (umoven(tcp, ++ mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]), ++ sizeof(tcp->u_arg[0]), ++ &tcp->u_arg[MAX_ARGS - 1]) < 0) ++ tcp->u_arg[MAX_ARGS - 1] = 0; ++ } ++} ++#endif /* SYS_syscall_subcall */ +diff --git a/syscall.c b/syscall.c +index d78f51dd..51fcc721 100644 +--- a/syscall.c ++++ b/syscall.c +@@ -349,31 +349,8 @@ decode_ipc_subcall(struct tcb *tcp) + #endif /* SYS_ipc_subcall */ + + #ifdef SYS_syscall_subcall +-static void +-decode_syscall_subcall(struct tcb *tcp) +-{ +- if (!scno_is_valid(tcp->u_arg[0])) +- return; +- tcp->scno = tcp->u_arg[0]; +- tcp->qual_flg = qual_flags(tcp->scno); +- tcp->s_ent = &sysent[tcp->scno]; +- memmove(&tcp->u_arg[0], &tcp->u_arg[1], +- sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); +-# ifdef LINUX_MIPSO32 +- /* +- * Fetching the last arg of 7-arg syscalls (fadvise64_64 +- * and sync_file_range) requires additional code, +- * see linux/mips/get_syscall_args.c +- */ +- if (tcp->s_ent->nargs == MAX_ARGS) { +- if (umoven(tcp, +- mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]), +- sizeof(tcp->u_arg[0]), +- &tcp->u_arg[MAX_ARGS - 1]) < 0) +- tcp->u_arg[MAX_ARGS - 1] = 0; +- } +-# endif /* LINUX_MIPSO32 */ +-} ++/* The implementation is architecture specific. */ ++static void decode_syscall_subcall(struct tcb *); + #endif /* SYS_syscall_subcall */ + + static void -- cgit v1.2.3 From 187aee1735421c983e792bcc96875f729391e906 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 18 Feb 2019 00:36:26 -0800 Subject: No longer mark newlib 3.x experimental ... they seem to have overcome the birthing pains of 3.0.0 and build is stable. Signed-off-by: Alexey Neyman --- packages/newlib/3.0.0.20180831/version.desc | 1 - packages/newlib/3.1.0.20181231/version.desc | 1 - 2 files changed, 2 deletions(-) (limited to 'packages') diff --git a/packages/newlib/3.0.0.20180831/version.desc b/packages/newlib/3.0.0.20180831/version.desc index 76f14476..e69de29b 100644 --- a/packages/newlib/3.0.0.20180831/version.desc +++ b/packages/newlib/3.0.0.20180831/version.desc @@ -1 +0,0 @@ -experimental='yes' diff --git a/packages/newlib/3.1.0.20181231/version.desc b/packages/newlib/3.1.0.20181231/version.desc index 76f14476..e69de29b 100644 --- a/packages/newlib/3.1.0.20181231/version.desc +++ b/packages/newlib/3.1.0.20181231/version.desc @@ -1 +0,0 @@ -experimental='yes' -- cgit v1.2.3 From 8a61f74f38e33166f6be0dde0cae82cfe055c3bf Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 18 Feb 2019 00:55:23 -0800 Subject: Pick up a newer revision of elf2flt ... which includes the two local patches we have. Signed-off-by: Alexey Neyman --- .../0000-Create-more-symlinks-to-BFD-headers.patch | 38 ---------------------- .../0001-Check-output_elf-for-being-NULL.patch | 32 ------------------ packages/elf2flt/package.desc | 2 +- 3 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 packages/elf2flt/git-6d80ab6c/0000-Create-more-symlinks-to-BFD-headers.patch delete mode 100644 packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch (limited to 'packages') diff --git a/packages/elf2flt/git-6d80ab6c/0000-Create-more-symlinks-to-BFD-headers.patch b/packages/elf2flt/git-6d80ab6c/0000-Create-more-symlinks-to-BFD-headers.patch deleted file mode 100644 index 4b0fb908..00000000 --- a/packages/elf2flt/git-6d80ab6c/0000-Create-more-symlinks-to-BFD-headers.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 902813b98dc5dd25719530d90a1d1502258eb458 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Sat, 29 Sep 2018 13:12:08 -0700 -Subject: [PATCH] Create more symlinks to BFD headers - -... diagnostics.h and bfd_stdint.h, included by . - -Signed-off-by: Alexey Neyman ---- - Makefile.in | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index cfad06c..ed63bea 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -123,11 +123,16 @@ sinclude .deps - $(CC) -MM $(CPPFLAGS) $(srcdir)/*.c > .deps - - -+# Some versions of binutils may not have all these headers (diagnostics.h -+# appeared in binutils 2.31; bfd_stdint.h in 2.32) so some symlinks may be -+# dangling. - bfd-headers/.stamp: - rm -rf bfd-headers - mkdir bfd-headers -- ln -sf $(BFD_INCLUDE_DIR)/bfd.h bfd-headers/bfd.h -- for f in ansidecl filenames hashtab libiberty symcat; do \ -+ for f in bfd bfd_stdint; do \ -+ ln -sf $(BFD_INCLUDE_DIR)/$$f.h bfd-headers/$$f.h || exit 1; \ -+ done -+ for f in ansidecl filenames hashtab libiberty symcat diagnostics; do \ - ln -sf $(BINUTILS_INCLUDE_DIR)/$$f.h bfd-headers/$$f.h || exit 1; \ - done - ln -sf $(BINUTILS_INCLUDE_DIR)/elf bfd-headers/elf --- -2.19.1 - diff --git a/packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch b/packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch deleted file mode 100644 index 06c4044a..00000000 --- a/packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b6a77bbebb4573d1899cc72e964e9875aae64436 Mon Sep 17 00:00:00 2001 -From: Alexey Neyman -Date: Thu, 14 Feb 2019 20:12:34 -0800 -Subject: [PATCH] Check `output_elf' for being NULL - -... before passing it to unlink(). GCC8.2 detects that one of the -branches in do_final_link() does not initialize it from its original -value, NULL. - -Signed-off-by: Alexey Neyman ---- - ld-elf2flt.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/ld-elf2flt.c b/ld-elf2flt.c -index de39fe0..ccb09b5 100644 ---- a/ld-elf2flt.c -+++ b/ld-elf2flt.c -@@ -568,7 +568,9 @@ int main(int argc, char *argv[]) - if (!flag_verbose) { - unlink(tmp_file); - unlink(output_flt); -- unlink(output_elf); -+ if (output_elf) { -+ unlink(output_elf); -+ } - } else { - fprintf(stderr, - "leaving elf2flt temp files behind:\n" --- -2.19.1 - diff --git a/packages/elf2flt/package.desc b/packages/elf2flt/package.desc index c46788c1..a6b8093d 100644 --- a/packages/elf2flt/package.desc +++ b/packages/elf2flt/package.desc @@ -1,2 +1,2 @@ repository='git https://github.com/uclinux-dev/elf2flt.git' -repository_cset='6d80ab6c93409e796f85da404bde84b841231531' +repository_cset='7e33f28df198c46764021ed14408bd262751e148' -- cgit v1.2.3