Conversation
That one was complex, with errors within upstream repo. This is the best I could do. Feel free to do better and close this PR if needed.
| endef | ||
|
|
||
| $(eval $(golang-package)) | ||
| $(eval $(generic-package)) |
There was a problem hiding this comment.
why doesn't the golang package option work?
There was a problem hiding this comment.
Upstream go.mod has a broken pseudo-version (deleted commit). With golang-package, Buildroot runs go mod vendor automatically during the download phase, before any patch can be applied and fails. There's no hook to fix go.mod before that. generic-package lets us patch go.mod first, then vendor manually in configure. In short, golang-package runs the go mod vendor too early
| GOFLAGS="-mod=vendor -modcacherw" \ | ||
| $(GO_BIN) build -trimpath -v \ | ||
| -ldflags "-s -w" \ | ||
| -o $(@D)/bin/Ikemen_GO_Linux \ |
There was a problem hiding this comment.
we should also cater for Ikemen_GO_LinuxArm too
There was a problem hiding this comment.
The -o flag controls the output filename (not tied to the target architecture). Cross-compilation is handled by HOST_GO_TARGET_ENV which sets GOARCH. My understanding is a bit basic, but the binary is then renamed to ikemen in INSTALL_TARGET_CMDS regardless of platform. Name doesn't matter here, I could change it to anything else... iirc
I just bypass the build.sh with -o. Issue is upstream
There was a problem hiding this comment.
i see the branch is development since this is work in progress it may be better to wait...
That one was complex, with errors within upstream repo. This is the best I could do. Feel free to do better and close this PR if needed.