From patchwork Sat Mar 26 02:39:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 8673881 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4EB89C0553 for ; Sat, 26 Mar 2016 02:39:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E572202AE for ; Sat, 26 Mar 2016 02:39:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C998D20260 for ; Sat, 26 Mar 2016 02:39:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752275AbcCZCji (ORCPT ); Fri, 25 Mar 2016 22:39:38 -0400 Received: from conssluserg001.nifty.com ([202.248.44.39]:63808 "EHLO conssluserg001-v.nifty.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752074AbcCZCjh (ORCPT ); Fri, 25 Mar 2016 22:39:37 -0400 Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) (authenticated) by conssluserg001-v.nifty.com with ESMTP id u2Q2dXBX024327; Sat, 26 Mar 2016 11:39:33 +0900 X-Nifty-SrcIP: [209.85.220.180] Received: by mail-qk0-f180.google.com with SMTP id s5so47307645qkd.0; Fri, 25 Mar 2016 19:39:33 -0700 (PDT) X-Gm-Message-State: AD7BkJLlSQVdGd9AVHOAlYVEIrlaPQab42+RkVbN5FYhQLrDmutCoNRqpBt+gOso3ltUTTX3RXlPtLGaLWkEcQ== MIME-Version: 1.0 X-Received: by 10.129.98.67 with SMTP id w64mr8749568ywb.38.1458959972392; Fri, 25 Mar 2016 19:39:32 -0700 (PDT) Received: by 10.37.82.9 with HTTP; Fri, 25 Mar 2016 19:39:32 -0700 (PDT) In-Reply-To: <20160324010749.f7e547e1df12b4944c5fa490@gmail.com> References: <20160307000208.1bec3e7dc874489d1b4fcbb4@gmail.com> <20160307000427.c82f18670568e1e656fc9532@gmail.com> <20160324010749.f7e547e1df12b4944c5fa490@gmail.com> Date: Sat, 26 Mar 2016 11:39:32 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 2/5] GCC plugin infrastructure From: Masahiro Yamada To: Emese Revfy Cc: Linux Kbuild mailing list , pageexec@freemail.hu, spender@grsecurity.net, kernel-hardening@lists.openwall.com, Michal Marek , Kees Cook , Rasmus Villemoes , fengguang.wu@intel.com, Dmitry Vyukov , Linux Kernel Mailing List Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Emese, 2016-03-24 9:07 GMT+09:00 Emese Revfy : > On Fri, 11 Mar 2016 15:25:19 +0900 > Masahiro Yamada wrote: > >> You sprinkle "gcc-plugins" target in the top Makefile, which I do not like. >> >> Can you descend into scripts/gcc-plugins from scripts/Makefile? >> >> >> subdir-$(CONFIG_MODVERSIONS) += genksyms >> subdir-y += mod >> subdir-$(CONFIG_SECURITY_SELINUX) += selinux >> subdir-$(CONFIG_DTC) += dtc >> subdir-$(CONFIG_GDB_SCRIPTS) += gdb >> +subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins >> >> >> This is how other host tools do, I think. > > Hi, > > I tried to remove the gcc-plugins target but sadly in this case the plugins aren't complied. > I don't know if I understand how it should work. I pushed a commit: > https://github.com/ephox-gcc-plugins/gcc-plugins_linux-next/commit/0b005b886bde6c4b9134d01f830d88d464911a65 > Could you please help me with what I did wrong? > Sorry, I missed this problem. GCC-plugins must be compiled before descending into ./Kbuild. Please apply the following on top of commit 0b005b88 and check if it works. diff --git a/Makefile b/Makefile index 1c7a379..bd643d3 100644 --- a/Makefile +++ b/Makefile @@ -1009,6 +1009,9 @@ archprepare: archheaders archscripts prepare1 scripts_basic prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS) prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS) prepare0: archprepare FORCE +ifdef CONFIG_GCC_PLUGINS + $(Q)$(MAKE) $(build)=scripts/gcc-plugins +endif $(Q)$(MAKE) $(build)=. # All the preparing.. diff --git a/scripts/Makefile b/scripts/Makefile index 0ba652c..1d80897 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -45,7 +45,6 @@ subdir-y += mod subdir-$(CONFIG_SECURITY_SELINUX) += selinux subdir-$(CONFIG_DTC) += dtc subdir-$(CONFIG_GDB_SCRIPTS) += gdb -subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins # Let clean descend into subdirs -subdir- += basic kconfig package +subdir- += basic kconfig package gcc-plugins