From patchwork Mon Jun 19 07:28:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 105800 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp752196qgd; Mon, 19 Jun 2017 00:31:08 -0700 (PDT) X-Received: by 10.84.229.70 with SMTP id d6mr27705025pln.263.1497857468050; Mon, 19 Jun 2017 00:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497857468; cv=none; d=google.com; s=arc-20160816; b=LRtu7KIXetIuyMZQZBhnxYMZZgxbCRRqpU+I5si87TackZ5QyXBXRVOWRlXvVjWQSK ss5kihsoS3pmOwy5k2t1RIoucJq7admFBd7w1/0Jkdubmi0nTJZde7mgxSrDnGHa+7Jp 8DfKl6uDMaRVCrjYdLXmxEePyO22yhbHcoH5G9k+mKUNfvOwCPzc8ogPkxUxRTBqkLll GedRVVb3HHP1Xf6OHQZhY+7XWU5F8qHsLCz0lveKQyLcnJaSPUDB3QBphSD1+KfAUbMp A2FmkzFeSPMnLWQEqLjN1d4wPkRdxw4BhcKIuC2Gn5UAnS6Z9bTged0f3RVxSkObE8iH y4xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=BHQ9J5usSa5BsASSUEFRUFWbIZ8/Qu6z0SqTiKar3+8=; b=MLewrhGQtcPy3jbwrcQsvzS0fZ2ixd8gv9rJJLcb//P5LVnvKp/KlSd1yUIC/rsiEl l9WA58TrKjyHBPxCWpSmfGtWq/MkJoi7mW5Tq6HjeZHhZO/zPY5lOBqkineQ99W7C0Pr /Vom4HsvFJupKzCLr0A6akk3hVWmKd9tsu/QIJGOdkq3Hziic6CDb+j7tb5lcv2zjW/v +D8RU0TE6qfnjKcV/eRWlgh2+h2sPRN+2WTTPAIktxvz1oL2EBVrDfqdg7pWlx9IGUFW kE5bGC1sXvLD8A+1L24a+D/t24v4To1/FIry6y+zxMeglj9/9asCOPZeH2HxivlClluM ncUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.b=d/bBo/MI; 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 z3si7277993pfl.319.2017.06.19.00.31.07; Mon, 19 Jun 2017 00:31:08 -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.b=d/bBo/MI; 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 S1753937AbdFSHbC (ORCPT + 25 others); Mon, 19 Jun 2017 03:31:02 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:21522 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751166AbdFSHbA (ORCPT ); Mon, 19 Jun 2017 03:31:00 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id v5J7Si7u019748; Mon, 19 Jun 2017 16:28:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com v5J7Si7u019748 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1497857325; bh=BHQ9J5usSa5BsASSUEFRUFWbIZ8/Qu6z0SqTiKar3+8=; h=From:To:Cc:Subject:Date:From; b=d/bBo/MIWuNxW1LR9hNaZz7r6ibHZrI6U+F3iOaipklXqVymyVKm1PoVFHcs9Ms1G Mxqqfgbs9k8vhEVMfQUhF3+lRG+ICqw5kkSSgMauTNwEPMsn5UWjB/HjdnLKqD37Y/ ZsYCxqF52QDsib5+8ZuGp74WwWtZJGyVmceIiEqMR+3XUnk8p8pugNW9VsHXTJJNMX 8Suc2KH86w/0UeXPwCORrCwVAvx7Y/2EQkl3acG+OsQOxxObrNpE0kMNIjMXZsDin0 Lfp0KoknbbgsNb67zxAZPfwdSYhLVXNbDlnxdiWb9iIikfWTWApoZtDh8/GJF3oyD1 ZTl5ZiHCadELg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Matthias Kaehlcke , Marcin Nowakowski , Arnd Bergmann , Mark Charlebois , Kees Cook , Michal Marek , linux-kernel@vger.kernel.org, x86@kernel.org, "H. Peter Anvin" , Jonathan Corbet , Thomas Gleixner , linux-doc@vger.kernel.org, Josh Poimboeuf , Ingo Molnar , Emese Revfy Subject: [PATCH] kbuild: deprecate cc-option-align Date: Mon, 19 Jun 2017 16:28:22 +0900 Message-Id: <1497857303-15936-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Documentation/kbuild/makefiles.txt says the change for align options occurred at GCC 3.0, and Documentation/process/changes.rst says the minimal supported GCC version is 3.2, so it should be safe to hard-code -falign* options. Fix the only user arch/x86/Makefile_32.cpu and deprecate the cc-option-align. Signed-off-by: Masahiro Yamada --- x86 maintainers, If this patch looks OK, could you give me Acked-by? Documentation/kbuild/makefiles.txt | 16 ---------------- arch/x86/Makefile_32.cpu | 7 +++---- scripts/Kbuild.include | 5 ----- 3 files changed, 3 insertions(+), 25 deletions(-) -- 2.7.4 diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 1c49e87cea4f..247fb331c4b2 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -486,22 +486,6 @@ more details, with real examples. respectively. Note: cc-option-yn uses KBUILD_CFLAGS for $(CC) options - cc-option-align - gcc versions >= 3.0 changed the type of options used to specify - alignment of functions, loops etc. $(cc-option-align), when used - as prefix to the align options, will select the right prefix: - gcc < 3.00 - cc-option-align = -malign - gcc >= 3.00 - cc-option-align = -falign - - Example: - KBUILD_CFLAGS += $(cc-option-align)-functions=4 - - In the above example, the option -falign-functions=4 is used for - gcc >= 3.00. For gcc < 3.00, -malign-functions=4 is used. - Note: cc-option-align uses KBUILD_CFLAGS for $(CC) options - cc-disable-warning cc-disable-warning checks if gcc supports a given warning and returns the commandline switch to disable it. This special function is needed, diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu index a45eb15b7cf2..f3717d36718a 100644 --- a/arch/x86/Makefile_32.cpu +++ b/arch/x86/Makefile_32.cpu @@ -9,7 +9,6 @@ else tune = $(call cc-option,-mcpu=$(1),$(2)) endif -align := $(cc-option-align) cflags-$(CONFIG_M486) += -march=i486 cflags-$(CONFIG_M586) += -march=i586 cflags-$(CONFIG_M586TSC) += -march=i586 @@ -24,11 +23,11 @@ cflags-$(CONFIG_MK6) += -march=k6 # They make zero difference whatsosever to performance at this time. cflags-$(CONFIG_MK7) += -march=athlon cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon) -cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 -cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 +cflags-$(CONFIG_MCRUSOE) += -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 +cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) -falign-functions=0 -falign-jumps=0 -falign-loops=0 cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586) cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586) -cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 +cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) -falign-functions=0 -falign-jumps=0 -falign-loops=0 cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686) cflags-$(CONFIG_MVIAC7) += -march=i686 cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 5001bf9b6579..9a7697d17fb5 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -133,11 +133,6 @@ hostcc-option = $(call __cc-option, $(HOSTCC),\ cc-option-yn = $(call try-run,\ $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) -# cc-option-align -# Prefix align with either -falign or -malign -cc-option-align = $(subst -functions=0,,\ - $(call cc-option,-falign-functions=0,-malign-functions=0)) - # cc-disable-warning # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) cc-disable-warning = $(call try-run,\