summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2019-02-15 04:16:05 (GMT)
committerAlexey Neyman <stilor@att.net>2019-02-15 07:32:25 (GMT)
commit2c6b185c418c128aed36b91199c064be28c163d0 (patch)
tree30ad1f7cdb3ad51b9fb93b8ee4e2fa6e2850990c /packages
parent7c7eca2fab5a5a548c08b3ad48030788b8cb853b (diff)
Patch elf2flt to fix the breakage with host GCC8
... and binutils 2.32 (more headers needed). Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'packages')
-rw-r--r--packages/elf2flt/git-6d80ab6c/0000-Create-more-symlinks-to-BFD-headers.patch38
-rw-r--r--packages/elf2flt/git-6d80ab6c/0000-diagnostics.h.patch30
-rw-r--r--packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch32
3 files changed, 70 insertions, 30 deletions
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 0000000..4b0fb90
--- /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 <stilor@att.net>
+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 <bfd/bfd.h>.
+
+Signed-off-by: Alexey Neyman <stilor@att.net>
+---
+ 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 b74a0ac..0000000
--- a/packages/elf2flt/git-6d80ab6c/0000-diagnostics.h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-commit 2c8ab83ec84662f4916b5237da3e4330956a32eb
-Author: Alexey Neyman <stilor@att.net>
-Date: Sat Sep 29 13:12:08 2018 -0700
-
- Create symlink to <bfd/diagnostics.h> in bfd-headers
-
- Included by <bfd/bfd.h>.
-
- Signed-off-by: Alexey Neyman <stilor@att.net>
-
-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 0000000..06c4044
--- /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 <stilor@att.net>
+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 <stilor@att.net>
+---
+ 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
+