[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: gnu: binutils: Work around Bash 4.2 bug.
From: |
Ludovic Courtès |
Subject: |
01/01: gnu: binutils: Work around Bash 4.2 bug. |
Date: |
Wed, 28 Sep 2016 20:44:46 +0000 (UTC) |
civodul pushed a commit to branch core-updates
in repository guix.
commit 789f09a073a7239aee2e551d52b5b5ea9f41bb90
Author: Ludovic Courtès <address@hidden>
Date: Wed Sep 28 22:32:44 2016 +0200
gnu: binutils: Work around Bash 4.2 bug.
Fixes a 'binutils-cross-boot0' build failure on mips64el.
Reported at
<https://lists.gnu.org/archive/html/guix-devel/2016-09/msg01083.html>.
* gnu/packages/patches/binutils-mips-bash-bug.patch: New file.
* gnu/packages/base.scm (binutils)[source]: Use it.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/base.scm | 3 ++-
gnu/packages/patches/binutils-mips-bash-bug.patch | 22 +++++++++++++++++++++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 8247e8b..8ca2462 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -455,6 +455,7 @@ dist_patch_DATA =
\
%D%/packages/patches/bigloo-gc-shebangs.patch \
%D%/packages/patches/binutils-ld-new-dtags.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \
+ %D%/packages/patches/binutils-mips-bash-bug.patch \
%D%/packages/patches/byobu-writable-status.patch \
%D%/packages/patches/calibre-drop-unrar.patch \
%D%/packages/patches/calibre-no-updates-dialog.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index cab5793..0ea6114 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -386,7 +386,8 @@ change. GNU make offers many powerful extensions over the
standard utility.")
(base32
"125clslv17xh1sab74343fg6v31msavpmaa1c1394zsqa773g5rn"))
(patches (search-patches "binutils-ld-new-dtags.patch"
- "binutils-loongson-workaround.patch"))))
+ "binutils-loongson-workaround.patch"
+ "binutils-mips-bash-bug.patch"))))
(build-system gnu-build-system)
;; TODO: Add dependency on zlib + those for Gold.
diff --git a/gnu/packages/patches/binutils-mips-bash-bug.patch
b/gnu/packages/patches/binutils-mips-bash-bug.patch
new file mode 100644
index 0000000..08d3a79
--- /dev/null
+++ b/gnu/packages/patches/binutils-mips-bash-bug.patch
@@ -0,0 +1,22 @@
+Bash 4.2.0(1)-release, which we use during bootstrap, does not yield the
+"x" case in:
+
+ case x"$EMULATION_NAME" in x) ;; *) ;; esac
+
+when 'EMULATION_NAME' is undefined. Bash 4.3.30(1)-release doesn't have this
+problem. Work around it.
+
+This Bash bug was fixed
+in <http://ftp.gnu.org/gnu/bash/bash-4.2-patches/bash42-007>.
+
+--- a/ld/emulparams/elf32bmipn32-defs.sh
++++ b/ld/emulparams/elf32bmipn32-defs.sh
+@@ -13,7 +13,7 @@ LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+ TEMPLATE_NAME=elf32
+ EXTRA_EM_FILE=mipself
+
+-case x"$EMULATION_NAME" in
++case "x$EMULATION_NAME" in
+ xelf32*n32*) ELFSIZE=32 ;;
+ xelf64*) ELFSIZE=64 ;;
+ x) ;;