Skip to content

Commit 1d78139

Browse files
committed
runtime/cgo: fix Android build with NDK 22
Fixes #42655 Change-Id: I7d2b70098a4ba4dcb325fb0be076043789b86135 Reviewed-on: https://go-review.googlesource.com/c/go/+/280312 Run-TryBot: Elias Naur <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Trust: Elias Naur <[email protected]>
1 parent 2018b68 commit 1d78139

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/runtime/cgo/gcc_linux_386.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ static void *threadentry(void*);
1212
static void (*setg_gcc)(void*);
1313

1414
// This will be set in gcc_android.c for android-specific customization.
15-
void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
15+
void (*x_cgo_inittls)(void **tlsg, void **tlsbase) __attribute__((common));
1616

1717
void
1818
x_cgo_init(G *g, void (*setg)(void*), void **tlsg, void **tlsbase)

src/runtime/cgo/gcc_linux_amd64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ static void* threadentry(void*);
1414
static void (*setg_gcc)(void*);
1515

1616
// This will be set in gcc_android.c for android-specific customization.
17-
void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
17+
void (*x_cgo_inittls)(void **tlsg, void **tlsbase) __attribute__((common));
1818

1919
void
2020
x_cgo_init(G *g, void (*setg)(void*), void **tlsg, void **tlsbase)

src/runtime/cgo/gcc_linux_arm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
static void *threadentry(void*);
1212

13-
void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
13+
void (*x_cgo_inittls)(void **tlsg, void **tlsbase) __attribute__((common));
1414
static void (*setg_gcc)(void*);
1515

1616
void

src/runtime/cgo/gcc_linux_arm64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
static void *threadentry(void*);
1414

15-
void (*x_cgo_inittls)(void **tlsg, void **tlsbase);
15+
void (*x_cgo_inittls)(void **tlsg, void **tlsbase) __attribute__((common));
1616
static void (*setg_gcc)(void*);
1717

1818
void

0 commit comments

Comments
 (0)