diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2023-03-08 11:42:50 +0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-03-08 17:07:00 -0500 |
commit | d2a630ce6cf67a145f218012fbf02e4d0d9648df (patch) | |
tree | 2e0501d25deb8882ce291819a257d92452da8527 | |
parent | c3bd301d312412350e8d0ed848f5b579f4ddc67a (diff) | |
download | meta-virtualization-d2a630ce6cf67a145f218012fbf02e4d0d9648df.tar.gz |
yq: drop {LINKSHARED}
Redefine do_compile logic to drop {LINKSHARED} to fix the
below build failure.
WARNING: /build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/temp/run.do_compile.923432:185 exit 1 from 'aarch64-wrs-linux-go install -linkshared -p 48 -v -ldflags="-r /usr/lib64/go/pkg/linux_arm64_dynlink -I /lib64/ld-linux-aarch64.so.1 -extldflags ' -mcpu=cortex-a53 -march=armv8-a+crc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot -Wl,-rpath-link=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot/usr/lib64/go/pkg/linux_arm64_dynlink -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/yq-4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/build=/usr/src/debug/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0 -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fmacro-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot= -fdebug-prefix-map=/build/tmp-glibc/work/cortexa53-wrs-linux/yq/4.30.8+gitdd6cf3df146f3e2c0f8c765a6ef9e35780ad8cc1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now'" -trimpath -buildmode=pie `go_list_packages`'
Before the patch:
# rpm -ql yq
/usr
/usr/bin
/usr/bin/yq
# du -sh /usr/bin/yq
5.2M /usr/bin/yq
After the patch:
# rpm -ql yq
/usr
/usr/bin
/usr/bin/yq
# du -sh /usr/bin/yq
9.0M /usr/bin/yq
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-devtools/yq/yq_git.bb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/recipes-devtools/yq/yq_git.bb b/recipes-devtools/yq/yq_git.bb index 45f2f970..bd474a79 100644 --- a/recipes-devtools/yq/yq_git.bb +++ b/recipes-devtools/yq/yq_git.bb | |||
@@ -50,7 +50,7 @@ GO_IMPORT = "github.com/mikefarah/yq" | |||
50 | 50 | ||
51 | inherit go ptest | 51 | inherit go ptest |
52 | 52 | ||
53 | do_compile:prepend() { | 53 | do_compile() { |
54 | # arrange for some of the golang built ins to be found | 54 | # arrange for some of the golang built ins to be found |
55 | ( | 55 | ( |
56 | cd ${WORKDIR}/build/src/ | 56 | cd ${WORKDIR}/build/src/ |
@@ -60,6 +60,7 @@ do_compile:prepend() { | |||
60 | # arrange for the fetched dependencies to be found | 60 | # arrange for the fetched dependencies to be found |
61 | export GOPATH="${GOPATH}:${WORKDIR}/build/vendor/" | 61 | export GOPATH="${GOPATH}:${WORKDIR}/build/vendor/" |
62 | export GO111MODULE=off | 62 | export GO111MODULE=off |
63 | ${GO} install ${GOBUILDFLAGS} `go_list_packages` | ||
63 | } | 64 | } |
64 | 65 | ||
65 | do_install:append() { | 66 | do_install:append() { |