From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA9A9C433DF for ; Mon, 15 Jun 2020 14:15:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A24EC20644 for ; Mon, 15 Jun 2020 14:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592230540; bh=pOf9ob1yXOcLv+kngT7rJ4CcwcVjvYQLZaRnOjX9KYg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=ToR+Wef1gCZZUedqGO1QvgQIyOy0wow6fqM2GkBfXpFkHW/AowKVFEa2Ca+beUhh2 Fr5gjt/BrQevCY/bavxQ0sKL0FlyARaFH1O8ne/8xfSY7/MKunk03v7rpWTvKX7jja a7byoT8vnDuDNnb4CxV5bDCgivFM+zOEUyxGaPWw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730074AbgFOOPk (ORCPT ); Mon, 15 Jun 2020 10:15:40 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:60952 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730022AbgFOOPi (ORCPT ); Mon, 15 Jun 2020 10:15:38 -0400 Received: from mail-ua1-f41.google.com (mail-ua1-f41.google.com [209.85.222.41]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 05FEFFuc001841; Mon, 15 Jun 2020 23:15:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 05FEFFuc001841 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1592230515; bh=xmQzt5ozqUDfusz/+X9tTq5Zy7GppPGRYRP3NXmssX4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CoxsK5UqwzZtQIy2bAWA1dkV2aYZCFEcHX8OOVC/AC23vI4UYkamBipCyAwaQHsNC W8Uf9NlwRq0KuMpuK4te2tLdIBt0Rs8NeTAJ6HMZne8e3XdKqsvtl0t3MMtOGTlO2K WcvFtYLDrgQJKsEhRfJdytQl3exxC+rJ5nY53eYQ/Z+URmm3cUA31VG8eCM4oSy+21 OyRlAzPZEu3ycCxYygW1yiskY7999e3MOPdxa0fY1rmcEYjxoBUVfCX2j9IwPpMcUx 1I24NyNhJuTYLDGnEm286TqBe1C2O42phDlOZG+sHL5meVg+BGT2RRHFooVjmDA9pr hPFphn4g44KpA== X-Nifty-SrcIP: [209.85.222.41] Received: by mail-ua1-f41.google.com with SMTP id i8so1122297uak.9; Mon, 15 Jun 2020 07:15:15 -0700 (PDT) X-Gm-Message-State: AOAM530wGKXVt7v5anSk1Ekfnc1vXHT42S13QTOHeEa/GYX/HqPdaO9x fgTZJQ4xAglZcyGiXYlCc0NF9L0A/yIBLydLLSw= X-Google-Smtp-Source: ABdhPJwGbVy/6TjyF65GLtUD4/lPeWjMrUoVu8Kl4lBNcgY1L1EifCammXZkd6BT/Cgh7HUPvFAO52Hed6qKoukOZRQ= X-Received: by 2002:ab0:156d:: with SMTP id p42mr19609339uae.121.1592230514499; Mon, 15 Jun 2020 07:15:14 -0700 (PDT) MIME-Version: 1.0 References: <20200604022031.164207-1-masahiroy@kernel.org> <20200604022031.164207-2-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Mon, 15 Jun 2020 23:14:37 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] efi/libstub: refactor Makefile to not use lib-y syntax To: Ard Biesheuvel Cc: linux-efi , Arvind Sankar , Atish Patra , Ingo Molnar , Kees Cook , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Mon, Jun 15, 2020 at 7:41 PM Ard Biesheuvel wrote: > > On Mon, 15 Jun 2020 at 12:26, Ard Biesheuvel wrote: > > > > On Thu, 4 Jun 2020 at 04:20, Masahiro Yamada wrote: > > > > > > Documentation/kbuild/makefiles.rst says: > > > > > > Use of lib-y is normally restricted to `lib/` and `arch/*/lib`. > > > > > > This is because lib-y is inteded to be hooked to KBUILD_VMLINUX_LIBS, > > > which is passed down to scripts/link-vmlinux.sh. > > > > > > Besides, lib-y is not so interesting because objects from lib-y are > > > mostly linked in normal usecases. For example, lib-y only saves 364 > > > bytes for x86_64_defconfig. You can see the details in commit > > > 7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when > > > CONFIG_MODULES=y"). > > > > > > I think we should consider to deprecate lib-y syntax at some point > > > because we should aim for better solution like dead code elimination > > > or LTO. > > > > > > Other than lib/ and arch/*/lib, this Makefile is the only user of > > > lib-y. Replace lib-y with a custom rule. > > > > > > Signed-off-by: Masahiro Yamada > > > > Series queued in efi/urgent. > > > > Actually, I am seeing this now > > /home/ard/linux/scripts/Makefile.build:421: warning: overriding recipe > for target 'drivers/firmware/efi/libstub/lib.a' > /home/ard/linux/drivers/firmware/efi/libstub/Makefile:131: warning: > ignoring old recipe for target 'drivers/firmware/efi/libstub/lib.a' Sorry, please drop this patch for now. (Actually, it was working when I submitted it, but is broken after e578edc72276280b8fae57f6bf79cb443ceee7a2) -- Best Regards Masahiro Yamada