golang: clang 11 compatibility for arm, i686 and x86_64

This commit is contained in:
Leonid Pliushch 2020-12-29 00:49:06 +02:00
parent 20f7ae73af
commit 533e798729
No known key found for this signature in database
GPG Key ID: 45F2964132545795
2 changed files with 37 additions and 1 deletions

View File

@ -5,7 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux"
_MAJOR_VERSION=1.15.6 _MAJOR_VERSION=1.15.6
# Use the ~ deb versioning construct in the future: # Use the ~ deb versioning construct in the future:
TERMUX_PKG_VERSION=2:${_MAJOR_VERSION} TERMUX_PKG_VERSION=2:${_MAJOR_VERSION}
TERMUX_PKG_REVISION=2 TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://storage.googleapis.com/golang/go${_MAJOR_VERSION}.src.tar.gz TERMUX_PKG_SRCURL=https://storage.googleapis.com/golang/go${_MAJOR_VERSION}.src.tar.gz
TERMUX_PKG_SHA256=890bba73c5e2b19ffb1180e385ea225059eb008eb91b694875dd86ea48675817 TERMUX_PKG_SHA256=890bba73c5e2b19ffb1180e385ea225059eb008eb91b694875dd86ea48675817
TERMUX_PKG_DEPENDS="clang" TERMUX_PKG_DEPENDS="clang"

View File

@ -1,3 +1,27 @@
diff -uNr go/src/runtime/cgo/gcc_linux_386.c go.mod/src/runtime/cgo/gcc_linux_386.c
--- go/src/runtime/cgo/gcc_linux_386.c 2020-12-03 19:32:44.000000000 +0200
+++ go.mod/src/runtime/cgo/gcc_linux_386.c 2020-12-29 00:48:40.168176970 +0200
@@ -12,7 +12,7 @@
static void (*setg_gcc)(void*);
// This will be set in gcc_android.c for android-specific customization.
-void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
+extern void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
void
x_cgo_init(G *g, void (*setg)(void*), void **tlsg, void **tlsbase)
diff -uNr go/src/runtime/cgo/gcc_linux_amd64.c go.mod/src/runtime/cgo/gcc_linux_amd64.c
--- go/src/runtime/cgo/gcc_linux_amd64.c 2020-12-03 19:32:44.000000000 +0200
+++ go.mod/src/runtime/cgo/gcc_linux_amd64.c 2020-12-29 00:48:32.264109154 +0200
@@ -14,7 +14,7 @@
static void (*setg_gcc)(void*);
// This will be set in gcc_android.c for android-specific customization.
-void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
+extern void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
void
x_cgo_init(G *g, void (*setg)(void*), void **tlsg, void **tlsbase)
diff -uNr go/src/runtime/cgo/gcc_linux_arm64.c go.mod/src/runtime/cgo/gcc_linux_arm64.c diff -uNr go/src/runtime/cgo/gcc_linux_arm64.c go.mod/src/runtime/cgo/gcc_linux_arm64.c
--- go/src/runtime/cgo/gcc_linux_arm64.c 2020-12-03 19:32:44.000000000 +0200 --- go/src/runtime/cgo/gcc_linux_arm64.c 2020-12-03 19:32:44.000000000 +0200
+++ go.mod/src/runtime/cgo/gcc_linux_arm64.c 2020-12-29 00:12:33.341670237 +0200 +++ go.mod/src/runtime/cgo/gcc_linux_arm64.c 2020-12-29 00:12:33.341670237 +0200
@ -10,3 +34,15 @@ diff -uNr go/src/runtime/cgo/gcc_linux_arm64.c go.mod/src/runtime/cgo/gcc_linux_
static void (*setg_gcc)(void*); static void (*setg_gcc)(void*);
void void
diff -uNr go/src/runtime/cgo/gcc_linux_arm.c go.mod/src/runtime/cgo/gcc_linux_arm.c
--- go/src/runtime/cgo/gcc_linux_arm.c 2020-12-03 19:32:44.000000000 +0200
+++ go.mod/src/runtime/cgo/gcc_linux_arm.c 2020-12-29 00:48:23.968037988 +0200
@@ -10,7 +10,7 @@
static void *threadentry(void*);
-void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
+extern void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
static void (*setg_gcc)(void*);
void