Skip to content

Commit 3363179

Browse files
bjh83richardweinberger
authored andcommitted
um: Make CONFIG_STATIC_LINK actually static
Currently, CONFIG_STATIC_LINK can be enabled with options which cannot be statically linked, namely UML_NET_VECTOR, UML_NET_VDE, and UML_NET_PCAP; this is because glibc tries to load NSS which does not support being statically linked. So make CONFIG_STATIC_LINK depend on !UML_NET_VECTOR && !UML_NET_VDE && !UML_NET_PCAP. Link: https://lore.kernel.org/lkml/[email protected]/#t Signed-off-by: Brendan Higgins <[email protected]> Acked-By: Anton Ivanov <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 5bef0a1 commit 3363179

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

arch/um/Kconfig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ config NR_CPUS
6262

6363
source "arch/$(HEADER_ARCH)/um/Kconfig"
6464

65+
config FORBID_STATIC_LINK
66+
bool
67+
6568
config STATIC_LINK
6669
bool "Force a static link"
67-
default n
70+
depends on !FORBID_STATIC_LINK
6871
help
6972
This option gives you the ability to force a static link of UML.
7073
Normally, UML is linked as a shared binary. This is inconvenient for
@@ -73,6 +76,9 @@ config STATIC_LINK
7376
Additionally, this option enables using higher memory spaces (up to
7477
2.75G) for UML.
7578

79+
NOTE: This option is incompatible with some networking features which
80+
depend on features that require being dynamically loaded (like NSS).
81+
7682
config LD_SCRIPT_STATIC
7783
bool
7884
default y

arch/um/drivers/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ config UML_NET_DAEMON
234234
config UML_NET_VECTOR
235235
bool "Vector I/O high performance network devices"
236236
depends on UML_NET
237+
select FORBID_STATIC_LINK
237238
help
238239
This User-Mode Linux network driver uses multi-message send
239240
and receive functions. The host running the UML guest must have
@@ -245,6 +246,7 @@ config UML_NET_VECTOR
245246
config UML_NET_VDE
246247
bool "VDE transport (obsolete)"
247248
depends on UML_NET
249+
select FORBID_STATIC_LINK
248250
help
249251
This User-Mode Linux network transport allows one or more running
250252
UMLs on a single host to communicate with each other and also
@@ -292,6 +294,7 @@ config UML_NET_MCAST
292294
config UML_NET_PCAP
293295
bool "pcap transport (obsolete)"
294296
depends on UML_NET
297+
select FORBID_STATIC_LINK
295298
help
296299
The pcap transport makes a pcap packet stream on the host look
297300
like an ethernet device inside UML. This is useful for making

0 commit comments

Comments
 (0)