douhuan3420 2019-08-06 06:32
浏览 452
已采纳

如何将Go-cross添加到Yocto SDK? 还是在其他计算机上编译Go for Yocto?

I have been using the Yocto SDK to compile C and C++ code for Yocto so that every machine does not need the 150GB+ Bitbake environment. Yocto version is 2.4 (Rocko)

Now I would like to have the same functionality for Golang, but I can't figure out how to do it.

If I'm on the Bitbake machine, I can call the binary arm-arch-gnueabi-go binary found under the directory tmp/work/x86_64-linux/go-cross-arm/ to compile code. But if I copy those binaries to another machine, it links to libraries with hard-coded paths on the Bitbake machine so that won't work.

Is there a way to include arm-arch-gnueabi-go in the SDK when I run populate_sdk on the image? Or is there another easy way to compile Go for the target on other machines?

  • 写回答

1条回答 默认 最新

  • dongmaopan5738 2019-08-06 08:46
    关注

    You can add the following lines in local.conf file or image recipe:

    TOOLCHAIN_HOST_TASK_append = " \
        packagegroup-go-cross-canadian-${MACHINE} \
    "
    
    TOOLCHAIN_TARGET_TASK_append = " \
        ${@multilib_pkg_extend(d, 'packagegroup-go-sdk-target')} \
    "
    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!