Sorry, I made a mistake: I wanted to say “upstream” and I meant that I want to create a Syncthing package for Buildroot which is integrated into their official repository.
I got Syncthing compiled using build.go by hand and I do not put this approach into question. I want to integrate it into the Buildroot-Toolchain. As far as I understood I have two different environments in Buildroot: one host and one target environment and thus I want to execute build.go in two stages. Something like this:
$(GO_HOST_ENV) $(GO_BIN) run build.go build --stop-after-creating-build-script
$(GO_TARGET_ENV) newbuildscript -arch arm --continue