diff options
author | Alexey Neyman <stilor@att.net> | 2019-02-14 20:16:05 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2019-02-14 23:32:25 -0800 |
commit | 2c6b185c418c128aed36b91199c064be28c163d0 (patch) | |
tree | 30ad1f7cdb3ad51b9fb93b8ee4e2fa6e2850990c /packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch | |
parent | 7c7eca2fab5a5a548c08b3ad48030788b8cb853b (diff) | |
download | crosstool-ng-2c6b185c418c128aed36b91199c064be28c163d0.tar.gz crosstool-ng-2c6b185c418c128aed36b91199c064be28c163d0.tar.bz2 crosstool-ng-2c6b185c418c128aed36b91199c064be28c163d0.zip |
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/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch')
-rw-r--r-- | packages/elf2flt/git-6d80ab6c/0001-Check-output_elf-for-being-NULL.patch | 32 |
1 files changed, 32 insertions, 0 deletions
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 <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 + |