From patchwork Tue Feb 5 07:33:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 157470 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4838005jaa; Mon, 4 Feb 2019 23:33:59 -0800 (PST) X-Google-Smtp-Source: AHgI3IYNwe2TtlZEAk6DpJ2Y7nMiIDZgQsSBmg62WDEb1zPwGcN/Z/9vsjGc9WAgakmUZeJ2T1+j X-Received: by 2002:a65:528c:: with SMTP id y12mr2770535pgp.317.1549352039475; Mon, 04 Feb 2019 23:33:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549352039; cv=none; d=google.com; s=arc-20160816; b=QmEoUGfDext8NY2E/oXDWStbwGJVQ4zxSwvTQZ7j9DUHdc85OBDl7JD9HSDN2K16j3 CQPs+jp304zHWMYWrEEi0YAfHtGMyjTsgmwMrhkyMYdEfJK6QA6Nw3csb13cYqItKdKQ ZbZ2iMgay1m5/lLENsu/R7WD3+L4OVYRnO6QOEvXpsblat7c+dPCRsgpEvS6clJzGU71 K9Z++24GpaPMDxpGzFg/sMHt9+mG02k1h+ppB224zjKdUQMtG8MzClTA5SOB0pY3lsZ5 kffCJomuQVxi7pgk8g6jj7MHzHpyeUf9fJq5l4N4E2o2kF7hVvncp04z6EXbWMwOXppc mTsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=bsp0oZDCWMj5clsmjWUwXR/WzLE4a8svWWlCVYi63uA=; b=CvBc9kh09QeWqfjW5PV8dnNqU9bhboOMcafh9VXbcadsWSQyulJgTdKNPPBQf5kTwa NvcIud4PkHJJ6P8FotMlxAjR4oxOO9pKDvvYBCCb/s4/dLdYGKGgHIVAkuCcfGAXOp1t uZxAhmH8lWqXLsuHlrXmgJNMzp8jjG3+Zsll6VdugbcmbOjY2nVADDc1ThaMemosdnKf D/rhdQimsDVjuLRK5iokg8ktx2JsVZ4MpScNi380AcGJQeDq74YYImRAW+PkSWTq5clU lwhSazqC2DtXHQtZnosVGQOPK4qbOAXkcT6H/cu04yY4ABF6sHTlCinpP+3AywUEsnLg CCFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="Zn038/3J"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si2746157pfd.3.2019.02.04.23.33.59; Mon, 04 Feb 2019 23:33:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="Zn038/3J"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727911AbfBEHd5 (ORCPT + 31 others); Tue, 5 Feb 2019 02:33:57 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:32747 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbfBEHd4 (ORCPT ); Tue, 5 Feb 2019 02:33:56 -0500 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-11.nifty.com with ESMTP id x157XeZ3021016; Tue, 5 Feb 2019 16:33:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com x157XeZ3021016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1549352021; bh=bsp0oZDCWMj5clsmjWUwXR/WzLE4a8svWWlCVYi63uA=; h=From:To:Cc:Subject:Date:From; b=Zn038/3JI1UlCCg9lx0j6MqK7kdx3ZjlASJG2vIW3UkwqFThmBq7ptjlzeeUchTAS mcrbWSSAUkA2Xb8A5Zuo/+A7aLWDFGHwKvD0vmjFCYXKgmwQq57XaqpVseVHnNHu7H LtgGInGpPuhP6aCkljeGDAQMKOBR8oId9YOmKs5GaXLJx9mdG8sUINpiJ/hHpDf/9R dMdBUMfpF7/YPu3Uqz1h5wfkEfeKD7KVoHEPg8eE632zWjcAv/bNnYWfLowaE9UFZV 3EWi3JJ8TUeewROkWybs+c+RNAxN+NnDfXKp/YQK9CkVGmRNOKBsY01cHKUXbwYsI5 Gp6NHg+KM1QHg== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-s390@vger.kernel.org, Vasily Gorbik , Heiko Carstens , linux-kernel@vger.kernel.org, Michal Marek , Martin Schwidefsky Subject: [PATCH] kbuild: move archive command to scripts/Makefile.lib Date: Tue, 5 Feb 2019 16:33:37 +0900 Message-Id: <1549352017-3503-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org scripts/Makefile.build and arch/s390/boot/Makefile use the same command (thin archiving with symbol table creation). Avoid the code duplication, and move it to scripts/Makefile.lib. Signed-off-by: Masahiro Yamada --- arch/s390/boot/Makefile | 3 --- scripts/Makefile.build | 6 +----- scripts/Makefile.lib | 6 ++++++ 3 files changed, 7 insertions(+), 8 deletions(-) -- 2.7.4 diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile index 11ca879..c844eaf 100644 --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile @@ -57,9 +57,6 @@ $(obj)/section_cmp%: vmlinux $(obj)/compressed/vmlinux FORCE $(obj)/compressed/vmlinux: $(obj)/startup.a FORCE $(Q)$(MAKE) $(build)=$(obj)/compressed $@ -quiet_cmd_ar = AR $@ - cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) - $(obj)/startup.a: $(OBJECTS) FORCE $(call if_changed,ar) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index f8e2794..99be01c 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -424,13 +424,9 @@ $(modorder-target): $(subdir-ym) FORCE # Rule to compile a set of .o files into one .a file (with symbol table) # ifdef lib-target -quiet_cmd_link_l_target = AR $@ - -# lib target archives do get a symbol table and index -cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) $(lib-target): $(lib-y) FORCE - $(call if_changed,link_l_target) + $(call if_changed,ar) targets += $(lib-target) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index c0abd9a..8a1f64f 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -233,6 +233,12 @@ $(obj)/%: $(src)/%_shipped quiet_cmd_ld = LD $@ cmd_ld = $(LD) $(ld_flags) $(real-prereqs) -o $@ +# Archive +# --------------------------------------------------------------------------- + +quiet_cmd_ar = AR $@ + cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(real-prereqs) + # Objcopy # ---------------------------------------------------------------------------