From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Arnout Vandecappelle <arnout@mind.be>
Cc: "Barisani, Andrea" <andrea.barisani@withsecure.com>,
Fabio Estevam <festevam@gmail.com>,
"buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH] package/crucible: Pass 'osusergo netgo' tags
Date: Fri, 22 Jul 2022 23:15:18 +0200 [thread overview]
Message-ID: <20220722231518.1536cd2f@windsurf> (raw)
In-Reply-To: <7202d505-f0fa-9fba-b21b-8dc8cb44b01b@mind.be>
Hello,
On Fri, 22 Jul 2022 23:04:57 +0200
Arnout Vandecappelle <arnout@mind.be> wrote:
> 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:
I see this:
HOST_GO_COMMON_ENV = \
GO111MODULE=on \
GOFLAGS=-mod=vendor \
GOROOT="$(HOST_GO_ROOT)" \
GOPATH="$(HOST_GO_GOPATH)" \
GOPROXY=off \
PATH=$(BR_PATH) \
GOBIN= \
CGO_ENABLED=$(HOST_GO_CGO_ENABLED)
HOST_GO_TARGET_ENV = \
$(HOST_GO_COMMON_ENV) \
GOOS="linux" \
GOARCH=$(GO_GOARCH) \
GOCACHE="$(HOST_GO_TARGET_CACHE)" \
CC="$(TARGET_CC)" \
CXX="$(TARGET_CXX)" \
CGO_CFLAGS="$(TARGET_CFLAGS)" \
CGO_CXXFLAGS="$(TARGET_CXXFLAGS)" \
CGO_LDFLAGS="$(TARGET_LDFLAGS)" \
GOTOOLDIR="$(HOST_GO_TOOLDIR)"
so HOST_GO_TARGET_ENV has CGO_ENABLED=$(HOST_GO_CGO_ENABLED)
and then HOST_GO_TARGET_ENV gets used in:
# Build package for target
define $(2)_BUILD_CMDS
$$(foreach d,$$($(2)_BUILD_TARGETS),\
cd $$(@D); \
$$(HOST_GO_TARGET_ENV) \
$$($(2)_GO_ENV) \
$$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \
-o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \
$$($(2)_GOMOD)/$$(d)
)
endef
Am I looking wrong?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-07-22 21:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 12:57 [Buildroot] [PATCH] package/crucible: Pass 'osusergo netgo' tags Fabio Estevam
2022-07-20 16:38 ` Thomas Petazzoni via buildroot
[not found] ` <8CF2C8F5-F7EA-43C2-80BA-1D4122D22A66@withsecure.com>
2022-07-20 20:24 ` Thomas Petazzoni via buildroot
2022-07-22 21:04 ` Arnout Vandecappelle
2022-07-22 21:15 ` Thomas Petazzoni via buildroot [this message]
2022-07-22 22:03 ` Arnout Vandecappelle
2022-07-23 0:41 ` Christian Stewart via buildroot
2022-07-23 8:54 ` Arnout Vandecappelle
2022-09-18 12:50 ` Arnout Vandecappelle
2022-09-18 13:09 ` Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220722231518.1536cd2f@windsurf \
--to=buildroot@buildroot.org \
--cc=andrea.barisani@withsecure.com \
--cc=arnout@mind.be \
--cc=festevam@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.