From patchwork Fri Feb 16 18:38:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10225399 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 C4956601E7 for ; Fri, 16 Feb 2018 18:44:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B22662966B for ; Fri, 16 Feb 2018 18:44:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A42712966D; Fri, 16 Feb 2018 18:44:32 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 1EBB52966B for ; Fri, 16 Feb 2018 18:44:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752923AbeBPSlr (ORCPT ); Fri, 16 Feb 2018 13:41:47 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:57824 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752719AbeBPSlU (ORCPT ); Fri, 16 Feb 2018 13:41:20 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-07.nifty.com with ESMTP id w1GIdBTL013418; Sat, 17 Feb 2018 03:39:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w1GIdBTL013418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1518806370; bh=5E3V+lniGkXthizHMXYirjjRQ8c47R+TtsbPm2hC14Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oJRN23ux3B0UQd2L3uUo5l471O4o0PGGEd/jSN8TZr9AYmboOsaPxOGtAahLq/C1i 4hiVj3VfBNrBW+7U4fUk1RNiplWjFs94BeRh4I6sEIR8y1+iAS2JwD7wdt0A8fooye 4EqMB1wbdE0mmm8H0j/4ct1a//RAIKFbvVsGe0pbio7kghfAK6G23vjKsROVhSF67N G9f96uCdFb7Bo/622KHfDs+TMJCKlCIaSSTFaEdPxd2jNUhBRAMgeDfltejp9KrulY +r2d8eoNb28Tz4Y8GocuvxQ4oU6/Hk1hVoXK7HsxwIhaXF6xtTJVLveFKRN+ovmprg 5NiX/LVkV9Ibg== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org, Linus Torvalds Cc: Greg Kroah-Hartman , Arnd Bergmann , Kees Cook , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Michal Marek , Masahiro Yamada , Peter Oberparleiter , linux-kernel@vger.kernel.org Subject: [PATCH 18/23] gcov: remove CONFIG_GCOV_FORMAT_AUTODETECT Date: Sat, 17 Feb 2018 03:38:46 +0900 Message-Id: <1518806331-7101-19-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> References: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.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 CONFIG_GCOV_FORMAT_AUTODETECT compiles either gcc_3_4.c or gcc_4_7.c according to your GCC version. We can achieve the equivalent behavior by setting reasonable default in the 'choice' with the knowledge of the compiler version. Users are still allowed to change it if they need to do so. Signed-off-by: Masahiro Yamada --- kernel/gcov/Kconfig | 18 ++++++------------ kernel/gcov/Makefile | 2 -- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index 1276aab..c56bee7 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig @@ -53,20 +53,14 @@ config GCOV_PROFILE_ALL choice prompt "Specify GCOV format" depends on GCOV_KERNEL - default GCOV_FORMAT_AUTODETECT + default GCOV_FORMAT_3_4 if CC_IS_GCC && GCC_VERSION < 40700 + default GCOV_FORMAT_4_7 ---help--- - The gcov format is usually determined by the GCC version, but there are + The gcov format is usually determined by the GCC version, and the + default is chosen according to your GCC version. However, there are exceptions where format changes are integrated in lower-version GCCs. - In such a case use this option to adjust the format used in the kernel - accordingly. - - If unsure, choose "Autodetect". - -config GCOV_FORMAT_AUTODETECT - bool "Autodetect" - ---help--- - Select this option to use the format that corresponds to your GCC - version. + In such a case, change this option to adjust the format used in the + kernel accordingly. config GCOV_FORMAT_3_4 bool "GCC 3.4 format" diff --git a/kernel/gcov/Makefile b/kernel/gcov/Makefile index c6c50e5..ff06d64 100644 --- a/kernel/gcov/Makefile +++ b/kernel/gcov/Makefile @@ -4,5 +4,3 @@ ccflags-y := -DSRCTREE='"$(srctree)"' -DOBJTREE='"$(objtree)"' obj-y := base.o fs.o obj-$(CONFIG_GCOV_FORMAT_3_4) += gcc_3_4.o obj-$(CONFIG_GCOV_FORMAT_4_7) += gcc_4_7.o -obj-$(CONFIG_GCOV_FORMAT_AUTODETECT) += $(call cc-ifversion, -lt, 0407, \ - gcc_3_4.o, gcc_4_7.o)