diff options
Diffstat (limited to 'meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch')
-rw-r--r-- | meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch b/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch new file mode 100644 index 0000000000..c23ca94290 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.10/0004-ld-add-soname-to-shareable-objects.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 85252f0bd8743223eb778edbe9fb31dff17a23d8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Madison <matt@madison.systems> | ||
3 | Date: Sat, 17 Feb 2018 06:26:10 -0800 | ||
4 | Subject: [PATCH 4/9] ld: add soname to shareable objects | ||
5 | |||
6 | so that OE's shared library dependency handling | ||
7 | can find them. | ||
8 | |||
9 | Upstream-Status: Inappropriate [OE specific] | ||
10 | |||
11 | Signed-off-by: Matt Madison <matt@madison.systems> | ||
12 | --- | ||
13 | src/cmd/link/internal/ld/lib.go | 4 ++++ | ||
14 | 1 file changed, 4 insertions(+) | ||
15 | |||
16 | diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go | ||
17 | index 6dcaf64122..11cbb8a8bb 100644 | ||
18 | --- a/src/cmd/link/internal/ld/lib.go | ||
19 | +++ b/src/cmd/link/internal/ld/lib.go | ||
20 | @@ -1134,6 +1134,7 @@ func (ctxt *Link) hostlink() { | ||
21 | argv = append(argv, "-Wl,-z,relro") | ||
22 | } | ||
23 | argv = append(argv, "-shared") | ||
24 | + argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) | ||
25 | if ctxt.HeadType != objabi.Hwindows { | ||
26 | // Pass -z nodelete to mark the shared library as | ||
27 | // non-closeable: a dlclose will do nothing. | ||
28 | @@ -1145,6 +1146,8 @@ func (ctxt *Link) hostlink() { | ||
29 | argv = append(argv, "-Wl,-z,relro") | ||
30 | } | ||
31 | argv = append(argv, "-shared") | ||
32 | + argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) | ||
33 | + | ||
34 | case BuildModePlugin: | ||
35 | if ctxt.HeadType == objabi.Hdarwin { | ||
36 | argv = append(argv, "-dynamiclib") | ||
37 | @@ -1153,6 +1156,7 @@ func (ctxt *Link) hostlink() { | ||
38 | argv = append(argv, "-Wl,-z,relro") | ||
39 | } | ||
40 | argv = append(argv, "-shared") | ||
41 | + argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) | ||
42 | } | ||
43 | } | ||
44 | |||
45 | -- | ||
46 | 2.14.1 | ||
47 | |||