golang: backport an upstream fix for non-retpoline-compatible error
authorTianling Shen <cnsztl@immortalwrt.org>
Tue, 27 Dec 2022 05:18:29 +0000 (13:18 +0800)
committerTianling Shen <cnsztl@gmail.com>
Wed, 28 Dec 2022 00:30:59 +0000 (08:30 +0800)
commit35f33c99b126cfa3ac51b9d7634340d43458b7db
tree648cc484e9753af28d4db4af87915cac1f46e11f
parentea969a117a2a94de81489082f6ef83de438cf313
golang: backport an upstream fix for non-retpoline-compatible error

This fixes the following build error:
```
Building targets
runtime
<autogenerated>:1: non-retpoline-compatible: 00200 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/time.go:915)       JMP     (R15)(R12*8)
<autogenerated>:1: non-retpoline-compatible: 00115 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/type.go:614)       JMP     (AX)(SI*8)
<autogenerated>:1: non-retpoline-compatible: 00028 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/time.go:452)       JMP     (R11)(R10*8)
<autogenerated>:1: non-retpoline-compatible: 00021 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/error.go:261)      JMP     (DX)(CX*8)
<autogenerated>:1: non-retpoline-compatible: 00050 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/time.go:691)       JMP     (CX)(R12*8)
<autogenerated>:1: non-retpoline-compatible: 00024 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/debuglog.go:616)   JMP     (CX)(SI*8)
<autogenerated>:1: non-retpoline-compatible: 00079 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/time.go:617)       JMP     (R9)(R8*8)
<autogenerated>:1: non-retpoline-compatible: 00025 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/cgocall.go:453)    JMP     (R9)(DX*8)
<autogenerated>:1: non-retpoline-compatible: 00018 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/type.go:66)        JMP     (DX)(CX*8)
<autogenerated>:1: non-retpoline-compatible: 00020 (/home/username/works/openwrt/staging_dir/hostpkg/lib/go-cross/src/runtime/alg.go:156)        JMP     (SI)(DX*8)
<autogenerated>:1: too many errors
```

Fixes: #20026
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
lang/golang/golang/patches/010-cmd-compile-turn-off-jump-tables-when-spectre-retpolines-.patch [new file with mode: 0644]