Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp298836ybh; Wed, 15 Jul 2020 02:12:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCZemeaNbY0Wjinkn7TOwTOvHcbB7h2l9uR/OznQSmOsn+CaQkGLPT29yhrK+C+WXT/jjj X-Received: by 2002:a05:6402:1c96:: with SMTP id cy22mr8402907edb.79.1594804355766; Wed, 15 Jul 2020 02:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594804355; cv=none; d=google.com; s=arc-20160816; b=ReveMBEapLOmMSe79B1PgaVI8CugN1DwygafyGRwXYUH9oVHHujh4iyTPoQdiwkNKc uozPsD1DY2p0v/YsETB/De3p5+NogaRN8C39DOKt6DaqFEC58qgarV4JSGSIn8Y+7U0f Hnrhf8Vwj0Sr4pKLNMCLIum1gD4kpHGj5b8WLXl0danVXDPJuO26KaQJcZ3Du4QlBkcy /+ouVN0GsELDlbueOoacv4TSGzoiSiOd97d9ZuKz96yX5tKYRW3iAQmY/GHOrWahPgSG VwXQUfZ4r5WuHas0tAB9C5aHJD57g1ASiYrYjW9QFdH4uPp5nSu9soW4SLK43clTn7LL vQ+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TbJ/+ucYAYXSyy1FqmpSCm01BvP6FkdKr9JPVe9GaUg=; b=HXmHuh3zIij9JZTLnEesh4WqmSqVYjVc6b/2eQA95BbydA/vWSHmnCk7oKJTQcM+8A mAI3P1NGW6ACJ4V65H9sHneFsD2qP+bvbH5TWzxpG4JBb5gTlfFLjMnZ3HRA8By1QKBs z4HkTFLgMglZtnZwbuwolEHy9wBZuga8mvbM4DvMvJvjYzIV623HoXfCpXEaiht+XMCQ 7RoH48TPjWEMbQ6Z5A4prW2VPABn4GQhm37tH+n1ls/sVIb9nJOonWyzZugmYrWGqcU5 aXL6JkTn91GHn22xAnVtKA0jEyGRtkiig/yK7bmMkTWBXdI7+oGfW8DOYK0iXzcmuyOJ 0DZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=L0pRlBCR; 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=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i25si898015edr.503.2020.07.15.02.12.12; Wed, 15 Jul 2020 02:12:35 -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=@google.com header.s=20161025 header.b=L0pRlBCR; 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=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730317AbgGOIiZ (ORCPT + 99 others); Wed, 15 Jul 2020 04:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729066AbgGOIiY (ORCPT ); Wed, 15 Jul 2020 04:38:24 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EAD7C061755 for ; Wed, 15 Jul 2020 01:38:24 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id m16so2100143pls.5 for ; Wed, 15 Jul 2020 01:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TbJ/+ucYAYXSyy1FqmpSCm01BvP6FkdKr9JPVe9GaUg=; b=L0pRlBCRfUah0I4nLTsTC/5bv4ktc+BBmfCp6T4csHEtDtfAWLOgbeZW4Bn68P3Mao zEltQ6EKuI39ADl6Bd7eMem4iWEgCvj4H+xSIPzU9722c0kTQrVLOqE1H/UeFH3Xx7tO K1+rMFQbYBqLwwKrmRKDwMP9C5AK9HR6oz3QDlCVjoihNrO0V3QJxpTm7HzGEo4bWKa+ yD6xSMWacEH9z2oxtwNfhmE1dyNRMOxtbLP2sdhLXnH7Hm8UiNrBx7zM5R7gdzXDsEQr CKV88k3iqYvf8mz+EUQv0blZ5MAQFv792N7CKYU9apHXNuqw/NA+8732rWdUvYWO0zOW WoCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TbJ/+ucYAYXSyy1FqmpSCm01BvP6FkdKr9JPVe9GaUg=; b=Z783HrFNVJMilYptp06Y3O65+t0meDoWdLuhClIUeaMBNoW4dzExoZH+8CTeli2wzX hOLZx5Nisz4XOlhefdKJ/INV9cVpdjvvNKtruoeba/5LhY5SvmI5Rec8V9vkJQr8o8A8 meVy6Z7q/BcqmfB38AzGMFZtpsc0xeU7f2gFzRMdkqeSRQCNFjVtWAmmASQjLKhXW/Dz 0b7fSRv1gSXNP3FvvuMUCjlqJqKmcYoaQmhTRnV03uT1thi+i1wAOzyZLnRfjesXs0Ox E9V40wH+FUO7Lyx0DIEJ7V9E3PeUpGtA3tpOYEp/zzhDJAYkyCZL4n+44wP1ijv9mvsI 07pA== X-Gm-Message-State: AOAM533GAB85ZON75cJaQV6fiPJI4NWljRqGWekm+OZ74HK/mw/Adufh DjPb8ZijqNlNGLo8C3lEcXJC+MUKbYdUm741MGbo+Q== X-Received: by 2002:a17:90a:cc03:: with SMTP id b3mr8256003pju.80.1594802303432; Wed, 15 Jul 2020 01:38:23 -0700 (PDT) MIME-Version: 1.0 References: <20200704085213.444645-1-ignat@cloudflare.com> <20200704085213.444645-2-ignat@cloudflare.com> In-Reply-To: <20200704085213.444645-2-ignat@cloudflare.com> From: Brendan Higgins Date: Wed, 15 Jul 2020 01:38:12 -0700 Message-ID: Subject: Re: [PATCH v2 1/3] um/kconfig: introduce CC_CAN_LINK_STATIC_NO_RUNTIME_DEPS To: Ignat Korchagin Cc: Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um , Linux Kernel Mailing List , kernel-team@cloudflare.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 4, 2020 at 1:52 AM Ignat Korchagin wrote: > > For statically linked UML build it is important to take into account the > standard C-library implementation. Some implementations, notably glibc have > caveats: even when linked statically, the final program might require some > runtime dependencies, if certain functions are used within the code. > > Consider the following program: > int main(void) > { > getpwent(); > return 0; > } > > Compiling this program and linking statically with glibc produces the following > warning from the linker: > /usr/sbin/ld: /tmp/ccuthw1o.o: in function `main': > test.c:(.text+0x5): warning: Using 'getpwent' in statically linked > applications requires at runtime the shared libraries from the glibc version > used for linking > > We will use the flag to detect such C-library implementation build time and > possibly disable static linking for UML to avoid producing a binary with > unexpected behaviour and dependencies. > > Signed-off-by: Ignat Korchagin Nice. Reviewed-by: Brendan Higgins