go: Disable pie in cgo for mips

This overcomes the linking errors e.g.
| /usr/lib/go/src/cmd/go/internal/base/base.go:110:(.text+0x60fef8): relocation R_MIPS_26 against `a local symbol' cannot be used when making a shared object; recompile with -fPIC         | /usr/lib/go/src/cmd/go/internal/base/base.go:110:(.text+0x60ff0c): relocation R_MIPS_HI16 against `a local symbol' cannot be used when making a shared object; recompile with -fPIC

(From OE-Core rev: 4b379e94ea6d5b96245c8724689209b44cace562)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2022-03-29 16:39:52 -07:00
committed by Richard Purdie
parent ab9be8acf4
commit 4e0d6af832

View File

@@ -3,6 +3,8 @@ require go-target.inc
inherit linuxloader
CGO_LDFLAGS:append:mips = " -no-pie"
export GO_LDSO = "${@get_linuxloader(d)}"
export CC_FOR_TARGET = "gcc"
export CXX_FOR_TARGET = "g++"