[Buildroot] [PATCH] package/crucible: Pass 'osusergo netgo' tags
Arnout Vandecappelle
arnout at mind.be
Fri Jul 22 21:04:57 UTC 2022
On 20/07/2022 22:24, Thomas Petazzoni via buildroot wrote:
> Hello,
>
> On Wed, 20 Jul 2022 17:05:42 +0000
> "Barisani, Andrea" <andrea.barisani at withsecure.com> wrote:
>
>> These flags are not crucible specific but they are necessary when
>> compiling static Go binaries with CGO enabled (which crucible does
>> not require by the way) to ensure portability as cgo versions of net
>> and os/users are not portable.
>
> Thanks for your feedback, much appreciated!
>
> So, I see we're passing CGO_ENABLED=1 (when thread support is
AFAICS, CGO_ENABLED is only set in HOST_GO_MAKE_ENV, which is only used in the
host-go build commands. So it's not really possible to set it per package.
However, apparently it is possible to override it:
DOCKER_CLI_GO_ENV = CGO_ENABLED=no
the commit message that introduced that unfortunately doesn't explain why, I'm
not even sure if it does anything.
Regards,
Arnout
> available) to all packages, and you're saying that this is incorrect as
> not all Go packages need CGO? Passing CGO_ENABLED=1/0 should be a
> per-package decision?
>
> However, when CGO is enabled and we need static linking, passing
> osusergo and netgo tags is needed, correct?
>
> Thomas
More information about the buildroot
mailing list