Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp715855ybh; Wed, 15 Jul 2020 13:13:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGc3NNbqzYN7efkWcpVTIHdPwKxuNp6WVJchQ5M+U6KRHLhjT7MeVsBadN9p77sQYPH2Ly X-Received: by 2002:a17:906:2318:: with SMTP id l24mr631110eja.291.1594844012928; Wed, 15 Jul 2020 13:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594844012; cv=none; d=google.com; s=arc-20160816; b=UdfgIl7goQG+VGkOMrEmgeLrXqzWey6a4wX4B3WWRoYni8lOGS4BjCvXmvwCu77C62 SfOnJUmj/et6VnWiqnfglk9JsD518xsKQOVr7ax4ypCTP7e73x7yq4RpCyJEeJLyeJTX fepIJEzDLcxAOzbJh9n4+FNNLzBoHO6rbIq89U6NyDSAfWTMywjSvUleM7QaplCKfSVX 8QwFoQW7yMrCdt8xpKMVzzPacKeUi89hWWcOrz7ugCeLP1xC/3t9we18YvO4Cu5YmXMW 5fwyMmR1fClWUwPgfMjw3IfTZBF4B6K8mJQE0KFdeOJLfNQOiCUbv/TpuymPhjqMIpjY Elxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Dia+f5f3wvQzmpYjq6ONA8seF0ZSOjUyP7q0pPCU8gE=; b=s2TbaZrrGGZlyB292DBlxMEMIZ+ky0/Jz4OT1/K4V2+X1i8WEyWyaR31kd/aW/o0T9 gzacWHQL26veYAo1cyph0dcSd8Gh/JGTPpnYlRuCnqhENesVt9qYN0F2g/491MUujFo5 3WJdiglP/VA1RDS5WHwwdEKgfYVTi0Y0BvvfDpX5Wf3HOjAQbEu8LbtvqWnK8PSh93nF kZkSeIY+JzBbEuz5rttLlbhpuvN/gnUOaZSdgPI30Shq0oveGE0l9OgUvMuvnA7uaBxg /7XcXIv7winjiKDDBjtHL29qXy4NdH/CbmQLXEdEwGt/cgnFMQEyPMEeLihEhGnLTWf3 Y/lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=y+7xaubN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si1941270edy.370.2020.07.15.13.13.09; Wed, 15 Jul 2020 13:13:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=y+7xaubN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727790AbgGOUM2 (ORCPT + 99 others); Wed, 15 Jul 2020 16:12:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727078AbgGOUMW (ORCPT ); Wed, 15 Jul 2020 16:12:22 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ACC5C061755 for ; Wed, 15 Jul 2020 13:12:22 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id o11so4172488wrv.9 for ; Wed, 15 Jul 2020 13:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dia+f5f3wvQzmpYjq6ONA8seF0ZSOjUyP7q0pPCU8gE=; b=y+7xaubN85hm0VkPLZmHNUEiHABvfBCqkOclf4aSjJZyIKhK0qT3k9d1a1Kjd9xWfI yOOJfjZyB1RameJ3L2thtQ+OCfEPdAlYGtzkLIt41jwSNNa79DDtFLl1NyGhT6CPJGye b4isXTPp+hp+hErFrWzx22ciFMfB13LdtRyz8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Dia+f5f3wvQzmpYjq6ONA8seF0ZSOjUyP7q0pPCU8gE=; b=og+b/cQwG+ceBO5qEYxDdLmPCV28/2z3NLm5owxMGGX/tpg9pIKeVxi4im2KiAwCip 68a9vvTVWvGJjrjjnQFKiRNltugaH2T2xNTtkSDwFQfh+voYTicHPl+8UkNmDd6pXfps m2VVneT68DajUMmZ5jBNvWLWapwTz7nXv8hzeRrYBDYLiM/cOs8cfnO/fkeYnH+YiYLz F6pRoL3NfV3nkvc+9SskYa8E1KfiLsmF8ccSorgaglM1judr2X6iYy63ATvFUZ9Pwzhj ORIiT+Kr6EmZAIX6qqG6xsa9dYFWBtlDooh3N7dzfv7Wn0Z/XkM4J6p5M+MmS1hvZ6/u GQ8w== X-Gm-Message-State: AOAM531BjTluESwu+uUm98LWqQ5B2CSFhMQ66CPexk6T2s80fghvUHzs rB7By6qU9/d8ibaftKcD4ErQ7w== X-Received: by 2002:adf:80c7:: with SMTP id 65mr1204312wrl.246.1594843940696; Wed, 15 Jul 2020 13:12:20 -0700 (PDT) Received: from dev.cfops.net (88-144-169-51.host.pobb.as13285.net. [88.144.169.51]) by smtp.gmail.com with ESMTPSA id p4sm4765528wrx.63.2020.07.15.13.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 13:12:20 -0700 (PDT) From: Ignat Korchagin To: 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: Ignat Korchagin , kernel-team@cloudflare.com Subject: [PATCH v3 3/3] um: allow static linking for non-glibc implementations Date: Wed, 15 Jul 2020 21:11:59 +0100 Message-Id: <20200715201159.54166-4-ignat@cloudflare.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200715201159.54166-1-ignat@cloudflare.com> References: <20200715201159.54166-1-ignat@cloudflare.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins --- 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) help This option gives you the ability to force a static link of UML. Normally, UML is linked as a shared binary. This is inconvenient for diff --git a/arch/um/drivers/Kconfig b/arch/um/drivers/Kconfig index 9160ead56e33..72d417055782 100644 --- a/arch/um/drivers/Kconfig +++ b/arch/um/drivers/Kconfig @@ -234,7 +234,6 @@ config UML_NET_DAEMON config UML_NET_VECTOR bool "Vector I/O high performance network devices" depends on UML_NET - select FORBID_STATIC_LINK help This User-Mode Linux network driver uses multi-message send and receive functions. The host running the UML guest must have @@ -246,7 +245,6 @@ config UML_NET_VECTOR config UML_NET_VDE bool "VDE transport (obsolete)" depends on UML_NET - select FORBID_STATIC_LINK help This User-Mode Linux network transport allows one or more running UMLs on a single host to communicate with each other and also @@ -294,7 +292,6 @@ config UML_NET_MCAST config UML_NET_PCAP bool "pcap transport (obsolete)" depends on UML_NET - select FORBID_STATIC_LINK help The pcap transport makes a pcap packet stream on the host look like an ethernet device inside UML. This is useful for making -- 2.20.1