Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp715516ybh; Wed, 15 Jul 2020 13:12:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyslHpPYgSHknLAJlmyggH/5eir+Rz3H/Q3uq6Iu02u+ibf5DR4jUfCi+ubi0E8u7PFbron X-Received: by 2002:a17:906:6a4f:: with SMTP id n15mr620326ejs.378.1594843975459; Wed, 15 Jul 2020 13:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594843975; cv=none; d=google.com; s=arc-20160816; b=PAMBwm3fBsgK1C2kN27aZwZDWVecQg6KEs66uGPp0+kXQxmsn00JnhSu4BIQBbYNHA 2JQpfkvLNNSKGOT4/mXecZc+bZH4cstVLeBRqz0+ot2B9o6G6YC/Jnt0y21CjxoyE9Ej TBRKB8HfdjnBrk1YYjXotcmv+4FcR4O/jFYSYu47eLV0DIaw2Kzq+B3Ll5zHRjLHeQMP vL9Adg7gcDEiBGo3uhO7ICh/rxSHTpePIrOlzAbJsP+fCrELKaJBfQQYFBS7XUYPbHTl ivJa32LU/kAGen9kDk4JmTKtpEgp5uvtx8B0YwpPNc1EcflzopKkk1A30xyqlgkdZAP2 X5+g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=kKQNjZzmCPBtKyAhLJMmus5XdLv4tDXCgTh+A5rB4FM=; b=vepO6VjJpqJTD2ktGuDeDc1o/w/FxppttcW7uopYEO6JP8x77/BIk4OH/QohTDeaXg 8XqCv2sBLUwSoMti58/kehLpx3MVe4uN3D3OmXKI2HaROFyv/ilhFDg5MKDI/WQoRsf6 bLu0BJz/Sib7CeLSfbeMlp3TfKsPW+Jk3sweWkov/QvYLEkYItBtqefV0NJqdMvsDUW1 BhONANC/MTi6fdsURy1Se4EQeJDvpddLyGqSDZr9d7Xqj7buEJUA+Q3a8/THSWDbSmhw MKSqOeSARGoiuLAlowWKgDtrtkDsGzcsHo9zPip54jhFxMAAd2B+yG0P2Mkd3R4XJsMK kbTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=g5wHa9b7; 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 x17si2109198edq.338.2020.07.15.13.12.31; Wed, 15 Jul 2020 13:12:55 -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=g5wHa9b7; 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 S1726859AbgGOUMT (ORCPT + 99 others); Wed, 15 Jul 2020 16:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726670AbgGOUMS (ORCPT ); Wed, 15 Jul 2020 16:12:18 -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 85A1FC061755 for ; Wed, 15 Jul 2020 13:12:18 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id o11so4172291wrv.9 for ; Wed, 15 Jul 2020 13:12:18 -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:mime-version :content-transfer-encoding; bh=kKQNjZzmCPBtKyAhLJMmus5XdLv4tDXCgTh+A5rB4FM=; b=g5wHa9b7UMgWKsb3tbxt/L23NnqlQ39S51PcxKKi38gTxycgyknCz6KTCapqh9awVw ZERpcqMurWsLpCum2BfTffpqzX1iCWkrr7d7iJr1IRA8K0Br5h3dMuLi7eCjZ1hoNE66 xQ8SZiBOzaODrW96/4u61CNXA+pSeM46SHpVU= 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:mime-version :content-transfer-encoding; bh=kKQNjZzmCPBtKyAhLJMmus5XdLv4tDXCgTh+A5rB4FM=; b=SM17fdYK6P6ndVZxAvxKZn/eJOWFXONbbazw2+WcvsnnCr9y+RIyJjdY4ciq+wp91H OmbnkLa/gFkZtwchnbStqqesaSbri8yUCNNIi+LWYYoWSzeJqgQcwI29ArhQSWAlTBJy W+j0OJ3SiofzH8AnJC+Hwv/eVB+3Vm1zBo3o9xWwxC1yQbB2qLyoi/a35NycAES8mcoJ sxyyo4j6g6YpGnq7Yy6CPSzyKyT3SZoOWOieMWbDohY9xiS9IBJIG7NGUdGWzr4+VIaJ jp8GpST3DBdsd+Ysy9EhbcUScAihmYQD5P7YnhtfwQH2PZ1vggSSHk72rPVbDaTUvXDg amzg== X-Gm-Message-State: AOAM5319l3mmUbMBNWMOCgJ+AvRiUZPLxVFx+or42qse/Fu6bYrYHx7d ASVMUJqJG06uscS8NQ8uM1DxNw== X-Received: by 2002:a05:6000:1182:: with SMTP id g2mr1121479wrx.44.1594843936956; Wed, 15 Jul 2020 13:12:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 13:12:16 -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 0/3] um: allow static linking for non-glibc libc implementations Date: Wed, 15 Jul 2020 21:11:56 +0100 Message-Id: <20200715201159.54166-1-ignat@cloudflare.com> X-Mailer: git-send-email 2.20.1 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 Changes from v2: * rebased to accomodate b816b3db15f68690ee72a4a414624f8e82942b25 ("kbuild: fix CONFIG_CC_CAN_LINK(_STATIC) for cross-compilation with Clang") * removed unused FORBID_STATIC_LINK config option * cc-ed Masahiro Yamada for can-link.sh approve This is a continuation of [1]. Since I was able to produce a working UML binary with UML_NET_VECTOR linked with musl with the changes included in the patches here. I was compiling on Arch Linux, so hopefully all the latest versions of the compiler, libraries and binutils. I also tested allyesconfig with both musl and glibc. The compilation succeeds with both, however both binaries (glibc one being dynamically linked) segfault on start. This is probably of some incompatible config option/module being included and not related to musl/glibc. [1]: https://patchwork.ozlabs.org/project/linux-um/patch/20200624212319.403689-1-ignat@cloudflare.com/ Ignat Korchagin (3): um/kconfig: introduce CC_CAN_LINK_STATIC_NO_RUNTIME_DEPS um: some fixes to build UML with musl um: allow static linking for non-glibc implementations arch/um/Kconfig | 5 +---- arch/um/drivers/Kconfig | 3 --- arch/um/drivers/daemon_user.c | 1 + arch/um/drivers/pcap_user.c | 12 ++++++------ arch/um/drivers/slip_user.c | 2 +- arch/um/drivers/vector_user.c | 4 +--- arch/um/os-Linux/util.c | 2 +- arch/x86/um/user-offsets.c | 2 +- init/Kconfig | 6 ++++++ scripts/cc-can-link.sh | 5 +++-- 10 files changed, 21 insertions(+), 21 deletions(-) -- 2.20.1