Received: by 10.223.185.116 with SMTP id b49csp208239wrg; Tue, 20 Feb 2018 19:22:07 -0800 (PST) X-Google-Smtp-Source: AH8x225UJ+slMPmwGzvaRkVRZHhBB+N7pl9ZwiRQRC0NkBXr8+aNtVhzvYGrYyJpxppW4I9/LVF1 X-Received: by 10.99.159.10 with SMTP id g10mr1454415pge.407.1519183327411; Tue, 20 Feb 2018 19:22:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519183327; cv=none; d=google.com; s=arc-20160816; b=LTTGFqjdmI/Ii3V9G8+Hl149Xz/39hcy6F4/tgAzSlF0YqXJa+aWYS5NJD++L/bMu1 bAhSB7jN2qyVwx75ypKUA3S5QbkeVVCQ9vEIq3v43iUUA7TMqSrZxBcO1xXivNX8UHZs fshSdibYy5hN9x6+q4UKTW6m1pwIGPX8MGGPkS/AbBuSSUMyHaF4H83aBKHiiXSQDvEE cLJfbtOsphWcosRoAXeJLe2H28mI9GJGhnxjUojqEuVVGnCiyuozhMlQpLJ1zwzd02c3 m0loiT872RxZ4ugU9vJo8NHeROKCMgx4B7+xOSnHo2qQd5RwhS6lDn42IDK6NryXGM6P hiVQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=3uAcGKoEBI7t7zNpk8wZOLBVDXRZjU1z0y/GTgmprtM=; b=f6Vy2apZymRz0vHGtDS7EU4H+zGK3++0HJvnZljknzmzWvX//ATefn4I3KOscjVOhX /jZBmLpmLawdXrq8W0FTUEBz83lZEiVYlnChWwSISlLUVtOXCaJ8Cx2OsTc/5+bdGAqr jAdcPVxViQXylXT5YHgqRUJoOeSjf1zF6tRiJL9U3Harvcuqd3HcDlR040+JNvCgJMi6 yYAHJZYV7zTkAVLK3ttZ9NCB2cFTf/WaNn6X6w1XhPXJMc/fewdgRwKygA2XlZ2TV5Ea vk3v177GSYgvGPiWRNZJgQQnzhxgR6/pyPzSP1kzmM4JRxGvhOK/NkH5vvujdowdiiwk 917g== ARC-Authentication-Results: i=1; mx.google.com; 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 d13si532103pgn.366.2018.02.20.19.21.52; Tue, 20 Feb 2018 19:22:07 -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; 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 S1751422AbeBUDUd (ORCPT + 99 others); Tue, 20 Feb 2018 22:20:33 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:6917 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751327AbeBUDUc (ORCPT ); Tue, 20 Feb 2018 22:20:32 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="37142766" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 21 Feb 2018 11:20:26 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id B35A948AE762; Wed, 21 Feb 2018 11:20:25 +0800 (CST) Received: from [10.167.226.60] (10.167.226.60) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 21 Feb 2018 11:20:25 +0800 Subject: Re: why scripts/link-vmlinux.sh has a final build of init/ To: Masahiro Yamada CC: Michal Marek , Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" References: <6f19ae3f-249e-2d20-dcd6-e34c475a2638@cn.fujitsu.com> From: Cao jin Message-ID: Date: Wed, 21 Feb 2018 11:20:18 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.60] X-yoursite-MailScanner-ID: B35A948AE762.A7902 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry for late. On 02/14/2018 07:31 PM, Masahiro Yamada wrote: > 2018-02-13 16:08 GMT+09:00 Cao jin : > >> BTW, I still have 2 questions. >> >> 1. In final build, why need >> >> GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}" >> >> Doesn't GCC_PLUGINS_CFLAGS already exist in the environment? >> >> I also tested the Randomizing Structure Layout plugin with this patch, >> the plugin seems works in my test. > > > I have not tested, but GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}" > is probably unnecessary. > > > >> 2. scripts/link-vmlinux.sh seems just handle only one argument: clean. >> So why shouldn't it be: > > > To detect the change of $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) > because link-vmlinux.sh depends on them. > I understood, I missed the existence of .vmlinux.cmd file. Thanks very much, Masahiro-san. -- Sincerely, Cao jin > >> diff --git a/Makefile b/Makefile >> index ccd981892ef2..21d93b545381 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -998,7 +998,7 @@ ARCH_POSTLINK := $(wildcard >> $(srctree)/arch/$(SRCARCH)/Makefile.postlink) >> >> # Final link of vmlinux with optional arch pass after final link >> cmd_link-vmlinux = \ >> - $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ; \ >> + $(CONFIG_SHELL) $<; \ >> $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) >> >> vmlinux: scripts/link-vmlinux.sh vmlinux_prereq $(vmlinux-deps) FORCE > > >