From patchwork Fri Apr 13 05:06:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 133332 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp347236ljb; Thu, 12 Apr 2018 22:13:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+KVerK97LO79EmqOrIOoIADM+gIBQcj/zADhwN24sHKJ2pAZxu+cra1kyuQLrS9qEpqVTf X-Received: by 2002:a17:902:564:: with SMTP id 91-v6mr3855110plf.63.1523596384781; Thu, 12 Apr 2018 22:13:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523596384; cv=none; d=google.com; s=arc-20160816; b=zmVJPxcAoa4ElRtU7QOwfYUI8kxDe71AY7MK47h05KzvQAfL/3uprCoStbn03McPmI TFyv47BC361sqIBNVhU28qZznO7zjy/5aetvBp5arFaFqmTMHvnTxllUvFVg3ZPPd+9b B824bnCHmXJvz8CwvIJelHNz6v2JHj1aNBy2njLaT6nFqoFsNXz/bzskr+DqzEl9E2/h sJxVmiCA/UJMRI9YYxEG2PFc17LfOLmWX9+iFUtdaA0NaqOa3M5q2HLDqFA5BdhXw8gz 5XsZ7K1kFBSkZpEyLD7qP/WSU2OkjHUC1gfdyC2sbLwXsWOsKK9ghbXF4sHMS86AEZi7 K+wA== 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=VGTQ6LPltIOfbdazpfiHYV5ObDqEGuQ3Q0r7pUiBS/E=; b=lXe2N+iTpernW8S69wiwnH/pQYSliX46Jb1NV1yWoIZgl7Q+IwDINgK/v6cbK8y+Uw gF7iz3YbG/jvWOyppFhf8zyEmdv4Io2VUzIeD0vbWjktKNWUK9lyc2CTyTLS+BY7XEHC UzIkXeyZMlbVYMR8MQpcfy8wAr8KST/FT7dCZ2cHA5hvcKvJ9+z7BXj19/+wRouIIZU4 xMNR4+JLsEb98y/bF5lD4HRdBQx7ZHaP9O4QUtRLtfLV86l3yMCJQDtj1W8N7YRCMkrE Hub2waRTm9TA7zR72aLO3wPkv2vxcf1C5n/E9OAtftOgnPR/c95f+3b12CtPmQ8ce95a nClQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=1Y4z3Bby; 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 m3-v6si4876988pld.351.2018.04.12.22.13.04; Thu, 12 Apr 2018 22:13:04 -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=1Y4z3Bby; 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 S1753276AbeDMFMr (ORCPT + 29 others); Fri, 13 Apr 2018 01:12:47 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:54508 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbeDMFIQ (ORCPT ); Fri, 13 Apr 2018 01:08:16 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id w3D56lfv029209; Fri, 13 Apr 2018 14:06:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w3D56lfv029209 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1523596011; bh=VGTQ6LPltIOfbdazpfiHYV5ObDqEGuQ3Q0r7pUiBS/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1Y4z3BbyHFQ9+yar+cYrciO2l8uuw42sXxFkhdq5B+RcBQ1tvGjya7Iil9gQgoT7l t3mGdOOMQxdUTNUEcN0u9NYha8sPKvufD2eKVPvH5VKcx0hm6oIiVqTX3ipUW+FylC yj6j8/uIOWiLvngtuY8JjcgC4ndKuPg2qkb0K6eYL3geI64cvVjdEYNU6V1Yp6VUaK FEwtgLui+eilgtKIhom1nJ7zLO0XioDcXQLWyP66tElXZ/kQhFnzT+/o8HOsU8SC9s aQXKKZ60Ct1L9LyXQn2Do0Vmyd38/Et6ufSEGe3e/HYN78/nIUZUt3N90gwpdVZvSj bA9/QVX+WTupA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Linus Torvalds , Sam Ravnborg , Ulf Magnusson , Nicholas Piggin , Kees Cook , Emese Revfy , x86@kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 03/30] kbuild: remove CONFIG_CROSS_COMPILE support Date: Fri, 13 Apr 2018 14:06:12 +0900 Message-Id: <1523595999-27433-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523595999-27433-1-git-send-email-yamada.masahiro@socionext.com> References: <1523595999-27433-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 Kbuild provides a couple of ways to specify CROSS_COMPILE: [1] Command line [2] Environment [3] arch/*/Makefile (only some architectures) [4] CONFIG_CROSS_COMPILE [4] is problematic for the compiler capability tests in Kconfig. CONFIG_CROSS_COMPILE allows users to change the compiler prefix from 'make menuconfig', etc. It means, the compiler options would have to be all re-calculated everytime CONFIG_CROSS_COMPILE is changed. To avoid complexity and performance issues, I'd like to evaluate the shell commands statically, i.e. only parsing Kconfig files. I guess the majority is [1] or [2]. Currently, there are only 5 defconfig files that specify CONFIG_CROSS_COMPILE. arch/arm/configs/lpc18xx_defconfig arch/hexagon/configs/comet_defconfig arch/nds32/configs/defconfig arch/openrisc/configs/or1ksim_defconfig arch/openrisc/configs/simple_smp_defconfig Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook --- Changes in v3: None Changes in v2: None Makefile | 3 --- init/Kconfig | 9 --------- 2 files changed, 12 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index d85cee0..ca3e3e8 100644 --- a/Makefile +++ b/Makefile @@ -316,12 +316,9 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ # CROSS_COMPILE can be set on the command line # make CROSS_COMPILE=ia64-linux- # Alternatively CROSS_COMPILE can be set in the environment. -# A third alternative is to store a setting in .config so that plain -# "make" in the configured kernel build directory always uses that. # Default value for CROSS_COMPILE is not to prefix executables # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile ARCH ?= $(SUBARCH) -CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) # Architecture as present in compile.h UTS_MACHINE := $(ARCH) diff --git a/init/Kconfig b/init/Kconfig index 9d167a5..c1ca920 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -54,15 +54,6 @@ config INIT_ENV_ARG_LIMIT Maximum of each of the number of arguments and environment variables passed to init from the kernel command line. - -config CROSS_COMPILE - string "Cross-compiler tool prefix" - help - Same as running 'make CROSS_COMPILE=prefix-' but stored for - default make runs in this kernel build directory. You don't - need to set this unless you want the configured kernel build - directory to select the cross-compiler automatically. - config COMPILE_TEST bool "Compile also drivers which will not load" depends on !UML