From patchwork Tue Mar 27 05:29:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 132452 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp4655523ljb; Mon, 26 Mar 2018 22:35:18 -0700 (PDT) X-Google-Smtp-Source: AG47ELs83esfajf9kJ7DV5IOsUDwAMWeQslcQAlkNbT1j1aIOunnMSMag3xbnskpeVWPM9pfDbYt X-Received: by 2002:a17:902:534f:: with SMTP id b73-v6mr26837917pli.148.1522128918392; Mon, 26 Mar 2018 22:35:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522128918; cv=none; d=google.com; s=arc-20160816; b=MNHe4n7m+gPIhS+OLBqEleC3slk6wXnnNNqZhVDcFEV3BOIghUGcti6gOFYrIc6iaT PbEgkTWNuLK28EVL6o/FTN3BCifXhwjjAJSh0OAG7tsl4KB77kqnUvm8Gcd2p1MevYGY T/yJllLLQHkGDvvJ9+hPSGzRaUgvu7ZlB0BvVwt1i07MODL7KePvukXr/OSJp83gFPCi LbRvp3h+lPENY3TUniIRu6BKgjDBz6M46prfjRR2evgApX8D7hsRqDqCGFmH2BG2Yv38 Xz2dCDwHnEYK60bX+xVQZ6af4jZu8k5DDWzaPXzgt5F2nUp/lDsz2gy4XF0QVPxOjmcT GV7w== 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=RGk+aT9ZGpkRkDLDSt7yEl22MZ2hquI+ZQNQeH0HzbI=; b=S5ZHXuYum59l5SIQFHqfm0/4hP07QOx8dXFFIa6ZWmHd5x7ZWXsfNVWMdjDt9FsYps 5itVyW0WXVXupmoMEx4qVUR/wxpArb6DJ8mkJ/jeK/5kT3HXTZG2Byf30XPu3YzkgTbm tGVfHy26Is22wldaUMSyG9BQVtkd/TKXSZ53R1qMdOul0gjed3L6YopmQYs7JEJOVETK bdS+AXm0xQcDqhOecfAtM79rxYspOPsrh3zsnESgFSYBIBHQk5oHuRLbCD4BYSnNJGfM IjaoklvzPAhh7z2XUOHxX+yZX0Xeuh/NXp5LlZxOHjnhRnxKE+3uFqffTEaWqwjoevvO Cz0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=RICW6Nmi; 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 v2si335548pgo.639.2018.03.26.22.35.18; Mon, 26 Mar 2018 22:35:18 -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=RICW6Nmi; 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 S1752261AbeC0Fer (ORCPT + 28 others); Tue, 27 Mar 2018 01:34:47 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:44794 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752048AbeC0FcE (ORCPT ); Tue, 27 Mar 2018 01:32:04 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id w2R5TaLl011947; Tue, 27 Mar 2018 14:29:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w2R5TaLl011947 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1522128580; bh=RGk+aT9ZGpkRkDLDSt7yEl22MZ2hquI+ZQNQeH0HzbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RICW6Nmi235HitZUCPjAM8cBFpplUPBgtCAcqVV2tEks3yUksW6JOVF094Z+PRJko 3cIakIcJwlJJoVckmpYZUY9SbF/Iusm/mxLEYpUEQx4bAn1IReltIuG+lFaU7FXVwt UQYnECXlIXbNnH58QRCimo+fE0O03YzSEceH10ifUh6XEQmwMn98gLmBFQVBZW6r4h GseyWSiJViEnQFbMHUxz2+SQX3sAlk2k8ZhVloHMitsTuOr+qZc4cY2HVM39cPwsv5 pOFUiR4KnbPjCN2NZGJXWzBQ5YktXv8OyxwOPr/vhU2O4ggob2EYQnUxHOiNuvFJ2z RxEzDCQLFKMDQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Linus Torvalds , Arnd Bergmann , Ulf Magnusson , Kees Cook , Thomas Gleixner , Greg Kroah-Hartman , Randy Dunlap , "Luis R . Rodriguez" , Nicolas Pitre , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 02/21] kbuild: remove CONFIG_CROSS_COMPILE support Date: Tue, 27 Mar 2018 14:29:16 +0900 Message-Id: <1522128575-5326-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522128575-5326-1-git-send-email-yamada.masahiro@socionext.com> References: <1522128575-5326-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 4 defconfig files that specify CONFIG_CROSS_COMPILE. arch/arm/configs/lpc18xx_defconfig arch/hexagon/configs/comet_defconfig arch/openrisc/configs/or1ksim_defconfig arch/openrisc/configs/simple_smp_defconfig Signed-off-by: Masahiro Yamada --- Changes in v2: None Makefile | 3 --- init/Kconfig | 9 --------- 2 files changed, 12 deletions(-) -- 2.7.4 Reviewed-by: Kees Cook diff --git a/Makefile b/Makefile index c55cf95..5c395ed 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 e37f4b2..df18492 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