From patchwork Thu May 17 06:17:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 136093 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1877988lji; Wed, 16 May 2018 23:20:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoY4f3+pbl/L8gGjXs32qWzKtUcip+nqsoXMmEfVGuRfNAHUcPW3BH1eslFtF4BxpISqseK X-Received: by 2002:a63:ae0b:: with SMTP id q11-v6mr3200483pgf.109.1526538003283; Wed, 16 May 2018 23:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526538003; cv=none; d=google.com; s=arc-20160816; b=AoEqfF35ZzTuYABK9q491ejI2PU0SZa18qwo7ib1T2PoLiYv7RZ34bJNgXAL79DvLD o3wMo+d6v7RiqdTvtkyvorhQLU8kv3hTduBRR4gJOz+anBan8il++3jT+/dk3sRx/hqE JUknnH0QuKQOpbjSirwEaQBBCdGbiXjKrqB6PhDgngvPBPdIW4EaNgF0ZqU3S15Xh5AI thPAi86UQxs9FJTfCBTQk/EqzMBG9PWevzRmOm0wp5XqEilefUmQfpa1u2k4d85Fa+CT 3OOAExw2dq8+Z2FkYjd7TTzDN4fKbJ7SSb0c9N1qS6TEZTIR4dWWaU/LYKXX8mfPwLTb nDDw== 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=IuhIJa9blMCnxxz36aY4jxSrQFLyzf42D25Bc+qOlGc=; b=qy6rfgE5FvlNgCgtIPl8bbcCUPY3h8rsjbMUZvDsr41+x8yOYBWvC2gK8oWEiPzsE7 SFGZdlE8cTBlBMRZfyIxrM/kdKFG/SER7T7MhBYhRaXKjdCO1rkzrRNW/Rj6jS07K3zu l3ufkDVq4Yqmz6FGCM4UujBIjTY1P39nVZwgkAj9IGWKyvhnlZKw9Leo2xvfXT+yQnyp JynyhAsgm0COILJbRIltjj1r2seYwvn01HS0EDpBPc3XSP/SLK2fx7hWSTrdrVxLbyjq 8ghJnVyNQF3VCovWuiteq1pSeDHgFuBDshbWqkx1otTUdKC2tOts/5n6WdmPdIr6a7Bu vsfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=IM/la3o+; 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 z8-v6si3433208pgc.693.2018.05.16.23.20.03; Wed, 16 May 2018 23:20:03 -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=IM/la3o+; 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 S1752403AbeEQGUA (ORCPT + 29 others); Thu, 17 May 2018 02:20:00 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:26250 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349AbeEQGT5 (ORCPT ); Thu, 17 May 2018 02:19:57 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w4H6HbUQ002841; Thu, 17 May 2018 15:18:05 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w4H6HbUQ002841 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1526537886; bh=IuhIJa9blMCnxxz36aY4jxSrQFLyzf42D25Bc+qOlGc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IM/la3o+GzAJD3G/jhCTOYBSD8AXtOOOdNu0ohti+YfYJNejSc9Lv7I1hPZ9kikXz DhbOZvsNnczXUlqO1zgkRTvJmuAofr4ar4w04UZO20IajxUyGCbehcH6ajK8Zx2NiG 7GPnt3B5iS9g/KRgj6829vMl9idtQKKSMfoZyvES8y8LpmsJDUKMfMJmD9UfjUeQwz baOLoj8B0PXtfC+clvMMPA11FyFdcA4UfSSo1YDUl785C3OBBKNVRYtDv+xuVLjwXj 9aognsbswE6ZUVA2UIPZ50hSCTB7l54EtD2/76mJinEt3A44Gw7Hn05DF1tB/GgjMl RQfxqUClsJzzA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Linus Torvalds , Sam Ravnborg , Ulf Magnusson , "Luis R . Rodriguez" , linux-kernel@vger.kernel.org, Nicholas Piggin , Kees Cook , Emese Revfy , x86@kernel.org, Masahiro Yamada Subject: [PATCH v4 28/31] gcc-plugins: move GCC version check for PowerPC to Kconfig Date: Thu, 17 May 2018 15:17:07 +0900 Message-Id: <1526537830-22606-29-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526537830-22606-1-git-send-email-yamada.masahiro@socionext.com> References: <1526537830-22606-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 --- 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 Reviewed-by: Kees Cook 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