From: Johannes Berg <johannes@sipsolutions.net>
To: Ignat Korchagin <ignat@cloudflare.com>,
jdike@addtoit.com, richard@nod.at,
anton.ivanov@cambridgegreys.com, brendanhiggins@google.com,
masahiroy@kernel.org, linux-um@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: kernel-team@cloudflare.com
Subject: Re: [PATCH v3 3/3] um: allow static linking for non-glibc implementations
Date: Thu, 16 Jul 2020 11:10:19 +0200 [thread overview]
Message-ID: <159691324719ca79fbb8c206da527fc1f2bbc1ed.camel@sipsolutions.net> (raw)
In-Reply-To: <20200715201159.54166-4-ignat@cloudflare.com>
On Wed, 2020-07-15 at 21:11 +0100, Ignat Korchagin wrote:
> It is possible to produce a statically linked UML binary with UML_NET_VECTOR,
> UML_NET_VDE and UML_NET_PCAP options enabled using alternative libc
> implementations, which do not rely on NSS, such as musl.
>
> Allow static linking in this case.
>
> Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
> Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
> Tested-by: Brendan Higgins <brendanhiggins@google.com>
> ---
> arch/um/Kconfig | 5 +----
> arch/um/drivers/Kconfig | 3 ---
> 2 files changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/arch/um/Kconfig b/arch/um/Kconfig
> index 9318dc6d1a0c..beb98b3b9f75 100644
> --- a/arch/um/Kconfig
> +++ b/arch/um/Kconfig
> @@ -62,12 +62,9 @@ config NR_CPUS
>
> source "arch/$(HEADER_ARCH)/um/Kconfig"
>
> -config FORBID_STATIC_LINK
> - bool
> -
> config STATIC_LINK
> bool "Force a static link"
> - depends on !FORBID_STATIC_LINK
> + depends on CC_CAN_LINK_STATIC_NO_RUNTIME_DEPS || (!UML_NET_VECTOR && !UML_NET_VDE && !UML_NET_PCAP)
Come to think of it, in a way "FORBID_STATIC_LINK" was nicer because
there didn't need to be a single list of "what has dynamic dependencies"
like here the list of UML_NET_VECTOR, UML_NET_VDE, UML_NET_PCAP.
Maybe it could be
config MAY_HAVE_NON_STATIC_RUNTIME_DEPS
bool
config STATIC_LINK
...
depends on !MAY_HAVE_NON_STATIC_RUNTIME_DEPS || CC_CAN_LINK_STATIC_NO_RUNTIME_DEPS
and then UML_NET_VECTOR et al can
select MAY_HAVE_NON_STATIC_RUNTIME_DEPS
so that the knowledge is still distributed to the corresponding options?
johannes
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
next prev parent reply other threads:[~2020-07-16 9:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 20:11 [PATCH v3 0/3] um: allow static linking for non-glibc libc implementations Ignat Korchagin
2020-07-15 20:11 ` [PATCH v3 1/3] um/kconfig: introduce CC_CAN_LINK_STATIC_NO_RUNTIME_DEPS Ignat Korchagin
2020-07-15 20:11 ` [PATCH v3 2/3] um: some fixes to build UML with musl Ignat Korchagin
2020-07-15 20:11 ` [PATCH v3 3/3] um: allow static linking for non-glibc implementations Ignat Korchagin
2020-07-16 9:10 ` Johannes Berg [this message]
2020-07-19 21:03 ` Ignat Korchagin
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=159691324719ca79fbb8c206da527fc1f2bbc1ed.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=anton.ivanov@cambridgegreys.com \
--cc=brendanhiggins@google.com \
--cc=ignat@cloudflare.com \
--cc=jdike@addtoit.com \
--cc=kernel-team@cloudflare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=masahiroy@kernel.org \
--cc=richard@nod.at \
/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;
as well as URLs for NNTP newsgroup(s).