diff options
Diffstat (limited to 'meta/recipes-devtools/go/go-1.17/0004-ld-add-soname-to-shareable-objects.patch')
-rw-r--r-- | meta/recipes-devtools/go/go-1.17/0004-ld-add-soname-to-shareable-objects.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.17/0004-ld-add-soname-to-shareable-objects.patch b/meta/recipes-devtools/go/go-1.17/0004-ld-add-soname-to-shareable-objects.patch new file mode 100644 index 0000000000..cd875f1164 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.17/0004-ld-add-soname-to-shareable-objects.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From bf5cf5301ae5914498454c87293d1df2e1d8489f Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Kube <alexander.j.kube@gmail.com> | ||
3 | Date: Wed, 23 Oct 2019 21:16:32 +0430 | ||
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 | Adapted to Go 1.13 from patches originally submitted to | ||
10 | the meta/recipes-devtools/go tree by | ||
11 | Matt Madison <matt@madison.systems>. | ||
12 | |||
13 | Upstream-Status: Inappropriate [OE specific] | ||
14 | |||
15 | Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> | ||
16 | --- | ||
17 | src/cmd/link/internal/ld/lib.go | 3 +++ | ||
18 | 1 file changed, 3 insertions(+) | ||
19 | |||
20 | --- a/src/cmd/link/internal/ld/lib.go | ||
21 | +++ b/src/cmd/link/internal/ld/lib.go | ||
22 | @@ -1343,6 +1343,7 @@ func (ctxt *Link) hostlink() { | ||
23 | argv = append(argv, "-Wl,-z,relro") | ||
24 | } | ||
25 | argv = append(argv, "-shared") | ||
26 | + argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) | ||
27 | if ctxt.HeadType == objabi.Hwindows { | ||
28 | if *flagAslr { | ||
29 | argv = addASLRargs(argv) | ||
30 | @@ -1358,6 +1359,7 @@ func (ctxt *Link) hostlink() { | ||
31 | argv = append(argv, "-Wl,-z,relro") | ||
32 | } | ||
33 | argv = append(argv, "-shared") | ||
34 | + argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) | ||
35 | case BuildModePlugin: | ||
36 | if ctxt.HeadType == objabi.Hdarwin { | ||
37 | argv = append(argv, "-dynamiclib") | ||
38 | @@ -1366,6 +1368,7 @@ func (ctxt *Link) hostlink() { | ||
39 | argv = append(argv, "-Wl,-z,relro") | ||
40 | } | ||
41 | argv = append(argv, "-shared") | ||
42 | + argv = append(argv, fmt.Sprintf("-Wl,-soname,%s", filepath.Base(*flagOutfile))) | ||
43 | } | ||
44 | } | ||
45 | |||