Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2947727ybt; Sat, 4 Jul 2020 01:53:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoh67z4c+PFDGMkrh+hC90CnKYEDbAPOhPzmfbViIHWlY45BCme287Y8W69TrzIfIOyn1m X-Received: by 2002:a17:906:d79c:: with SMTP id pj28mr34005825ejb.397.1593852806844; Sat, 04 Jul 2020 01:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593852806; cv=none; d=google.com; s=arc-20160816; b=V0M5eJu3wbL8o+i2MN2YnQw2iBEtOsvbhfXgf9M4QaNxWhqzrIpOMv/XhUdQYvCpV9 k/GGz+TrY4jM3nz6E0mcTTxxB3oYPtNpc8uG/MbMEPCl4myWV3C1wS3AU1H3XzVhJmXT esHynN3NU19PN1jQYPJMDQeSyoOLJMraBQITgtRw92LJvtsr3coc3VaSbzSq5zWivYzx s+b92AK/HBD3i5s+58assyF4Hlw6/M8Iiks7EeisHLaJ3qL0jvU2oqxYwvvuDzstr+0w /YBNXCq0MBrFpQquDH9SDX8PGnZazZk3/7oDiKqngcAUKHH0b+lFrdO9WUsue4OnM+K3 B7+w== 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=D1RRawWEUAbaYj9hai3Y1mVQN8Mmny2tih4VJXMW7VI=; b=W1BSmmtm2JIjSq8Sc3fKHTYAKoCBQxI5dz4ZjtLr6ba1o7qcYXcfz2h49IgA6jJ2GC UMO5fD7B1IfZP9gbloUV+okbix1t33Xv2IKzqWIatnoCY6jkOjROH7PFprQC7ItRyfwy dL23qOIGtH1kv7/sohfk+HqiRehhnoUEy+TadDxiizb12ujKeENVfTdym2VmSH9lC10E rg+tPsX53X4UCXxhlSWPxWvOVi599Zopf6kob0oB3LgwGJvCJGXOue0RPF+CrxB6kbdM Yv7Ya4K60sGtWTE5jg6QYCbq/VbHWTu3ImXUTBd9Rd+mWUHgkemwSP9+PD+ApUMKR7eb 9SVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=NXw4byTH; 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 j22si9273961ejv.451.2020.07.04.01.52.37; Sat, 04 Jul 2020 01:53:26 -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=NXw4byTH; 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 S1726304AbgGDIw2 (ORCPT + 99 others); Sat, 4 Jul 2020 04:52:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbgGDIw2 (ORCPT ); Sat, 4 Jul 2020 04:52:28 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C6C2C061794 for ; Sat, 4 Jul 2020 01:52:28 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id f18so36406161wml.3 for ; Sat, 04 Jul 2020 01:52:27 -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=D1RRawWEUAbaYj9hai3Y1mVQN8Mmny2tih4VJXMW7VI=; b=NXw4byTH6c/4wVlwe51yy/GHnB/PsCTy5gZ/fStDCLZPSa6L9gMtpa4dDqUGmFwlYF z57NrvDOtGhzcj4gM/i9nF1j67kQYT91VSm3zolf5j5exV0E4OTW1K9yNRWAkSXplcSL zg4m8ZhCjbULTcXOVlII7BiH6qtnS5n07lv9s= 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=D1RRawWEUAbaYj9hai3Y1mVQN8Mmny2tih4VJXMW7VI=; b=GpftYajT4OHTofOf9JvB4nQO7NB6HFbBO0S4l51jRwpzuXdemqwEX1FQF/ZJNjDhEW wueCb9OWrLi5fw49Yf4wJHxWxr81jeP57kVRhHA4CDP7r/n0QrOvBdsbT2q9/PL1cWct hBnOZeLj2YVIVPa5XT+SzjgQ8ygpHq1XxVPI8PHK0d3NoQMoD9Kt7P10bhxcX7dvIp8Q rhfyAiRjPFbTTXpDt5xfAuE75Qc3yav0m8W2HsbNzZ01HuteZqgIa9sbqmQmiiMndTbY vmPoDHZvqxZU7bSYxUX4ByN7iCcL6OeqvAg3YGXbqoFtQbSnJT/8MenaFrfOkZF+n1J9 LFag== X-Gm-Message-State: AOAM532mrhvxVrwacfdVfTbD5v9aFb/IVqTG5oRKntMK52Xlq+hvl2aH FqoxfRLPbzZno19Stcyzqyfp6Q== X-Received: by 2002:a7b:cb98:: with SMTP id m24mr39986102wmi.98.1593852746570; Sat, 04 Jul 2020 01:52:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 01:52:25 -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 0/3] um: allow static linking for non-glibc libc implementations Date: Sat, 4 Jul 2020 09:52:10 +0100 Message-Id: <20200704085213.444645-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 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 | 2 +- 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(+), 18 deletions(-) -- 2.20.1