diff options
| author | Osama Abdelkader <osama.abdelkader@gmail.com> | 2025-08-12 22:50:50 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-14 10:31:10 +0100 |
| commit | a669cd2e0c760da9d7e872daea9590fc9e86d766 (patch) | |
| tree | 6ac796c479ab658119564471989a4b5f24bafaa6 | |
| parent | 74befedd6610e08a88beb4889d47fdedeaec6a4e (diff) | |
| download | poky-a669cd2e0c760da9d7e872daea9590fc9e86d766.tar.gz | |
go-cross-canadian: fix binaries install and GOARCH
set GOARCH to HOST_GOARCH which is set from SDKMACHINE,
since GOARCH defaults to TARGET_GOARCH, which is set from MACHINE (wrong arch).
Also fix do_install to correctly install all binaries from
${GO_BUILD_BINDIR} by using 'find -type f' to avoid issues when the
directory contains subdirectories (e.g. "linux_arm").
(From OE-Core rev: 31e3bd61c7986bc044e547aa5cb9caba7b32bf22)
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/go/go-cross-canadian.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc index 39330fc98b..4a6f2f4c36 100644 --- a/meta/recipes-devtools/go/go-cross-canadian.inc +++ b/meta/recipes-devtools/go/go-cross-canadian.inc | |||
| @@ -5,6 +5,8 @@ DEPENDS = "go-native virtual/${HOST_PREFIX}go virtual/nativesdk-${HOST_PREFIX}go | |||
| 5 | virtual/nativesdk-compilerlibs" | 5 | virtual/nativesdk-compilerlibs" |
| 6 | PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}" | 6 | PN = "go-cross-canadian-${TRANSLATED_TARGET_ARCH}" |
| 7 | 7 | ||
| 8 | GOARCH = "${HOST_GOARCH}" | ||
| 9 | |||
| 8 | # it uses gcc on build machine during go-cross-canadian bootstrap, but | 10 | # it uses gcc on build machine during go-cross-canadian bootstrap, but |
| 9 | # the gcc version may be old and not support option '-fmacro-prefix-map' | 11 | # the gcc version may be old and not support option '-fmacro-prefix-map' |
| 10 | # which is one of default values of DEBUG_PREFIX_MAP | 12 | # which is one of default values of DEBUG_PREFIX_MAP |
| @@ -51,7 +53,7 @@ do_install() { | |||
| 51 | install -d ${D}${libdir}/go/pkg/tool | 53 | install -d ${D}${libdir}/go/pkg/tool |
| 52 | cp --preserve=mode,timestamps -R ${B}/pkg/tool/${HOST_GOTUPLE} ${D}${libdir}/go/pkg/tool/ | 54 | cp --preserve=mode,timestamps -R ${B}/pkg/tool/${HOST_GOTUPLE} ${D}${libdir}/go/pkg/tool/ |
| 53 | install -d ${D}${bindir} ${D}${libdir}/go/bin | 55 | install -d ${D}${bindir} ${D}${libdir}/go/bin |
| 54 | for f in ${B}/${GO_BUILD_BINDIR}/* | 56 | for f in $(find ${B}/${GO_BUILD_BINDIR} -type f) |
| 55 | do | 57 | do |
| 56 | base=`basename $f` | 58 | base=`basename $f` |
| 57 | install -m755 $f ${D}${libdir}/go/bin | 59 | install -m755 $f ${D}${libdir}/go/bin |
