How to compile golang program for netgear r7800

Hello, I have a go program need to be ported to netgear r7800 which has arm_cortex-a15_neon-vfpv4 as the arch. I tried to use GOOS=linux GOARCH=arm GOARM=7 flags with go build on my AMD64 host but the compiled program cannot be run on the router with 18.06. I think the linux OS may not be compatible with openwrt.
Now I am thinking to build a gccgo compiler specific for the target.

with make menuconfig, I selected
Language --> Go --> golang
then make
the make went through successfully but I don't see *gccgo under
staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-7.4.0_musl_eabi/bin/
at all.
Can anyone give me a hint?
thanks

I have figured it out by referencing this post https://medium.com/@chrischdi/cross-compiling-go-for-raspberry-pi-dc09892dc745

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.