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')} \
    "
    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 蓝牙耳机怎么查看日志
  • ¥15 R语言 拟时序分析降维图如何减少分支
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统