pmaports/cross/gcc-armv7/0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch

32 lines
1.1 KiB
Diff
Raw Normal View History

From 38270192ea355d8035d9f1b5fe50e36ca3fa3708 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 30 Jun 2022 17:04:23 +0000
Subject: [PATCH] gcc-go: fix build error with SYS_SECCOMP
fix the build error:
sysinfo.go:6606:7: error: redefinition of 'SYS_SECCOMP'
6606 | const SYS_SECCOMP = _SYS_SECCOMP
| ^
sysinfo.go:6600:7: note: previous definition of 'SYS_SECCOMP' was here
6600 | const SYS_SECCOMP = _SYS_seccomp
| ^
Upstream report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105225
---
libgo/mksysinfo.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 6fef104cc1c..06289a43bdf 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -126,7 +126,7 @@ if ! grep '^const SIGCLD ' ${OUT} >/dev/null 2>&1; then
fi
# The syscall numbers. We force the names to upper case.
-grep '^const _SYS_' gen-sysinfo.go | \
+grep '^const _SYS_[a-z]' gen-sysinfo.go | \
sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
while read sys; do
sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`