aboutsummaryrefslogtreecommitdiff
path: root/12.2.0
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-08-22 02:36:41 +0100
committerSam James <sam@gentoo.org>2022-08-22 02:41:31 +0100
commit54f6fbbd7723ed3605381c1b8e2bed473e409aa8 (patch)
tree6d59c8136f96a89b861f6793f714f810caec5eab /12.2.0
parent12.2.0: clone of 12.1.0 (diff)
downloadgcc-patches-54f6fbbd7723ed3605381c1b8e2bed473e409aa8.tar.gz
gcc-patches-54f6fbbd7723ed3605381c1b8e2bed473e409aa8.tar.bz2
gcc-patches-54f6fbbd7723ed3605381c1b8e2bed473e409aa8.zip
12.2.0: add 75_all_go_posix_shell_arithmetic_nonbash.patch
Fix build w/ USE=go with /bin/sh not being bash. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '12.2.0')
-rw-r--r--12.2.0/gentoo/75_all_go_posix_shell_arithmetic_nonbash.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/12.2.0/gentoo/75_all_go_posix_shell_arithmetic_nonbash.patch b/12.2.0/gentoo/75_all_go_posix_shell_arithmetic_nonbash.patch
new file mode 100644
index 0000000..57e9060
--- /dev/null
+++ b/12.2.0/gentoo/75_all_go_posix_shell_arithmetic_nonbash.patch
@@ -0,0 +1,40 @@
+https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=cf1725610526fe347d2530455b32affc033fd7fc
+
+From cf1725610526fe347d2530455b32affc033fd7fc Mon Sep 17 00:00:00 2001
+From: Ian Lance Taylor <iant@golang.org>
+Date: Fri, 22 Jul 2022 11:38:20 -0700
+Subject: [PATCH] libgo: use POSIX shell arithmetic expansion
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+Avoid bash-specific ((expression)) syntax. As the bash syntax
+converts a non-zero value to a zero status (and a zero value to a 1
+status), and POSIX arithmetic expansion does not, we have to negate
+the result.
+
+Based on patch by Sören Tempel.
+
+Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/419154
+--- a/libgo/match.sh
++++ b/libgo/match.sh
+@@ -111,7 +111,7 @@ gobuild() {
+ if test "$goarch" != "386"; then
+ line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
+ fi
+- (($line))
++ return $((!($line)))
+ }
+
+ matched=
+--- a/libgo/testsuite/gotest
++++ b/libgo/testsuite/gotest
+@@ -302,7 +302,7 @@ gobuild() {
+ if test "$goarch" != "386"; then
+ line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
+ fi
+- (($line))
++ return $((!($line)))
+ }
+
+ case "x$gofiles" in