Received: by 10.223.185.116 with SMTP id b49csp564599wrg; Wed, 14 Feb 2018 03:34:52 -0800 (PST) X-Google-Smtp-Source: AH8x225IcvkX38N+7q/HATeLNQ201BEd1RfFaiki6ClRAFyNHXS80Qwlp5QIwpdVqf2KH4ORWzsR X-Received: by 10.99.171.10 with SMTP id p10mr735343pgf.176.1518608092005; Wed, 14 Feb 2018 03:34:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518608091; cv=none; d=google.com; s=arc-20160816; b=OoHmb12019toPdW7mtbCIw8eXfBVWneq9bj86/6L6Ut72oZ6X6Izf+xnsgjxALQunJ vTgxKc1Rti803IVaeLlaB2aZ35tNgh/y4zswYFZza5idopiN6wm6T7/1dyUhiBIqcWxa F2CJXud3kVr+vU3xVJooCN76/ySujQdwgHS+yVIgfOmfA62SbPHONWm3iqmrJAUiWtlT L8XzNYxUAzZhtSUDElQkQso0W4Dwzho+nuczYO50iC3k784dMovWmZfBocXTO1wZhGZq i6bHWMa1IKP8+ZcdeiN3ubb3rlJssCZL8YUNuTpFMUsJYB3CMXxu6LXJQVbb8GoNl81I qRrw== 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 :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=ENxsJgjfyIpAF/8cfPp7Gy52hIo0rwDmRF7UfWcG1d8=; b=aZkFoPpAj3qr7EcfoQaJxI05VxUVJFSiWcljtkE8MDriBtwaQq/B8p7Bmbiw1lqcmw 6u2kp6HKe5thSvtCRNyVsUfnqtAltnTQBxEOeckG1qde0JTG4Upa2H3dqwrk4D/gC7CQ PdQZKIP+KSKhd7G8UM2OFn47Y1X+a9HbiLUb/rwGtn5DqaxxUppeiqM1plmsIsxhJ0Oh ICywTLBRNK32ozZ74WxFxlpKo1mp7bgCm8m5Ctd0VQVkmiDVU+D9atAYsPkeKxnQke8b KvwNwW0SulFt4ix2BpGYRblqSLPJDFEbJHIv0GZtyz9DHUSYPo/frthxkUrsB8vltCb1 Q9KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=i9YYwApr; 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 w8-v6si1080537plk.597.2018.02.14.03.34.36; Wed, 14 Feb 2018 03:34:51 -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=i9YYwApr; 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 S967412AbeBNLc1 (ORCPT + 99 others); Wed, 14 Feb 2018 06:32:27 -0500 Received: from conssluserg-01.nifty.com ([210.131.2.80]:19259 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967342AbeBNLc0 (ORCPT ); Wed, 14 Feb 2018 06:32:26 -0500 Received: from mail-ua0-f171.google.com (mail-ua0-f171.google.com [209.85.217.171]) (authenticated) by conssluserg-01.nifty.com with ESMTP id w1EBWA38001195; Wed, 14 Feb 2018 20:32:10 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com w1EBWA38001195 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1518607931; bh=ENxsJgjfyIpAF/8cfPp7Gy52hIo0rwDmRF7UfWcG1d8=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=i9YYwApryheKZDOJKpEHKe14DxXGMusLLkgcP3KxedaTE+gDwtU6hq551tcllaEU4 RTtGKV7/5J/z+zU/ElL30b8Cpg9ADzcjrUswQhPr52i9b8LarhOyS4gmOJUKLllwtj HNBspuLesv2jpG5GCDm/foWHq8L7jTEW+lLqt5gNUK7cGEVMx5xcIHIIdlQKpcsmo3 XqgRMfwzKrhgb1JviSG31uKfSHCxbSJW32feHi5LFSotjAG6F27qXG4Aqass2dMhRZ G1Nl+vhIfm8hyibxT/yTVWUtslRHd5AR+tGH+J0LFGUNb/ELGgc7SQY/MLRKy/Ctya a7j7I6dV5N88g== X-Nifty-SrcIP: [209.85.217.171] Received: by mail-ua0-f171.google.com with SMTP id z3so13440831uae.12; Wed, 14 Feb 2018 03:32:10 -0800 (PST) X-Gm-Message-State: APf1xPDpxuud6Id4WKxL/o6HHSiH58e4atarY0rfKu7EKaj/BhrFTtiC eIq+/W9+OjIxzTyTFBfValvJM708kCY01/NAJ/4= X-Received: by 10.176.73.39 with SMTP id z36mr4302845uac.6.1518607929668; Wed, 14 Feb 2018 03:32:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.83.212 with HTTP; Wed, 14 Feb 2018 03:31:29 -0800 (PST) In-Reply-To: <6f19ae3f-249e-2d20-dcd6-e34c475a2638@cn.fujitsu.com> References: <6f19ae3f-249e-2d20-dcd6-e34c475a2638@cn.fujitsu.com> From: Masahiro Yamada Date: Wed, 14 Feb 2018 20:31:29 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: why scripts/link-vmlinux.sh has a final build of init/ To: Cao jin Cc: Michal Marek , Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" 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 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. > 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 -- Best Regards Masahiro Yamada