From patchwork Mon May 28 09:22:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 137051 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2593715lji; Mon, 28 May 2018 02:26:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoRTG8CvKT5kEdVHDD2nZhSqoRbtLhCht8FkpbPT0HInPGakeO0RRtNsgT4JV0qUEWUO5WW X-Received: by 2002:a65:50c7:: with SMTP id s7-v6mr9952102pgp.359.1527499612062; Mon, 28 May 2018 02:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527499612; cv=none; d=google.com; s=arc-20160816; b=ElWhNCx1P6DPV8NoABCqKTUKBfKZRb4s6ZWgRA8v/fWIDh6PRHrbRV1qsKLfpe+1Lq Z4bZ8wcPQ1URdMbvMBAOw6JWFM9GXeOX/69MGsFzKP5y2SV455K01hMBvuhBhuE+GPbg ILZYzK7OrSFA9ce11EEe5+slDx4n1IbgmfQDa6ftRpHSAW+FFXenNJQrBrgE7rL5F3+F UIpgH1imkfQ2/syw6/ckq+9Qms5B1/D6Uo06/iMW9od7Sf6/D0VYzPhXkv11NLJHFJOk OyzzL1bl1sdOUCF9EWHss2iPxkPB8cocs5TegeV4Sy8F9BkJCgKAEQ9VC1lqRor81rk+ q5Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=K2pnM9k4Ir5ms5fvVd46T5nd2LcbxCSfCNHsU2G0jPI=; b=SSaEH8yBZ6YxUxvAR9ERMdDXCDqklFMZlG8PiY/zHtU/bpwuUOS+V7tx5w8t8qP8K0 nct+5/JJpuO4cq7ePkSYJCtewQbNXRfkaC3v5ZwNVaQ+qr8ukGapUl/ZUvavwDVO5fMW tAlMLkbX5Uzbop5MsmLxKuBNe4CeirLEZ5u/5OtC8l2LA7zz3ILvjq9e49wwArRQbGO6 8LQ5HN7OAtMjs02CSiMWNENHjz6bEa8+vWoqR2ry8/EnbuUeWS3X2p8qmNEBpjbDb2QI WrPOEb3kWbIp02xsLqPAL9fE70bBZOKuzSJt6XlmVaeOnS7x72iUcGsnqvIRulxmQPUy IpHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=P6DMGZ9/; 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 w3-v6si5640744pgb.588.2018.05.28.02.26.51; Mon, 28 May 2018 02:26:52 -0700 (PDT) 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=P6DMGZ9/; 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 S933439AbeE1J0u (ORCPT + 30 others); Mon, 28 May 2018 05:26:50 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:21964 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932146AbeE1JY2 (ORCPT ); Mon, 28 May 2018 05:24:28 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w4S9MInj027506; Mon, 28 May 2018 18:22:42 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w4S9MInj027506 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1527499362; bh=K2pnM9k4Ir5ms5fvVd46T5nd2LcbxCSfCNHsU2G0jPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P6DMGZ9/x2WuNVBCp3wwKsVlol9Owg9pp/x89/t4cFxaDC8m8q02stbgW5y1CjzHb sMci2jj68UfRWvErnvdxv0ZLFirlnkDJd2qU3BUkmGkfTIxkmRQFf9Mh9aftMyfgO6 t4IU1ZHW/TKBYr6Zp+E0P41RdnCCvFkmVn5rXtFzl9bJqFEZs2zX1TCR9JZHK8u031 ksldT2Lfrr6G7q70I3+zWD5v7b6ZLOBI4QGK1wXY+Fm/GqvaFMEbO3vo5zNTYjpa1d b77ReBts7qq/pK14j5fou6sWdq46+N9Lc3pPVor8cTgDXMr4jKs7tt0ASu3VTp1RXp DfacytbSLixDg== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Kees Cook , Nicholas Piggin , "Luis R . Rodriguez" , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Linus Torvalds , Masahiro Yamada Subject: [PATCH v5 28/31] gcc-plugins: move GCC version check for PowerPC to Kconfig Date: Mon, 28 May 2018 18:22:05 +0900 Message-Id: <1527499328-13213-29-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527499328-13213-1-git-send-email-yamada.masahiro@socionext.com> References: <1527499328-13213-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For PowerPC, GCC 5.2 is the requirement for GCC plugins. Move the version check to Kconfig so that the GCC plugin menus will be hidden if an older compiler is in use. Signed-off-by: Masahiro Yamada Acked-by: Andrew Donnellan Reviewed-by: Kees Cook --- Changes in v5: None Changes in v4: None Changes in v3: - Move comment to Kconfig as well Changes in v2: None arch/powerpc/Kconfig | 2 +- scripts/Makefile.gcc-plugins | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) -- 2.7.4 diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index c32a181..17e53e6 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -195,7 +195,7 @@ config PPC select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER - select HAVE_GCC_PLUGINS + select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200 # plugin support on gcc <= 5.1 is buggy on PPC select HAVE_GENERIC_GUP select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx) select HAVE_IDE diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins index 0ce3802..1e92353 100644 --- a/scripts/Makefile.gcc-plugins +++ b/scripts/Makefile.gcc-plugins @@ -53,14 +53,6 @@ gcc-plugins-check: FORCE ifdef CONFIG_GCC_PLUGINS ifeq ($(PLUGINCC),) ifneq ($(GCC_PLUGINS_CFLAGS),) - # Various gccs between 4.5 and 5.1 have bugs on powerpc due to missing - # header files. gcc <= 4.6 doesn't work at all, gccs from 4.8 to 5.1 have - # issues with 64-bit targets. - ifeq ($(ARCH),powerpc) - ifeq ($(call cc-ifversion, -le, 0501, y), y) - @echo "Cannot use CONFIG_GCC_PLUGINS: plugin support on gcc <= 5.1 is buggy on powerpc, please upgrade to gcc 5.2 or newer" >&2 && exit 1 - endif - endif ifeq ($(call cc-ifversion, -ge, 0405, y), y) $(Q)$(srctree)/scripts/gcc-plugin.sh --show-error "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)" || true @echo "Cannot use CONFIG_GCC_PLUGINS: your gcc installation does not support plugins, perhaps the necessary headers are missing?" >&2 && exit 1