[Buildroot] [PATCH] package/crucible: Pass 'osusergo netgo' tags

Christian Stewart christian at paral.in
Sat Jul 23 00:41:13 UTC 2022


Hi all,


On Fri, Jul 22, 2022 at 3:03 PM Arnout Vandecappelle <arnout at mind.be> wrote:
>   I'd actually expect that the package itself would specify whether it needs cgo
> or not. Can we test a build of a package that actually uses cgo to verify if we
> really need to set it in HOST_GO_COMMON_ENV?

"CGO_ENABLED" informs the compiler that it's OK to use Cgo.

It should still be set to 1 even if the package doesn't use cgo at all.

>   Regardless, we *will* need to set the 'osusergo netgo' tags for all cgo-using
> packages when they do use cgo - so either we still need a per-package "enable
> cgo" option, or we should just always add those tags if cgo is enabled and we're
> doing static linking.
>
>   Is there any reason why this problem is only observed for the crucible package?

So, this doesn't work?

FOO_GO_ENV += CGO_ENABLED=0

.. because the package needs tags enabled conditionally if cgo is
available or not?

I don't understand why this specific package can't just check
HOST_GO_CGO_ENABLED and conditionally add the tags?

Best,
Christian Stewart



More information about the buildroot mailing list