From patchwork Wed Feb 21 04:25:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cao jin X-Patchwork-Id: 10231235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 482C460209 for ; Wed, 21 Feb 2018 04:25:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3839128903 for ; Wed, 21 Feb 2018 04:25:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BFE428A18; Wed, 21 Feb 2018 04:25:30 +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=-6.9 required=2.0 tests=BAYES_00,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 7626728903 for ; Wed, 21 Feb 2018 04:25:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751363AbeBUEZ3 (ORCPT ); Tue, 20 Feb 2018 23:25:29 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:57192 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751017AbeBUEZ2 (ORCPT ); Tue, 20 Feb 2018 23:25:28 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="37143461" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 21 Feb 2018 12:25:26 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 7D6B348AE763; Wed, 21 Feb 2018 12:25:24 +0800 (CST) Received: from TSAO.g08.fujitsu.local (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 12:25:24 +0800 From: Cao jin To: , CC: , , Subject: [PATCH RFC] kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment Date: Wed, 21 Feb 2018 12:25:07 +0800 Message-ID: <20180221042507.31379-1-caoj.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 X-Originating-IP: [10.167.226.60] X-yoursite-MailScanner-ID: 7D6B348AE763.AA7EA X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com 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 GCC_PLUGINS_CFLAGS is already in the environment, so it is superfluous to add it in commanline of final build of init/ Signed-off-by: Cao jin --- This is only tested with Randomizing Structure Layout plugin. The test method is not so grace but I think it can prove the correctness of this patch. On the other hand, if we concerns that some flags cannot be passed during final build, should also consider all the other flags. Currently, with Randomizing plugin enabled, the crash utility can't work with it, the symptom is a Segmentation fault due to infinite function call. With the patch, the symptom is exactly the same, so I am sure the plugin works. scripts/link-vmlinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index e6818b8e7141..e07b2d251ad6 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -248,7 +248,7 @@ else fi; # final build of init/ -${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}" +${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init archive_builtin