[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALrw=nEB-ohdc-RCA=Ncv40TFg457m7gm5qWg5ahjNrpE9bDCA@mail.gmail.com>
Date: Sun, 19 Jul 2020 22:03:53 +0100
From: Ignat Korchagin <ignat@...udflare.com>
To: Johannes Berg <johannes@...solutions.net>
Cc: Jeff Dike <jdike@...toit.com>, Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Brendan Higgins <brendanhiggins@...gle.com>,
masahiroy@...nel.org, linux-um <linux-um@...ts.infradead.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
kernel-team <kernel-team@...udflare.com>
Subject: Re: [PATCH v3 3/3] um: allow static linking for non-glibc implementations
On Thu, Jul 16, 2020 at 10:10 AM Johannes Berg
<johannes@...solutions.net> wrote:
>
> 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@...udflare.com>
> > Reviewed-by: Brendan Higgins <brendanhiggins@...gle.com>
> > Tested-by: Brendan Higgins <brendanhiggins@...gle.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?
Yes, makes sense. I've shortened it to MAY_HAVE_RUNTIME_DEPS and
reposted the series.
> johannes
>
Powered by blists - more mailing lists