diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2025-03-01 15:55:51 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-03 18:01:29 +0000 |
| commit | ef1d0dea7bb330f1169e16e387df4a3ae30a4529 (patch) | |
| tree | 545bf0ec1f18b2c065303a4fedf7e18c7a8936cd /meta/recipes-devtools/go/go-runtime.inc | |
| parent | 4674fc9f7cd3fcc0af41a266f4b24c3f18613af7 (diff) | |
| download | poky-ef1d0dea7bb330f1169e16e387df4a3ae30a4529.tar.gz | |
go: fix buildpath issue for go-runtime
In upstream commit [cmd: remove support for GOROOT_FINAL][1], it clear
GOROOT for func ld when -trimpath is used
But it missed to do the same thing for share libarary linking which caused
building go-runtime failed with buildpath issue
|ERROR: go-runtime-1.23.4-r0 do_package_qa: QA Issue: File /usr/lib/go/pkg/
linux_amd64_dynlink/libstd.so in package go-runtime contains reference to
TMPDIR [buildpaths]
This commit applied a patch to clear GOROOT for func ldShared when
-trimpath is used and add option -trimpath to go-runtime build
[1] https://github.com/golang/go/commit/507d1b22f4b58ac68841582d0c2c0ab6b20e5a98
[2] https://github.com/golang/go/commit/507d1b22f4b58ac68841582d0c2c0ab6b20e5a98#diff-cab5921f94f2667bb0bc1b935d2d46b4c03541b4351b33438ab7290b94dea212R669
(From OE-Core rev: f7b05ebfdc6504a8360741f273163ef7fbb11b10)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/go/go-runtime.inc')
| -rw-r--r-- | meta/recipes-devtools/go/go-runtime.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc index 413cf6d33f..e5f17337bc 100644 --- a/meta/recipes-devtools/go/go-runtime.inc +++ b/meta/recipes-devtools/go/go-runtime.inc | |||
| @@ -34,7 +34,7 @@ do_compile() { | |||
| 34 | if [ -n "${GO_DYNLINK}" ]; then | 34 | if [ -n "${GO_DYNLINK}" ]; then |
| 35 | export GOTOOLDIR="${B}/pkg/tool/native_native" | 35 | export GOTOOLDIR="${B}/pkg/tool/native_native" |
| 36 | CC="$CC_FOR_${TARGET_GOTUPLE}" GOARCH="${TARGET_GOARCH}" GOOS="${TARGET_GOOS}" GOROOT=${B} \ | 36 | CC="$CC_FOR_${TARGET_GOTUPLE}" GOARCH="${TARGET_GOARCH}" GOOS="${TARGET_GOOS}" GOROOT=${B} \ |
| 37 | $GOTOOLDIR/go_bootstrap install -linkshared -buildmode=shared ${GO_SHLIB_LDFLAGS} std | 37 | $GOTOOLDIR/go_bootstrap install -linkshared -trimpath -buildmode=shared ${GO_SHLIB_LDFLAGS} std |
| 38 | fi | 38 | fi |
| 39 | cd ${B} | 39 | cd ${B} |
| 40 | } | 40 | } |
