go: Use -no-pie to build target cgo

Fixes
go: ELF binary /usr/lib/go/pkg/tool/linux_arm64/pprof has relocations in .text
go: ELF binary /usr/lib/go/bin/go has relocations in .text [textrel]

(From OE-Core rev: 0e9f47eddf786972b409088629d0f62c6bc74448)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a27d39aebd5966ffffb57c20518381cb06ba8373)
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Khem Raj 2023-06-02 05:37:10 -04:00 committed by Steve Sakoman
parent 90019dfd3e
commit 0afb60e4fd

View File

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