Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1269240ybh; Sun, 19 Jul 2020 14:04:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrgmdD06lthgao9bhCWcxjkVylismRyKTx5ifT5XUjt09Z+qmxEWg+TtYc2lILXm4MKS3J X-Received: by 2002:a17:906:4145:: with SMTP id l5mr18233278ejk.334.1595192699172; Sun, 19 Jul 2020 14:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595192699; cv=none; d=google.com; s=arc-20160816; b=u6vgvN0eHgLlIajbTe7c1pKPR0fQAexuZvH0JBz9w4UJlv3P0P5jOcynJselpIvKyR jZTIsgYQyziuUW5Pl22yFbDLZDLLmeJqtwddZZLkje5umyv1krlcCGhbpa5rnFPyNHH5 woZAr/NfEaKFaSt+FgCn0qlPG/UL9XQAxzErzjs2tfrH6LgNB/8SdD6aZnrLNoVZ4shh 8Y+Vht+Dxp2VH3t39t/ABaMhEsvvFi9+zTS7KaGIxhehXnAdPOlQcOOE/ASeAUiE7fjy V7XazJkLKgyBbJS1XZz2rHgsavV+oNrTtsutS/D3lg0gKw9oFKFL+myAquNwN1G4UJQT KRcg== 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=6BtSnXzObHS7H0mF3gfdZucE+NMpIQEtRNBuHfbTl7Q=; b=KqE7D5N/mnks7Tt7U1e6WYghWnDYrPUDdv6B0VndIsE9qpKHJbavowSpaHX/ye/wda hRnwjQHQe1meT1eX1Cd/4YJfwetJGmrVQNXP5icSpI/yrmJvgJal0MEWx5E2GKCT0tNh yd7MPBGKms53k+IyhOcLV1KULuQg2E+Ef0uq69jnt5wURygwcrTAD/5zvODsFvD960TK tgTxQxhl9cgYlVsOIS4WFr/z2DbBTVMCwZtKtuXhgAIlzV6V5akMhk12Whsfk6ZFQEkS jfYDS8f4Ry07QBEcdvulhWMBLPn9TT7Ey+WFEcnqgB+WzxUBHc3ErQkI48D82CqJUs4u eEUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=q9GZby6Y; 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 c16si8791707ejb.57.2020.07.19.14.04.35; Sun, 19 Jul 2020 14:04: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=q9GZby6Y; 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 S1726464AbgGSVCi (ORCPT + 99 others); Sun, 19 Jul 2020 17:02:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726073AbgGSVCi (ORCPT ); Sun, 19 Jul 2020 17:02:38 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB292C0619D2 for ; Sun, 19 Jul 2020 14:02:37 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id f18so23231548wml.3 for ; Sun, 19 Jul 2020 14:02:37 -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=6BtSnXzObHS7H0mF3gfdZucE+NMpIQEtRNBuHfbTl7Q=; b=q9GZby6YyyttYIWNMiifECfdIe8+moDkGFlUrpBan3fS5CN5ogFBNrHoU1AW9DQj+t nfMoEJeAMTEUj3EP+Bnj0LqTF8qCq6B6WUahOophP6zidyFMloXfTH9S0EQ8iTbpcers BnT3GOM5iHRFAtGsW48SV64D4KwaTT0rZiu6s= 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=6BtSnXzObHS7H0mF3gfdZucE+NMpIQEtRNBuHfbTl7Q=; b=IHeVY8AdfSpLS5UrM5mVj2ccHrtE+Qvwhbf1Ix6bF9SzmpUmKIo9is121SzKz8xt9j UsSpGQM6K2LsIbZ+isnXhYNBf0oFWjXShW4D++W4cFERni+ST+0hV56ZXCJSkN4+9mGd hhZLnx1PEhsb9W4czA32gVrqmAlGselSLVX1lVSp+OjSib0hHirdrj7vB1a6vsLM8RrO sIlKI9dwyt42aRoP3q1q15A0DoiiBI9WW4OEqec6NXgjwnEyDSWwKXytpfYRgaK0NJVA qChr7e1Z0hW2mkr2RTXSDGDKG5LQpsTThotCv2dFH5FOJoAPp2RAjcKzHH7RM+bHQMC2 Lhiw== X-Gm-Message-State: AOAM533+wBn0tDHUH336HT5NqNmNeNIWBg1d1+QvXFpo3sW3LWcrs9yS S/7/jsMowhR0g/vkpIAybruGGA== X-Received: by 2002:a7b:c0c9:: with SMTP id s9mr17687424wmh.166.1595192556402; Sun, 19 Jul 2020 14:02:36 -0700 (PDT) Received: from localhost.localdomain ([88.144.89.224]) by smtp.gmail.com with ESMTPSA id l15sm27408453wro.33.2020.07.19.14.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2020 14:02:35 -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 v4 0/3] um: allow static linking for non-glibc libc implementations Date: Sun, 19 Jul 2020 22:02:19 +0100 Message-Id: <20200719210222.2811-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 v3: * restored FORBID_STATIC_LINK and renamed it to MAY_HAVE_RUNTIME_DEPS, so we don't have to maintain a static list of options, which may produce runtime dependencies 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 | 6 +++--- arch/um/drivers/Kconfig | 6 +++--- 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, 26 insertions(+), 20 deletions(-) -- 2.20.1