From patchwork Fri Mar 8 05:30:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10844209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3503C14E1 for ; Fri, 8 Mar 2019 05:31:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F9A72EF0E for ; Fri, 8 Mar 2019 05:31:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E0D82EF33; Fri, 8 Mar 2019 05:31:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63DF82EF0E for ; Fri, 8 Mar 2019 05:30:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725766AbfCHFa6 (ORCPT ); Fri, 8 Mar 2019 00:30:58 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:56172 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725308AbfCHFa6 (ORCPT ); Fri, 8 Mar 2019 00:30:58 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x285Udqx017095; Fri, 8 Mar 2019 14:30:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x285Udqx017095 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1552023039; bh=oU7ETBxuT4v8f1zR1m07flzixJJImsBFfOVhlFXCla8=; h=From:To:Cc:Subject:Date:From; b=rbjYIf7LmgjsM6BAPgG6iL4S0u8qkbCW78zhTj56X1Qq8ysGwCy3NsXTT7YnokCvF ZM80rhnviuXsu4Eyf0t5cBVLTqIH1VLVNIzILDYao8s4hIe7rWQBA1fr2ptPwlFhVL +HJsyJRKCVs4dwzNENhAQnfok5FTIbBJYyZXpNIPVUQn3SLjmIF0XOEjvnkcdCxhX4 zSxSppa5+OMqa8q0P39T4fKVFT/RQz35B1nc9eiV8W7kQNVjqw4b0rJRjE5Vkh995d fI9IYg29mGrVKC3ruKWUd/+YAe5PqeL+1DDu1TqN507GlttuOgGimVnL+sTmIesPGM snNmsALXVv2cQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org, Guan Xuetao Subject: [PATCH] unicore32: simplify linker script generation for decompressor Date: Fri, 8 Mar 2019 14:30:35 +0900 Message-Id: <1552023035-29826-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When I was searching for unneeded $(KCONFIG_CONFIG) usages, I noticed this strange build dependency. It can use $(call if_changed,...) in case ZTEXTADDR and ZBSSADDR are changed, but even a simpler way is to use the pattern rule in scripts/Makefile.build. This is what arch/arm/boot/compressed/Makefile does. I did only build test. I confirmed equivalent vmlinux.lds was generated. Signed-off-by: Masahiro Yamada --- arch/unicore32/boot/compressed/Makefile | 5 +---- arch/unicore32/boot/compressed/{vmlinux.lds.in => vmlinux.lds.S} | 0 2 files changed, 1 insertion(+), 4 deletions(-) rename arch/unicore32/boot/compressed/{vmlinux.lds.in => vmlinux.lds.S} (100%) diff --git a/arch/unicore32/boot/compressed/Makefile b/arch/unicore32/boot/compressed/Makefile index 9aecdd3..150fafc 100644 --- a/arch/unicore32/boot/compressed/Makefile +++ b/arch/unicore32/boot/compressed/Makefile @@ -61,7 +61,4 @@ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head.o $(obj)/piggy.o \ ZTEXTADDR := 0x03000000 ZBSSADDR := ALIGN(4) -SEDFLAGS_lds = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ -$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/unicore32/boot/Makefile $(KCONFIG_CONFIG) - @sed "$(SEDFLAGS_lds)" < $< > $@ - +CPPFLAGS_vmlinux.lds = -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)" diff --git a/arch/unicore32/boot/compressed/vmlinux.lds.in b/arch/unicore32/boot/compressed/vmlinux.lds.S similarity index 100% rename from arch/unicore32/boot/compressed/vmlinux.lds.in rename to arch/unicore32/boot/compressed/vmlinux.lds.S