Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2949082ybt; Sat, 4 Jul 2020 01:56:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPTBd820+n5yKwRpORZHGHtC0tNlVM2pZ2ZbpbSe2BcidYVzmL6H+h4uT9EXxQ22jzXm6l X-Received: by 2002:a17:906:6959:: with SMTP id c25mr35168073ejs.375.1593853019847; Sat, 04 Jul 2020 01:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593853019; cv=none; d=google.com; s=arc-20160816; b=IbV7H/MysCtBqzAqnj1tE8rI4R0k837JcCv1zqRJN8Ig2gXjXjcnzLc9iqaZdZT4xz EycbSDDSPQlQf+0CTsLSGQD4ryORlH96vWFcHxJB0tfn8uE1qopuMrbVoNsa5JO3gn1h F/kNQ9kxxAvNaj7Iri4uGB0Nq/BnnNfUcf2UykFFTq3tzq8pz8psCaK2iNAthyvJWIH8 Rz3Rf4ehMXszacfSVU0aheBKZ81Gtrkbn5TproAk2aqwqvds8TH56bDSAEFISf5Wmqsb tS7mLd5neMjbRigN61q7S86cOJCj2oe/LQ5GfT0sr+Qdq/FXYxe5XkalN2NyebNGRFoM TBdA== 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=HnWE2oirgCn5o685xdW8KSCAfE3mrg9wzOfvPNj8xZg=; b=gIGu5s0Oa9N8RXlODuML+CW3+wg+cV+8vcix65WrFILEOL2xjXfvXFq/UjtBImLSoW NtxBrdfUK7AgALfTswgb051pABbPy2zClxI9yrQ/xNiEjN5TuEHHm/ud3dVr4PfRkUgs B3Ji3ol7mqGnL4zhEXvvnpNT0ytcwbBe5gnKrEsOeFqVWtIeX9e8PQLsMS0j/iH9k3Qs h06xXocbqEnLMy0B32AWio4ctbrYxwxvQt4Ni5LPSe8Hybnj09fYHydMrghoIBD6AbrS THN1WssEJrJb+31jzmQZShUAVb/r0CilBspxKjNNx+9CnM7MqX/kiZegzywl1r2TZ2fB Sqjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=Pfn0Q9jS; 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 d6si9109839eds.492.2020.07.04.01.56.37; Sat, 04 Jul 2020 01:56:59 -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=Pfn0Q9jS; 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 S1727819AbgGDIwk (ORCPT + 99 others); Sat, 4 Jul 2020 04:52:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbgGDIwi (ORCPT ); Sat, 4 Jul 2020 04:52:38 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DACBC08C5DE for ; Sat, 4 Jul 2020 01:52:38 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id k6so35181522wrn.3 for ; Sat, 04 Jul 2020 01:52:38 -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=HnWE2oirgCn5o685xdW8KSCAfE3mrg9wzOfvPNj8xZg=; b=Pfn0Q9jSVoOwJyQytzVUeoY7P2OBAlYd1kI+8Ic+E7FkY31u/OBLdx2MwJQAj7U0xS LZloTN42l6yrZlVD7MHnq7NtLkSsxeMPiW1IVwvff0kZ7haeMVd1EAbrpEE9p927TtN/ 0epWoIWnrbaM1NXUl5fyZlH0dq7ssGJdiPbxM= 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=HnWE2oirgCn5o685xdW8KSCAfE3mrg9wzOfvPNj8xZg=; b=e6dYgGrrgooRbE0y8HTB194vgTsgybXVXZLXuMHPbDLi7N+sYjAS8vjOlPRh4mRe69 iKMKeun+HyW2leLzMnMyMCggzkKHhnu4NCM7Vj4RdeIIR4hTveCKivmfSf7/3yCxOLLC YDqFpDa9UeBShvoNv63TptkibTIvNcGTzSHj6unJLk7eUDMj+bQYUlc/voKBUrbnGtEv sHeczX43jdfyGZpYWC7dJbcSyjzmOcGN9CTiW5kLwjANbwAkZLrxCVjapKLas1L9h52r YVQc/2pIkDzcLVs7bLrVuje90KzltSyCs4PJN5rzAPUX1s9qK/FsUtBbgWvXhiz3ZLUi 93IA== X-Gm-Message-State: AOAM531jJtb71mOuyJfJtiwvY7r6LfukFFFTR12hQ1W6r0qJ2QgAgZD4 q5c/0SI+m7fAsbix4Jy0QA42mQ== X-Received: by 2002:a5d:60c5:: with SMTP id x5mr5494877wrt.67.1593852757099; Sat, 04 Jul 2020 01:52:37 -0700 (PDT) Received: from localhost.localdomain (88-144-169-139.host.pobb.as13285.net. [88.144.169.139]) by smtp.gmail.com with ESMTPSA id a22sm15195915wmb.4.2020.07.04.01.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 01:52:36 -0700 (PDT) From: Ignat Korchagin To: jdike@addtoit.com, richard@nod.at, anton.ivanov@cambridgegreys.com, brendanhiggins@google.com, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Ignat Korchagin , kernel-team@cloudflare.com Subject: [PATCH v2 3/3] um: allow static linking for non-glibc implementations Date: Sat, 4 Jul 2020 09:52:13 +0100 Message-Id: <20200704085213.444645-4-ignat@cloudflare.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200704085213.444645-1-ignat@cloudflare.com> References: <20200704085213.444645-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 --- arch/um/Kconfig | 2 +- arch/um/drivers/Kconfig | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 9318dc6d1a0c..af7ed63f9c74 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -67,7 +67,7 @@ config FORBID_STATIC_LINK 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