Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anisse Astier <anisse@astier.eu>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] pkg-golang: Allow per package/target CGO_ENABLED setting
Date: Sun, 7 Apr 2019 23:49:41 +0200	[thread overview]
Message-ID: <20190407214941.GA3117@jaya> (raw)
In-Reply-To: <20180727024720.13370-1-camh@xdna.net>

Hi Cam,

Sorry for the delay,

(+Angelo in cc)

On Fri, Jul 27, 2018 at 12:47:20PM +1000, Cam Hutchison wrote:
> Allow the CGO_ENABLED variable to be controlled per package and per
> build target, instead of having the value determined by whether or not
> the toolchain has threads.
> 
> Some build targets may not build with CGO_ENABLED=1, so allowing a per
> package and build target override will allow those targets to be built
> with Buildroot.

Just like Thomas, I'm wondering what specific use-case you have in mind;
in particular, I'm interested why you needed build-target granularity in
addition to package-level configuration.

To provide context: 

Disabling CGO isn't an issue, until you try doing DNS requests, which
are usually handled by your libc. If you have anything configured out of
the ordinary /etc/resolv.conf, a cgo-disabled binary won't be able to do
a DNS request. Same goes for user/group and user home dir resolution:
anything outside of /etc/{passwd,group} (pam, NSS, etc.), won't work.

Disabling CGO allows you to have static binaries; if you don't use any
native libraries.

I don't know in which context it might be useful in buildroot.

Regards,

Anisse

  parent reply	other threads:[~2019-04-07 21:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  2:47 [Buildroot] [PATCH 1/1] pkg-golang: Allow per package/target CGO_ENABLED setting Cam Hutchison
2019-04-07 20:28 ` Thomas Petazzoni
2019-04-12 21:45   ` Cam Hutchison
2019-04-07 21:49 ` Anisse Astier [this message]
2019-04-08  2:00   ` Christian Stewart
2019-04-08  7:04     ` Thomas Petazzoni
2019-04-08 11:25       ` Anisse Astier
2019-04-09  0:22       ` Cam Hutchison
2019-04-09  3:22         ` Christian Stewart
2019-04-12 21:29           ` Cam Hutchison
2019-04-12 21:48             ` Cam Hutchison
2019-04-09  6:05         ` Thomas Petazzoni
2019-04-08 11:23     ` Anisse Astier

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=20190407214941.GA3117@jaya \
    --to=anisse@astier.eu \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox