summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Sahdev <himanshusah@hcl.com>2019-08-26 17:57:45 +0530
committerMartin Roth <martinroth@google.com>2019-10-26 16:30:15 +0000
commit6a3cf1b6fc34f95e8b496232f78df75c14b48a38 (patch)
treeedad752006733c90fe60d3e75e2a03cf41da681a
parentbc1dbb3cc3f5b19765213acfb2f7ef8c0a473e5f (diff)
util/crossgcc/patches: facilitate successful build of ipxe
New changes in the latest binutils 2.32 lead to assembler errors causes ipxe build failure. IPXE uses the divide test which requires /dev/null as input as well as the output file name. This patch facilitates the /dev/null as an exception to the current changes in binutils package while building crossgcc for coreboot leads to successful build of ipxe and further tests to pass based on /dev/null and applies automatically during the crossgcc rebuild. Also, this can be reverted once binutils/ipxe provides an updated release in this respect. Fixes: https://ticket.coreboot.org/issues/204 Change-Id: I9f664829b8c42420c0b2ab1f2316150f86ac0b1a Signed-off-by: Himanshu Sahdev <himanshusah@hcl.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35098 Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--util/crossgcc/patches/binutils-2.32_as-ipxe.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/util/crossgcc/patches/binutils-2.32_as-ipxe.patch b/util/crossgcc/patches/binutils-2.32_as-ipxe.patch
new file mode 100644
index 0000000000..4d2c00a17f
--- /dev/null
+++ b/util/crossgcc/patches/binutils-2.32_as-ipxe.patch
@@ -0,0 +1,36 @@
+From 6984bd861cc595e56d26ea033851d9174e855129 Mon Sep 17 00:00:00 2001
+From: Himanshu Sahdev aka CunningLearner <sahdev.himan@gmail.com>
+Date: Mon, 26 Aug 2019 16:57:13 +0530
+Subject: [PATCH] as: facilitate tests based on /dev/null
+
+Signed-off-by: Himanshu Sahdev <himanshusah@hcl.com>
+
+---
+ gas/as.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gas/as.c b/gas/as.c
+index 728811bc..78b4802c 100644
+--- a/gas/as.c
++++ b/gas/as.c
+@@ -1203,7 +1203,7 @@ main (int argc, char ** argv)
+ {
+ char ** argv_orig = argv;
+ struct stat sob;
+-
++ const char *dev_null_file="/dev/null";
+ int macro_strip_at;
+
+ start_time = get_run_time ();
+@@ -1252,7 +1252,7 @@ main (int argc, char ** argv)
+ so that switches like --hash-size can be honored. */
+ parse_args (&argc, &argv);
+
+- if (argc > 1 && stat (out_file_name, &sob) == 0)
++ if (argc > 1 && stat (out_file_name, &sob) == 0 && strcmp(out_file_name,dev_null_file)!=0)
+ {
+ int i;
+
+--
+2.17.1
+