From patchwork Fri Feb 16 18:38:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 128618 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp867844ljc; Fri, 16 Feb 2018 10:45:54 -0800 (PST) X-Google-Smtp-Source: AH8x227u9qYz0xOxxeovtNqO4YNsQVI1BkgPyb213H5EV5qvzGfZvyEuTqqEzqsTeuZjLqhseMvY X-Received: by 10.98.238.2 with SMTP id e2mr7016021pfi.206.1518806754539; Fri, 16 Feb 2018 10:45:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518806754; cv=none; d=google.com; s=arc-20160816; b=Vbhe7rN02YzBUXpH209lWdjMmV0d73FUQ70uQiNSN8XEx25sTJYiEtb9J/CBQ7ioQF xm0QMk+JFNkq0M/ZuqbU+AXr0NFk+JnlNWaxn0kwy1FR0zp2uT4aq2Z2dlMwfuPh9FkM sUV8udyqO92fLwhjI2V4CQO0Qi0JLpYrBOrawyCcHYWRtxCHWU814LsxDrxdF35/Vkzm HVxZbNKaN7OnC1SvtgyWVEul64eOFxrMZxtX6fGgrdVuV8COlflTUEipRXN+2jTRMaX+ yy/wTxgb0MBf0TCMW98vDyUBbvGHHdrlbrnEOuK+pXkMZeBr6Aorw0w4Hh+5WqULY3g9 S41w== 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=TcwbpsyunP2zGuqv8JQctkwE0xC6/BHmB73ouAOs6XY=; b=MWqYwP0y7dWZLEqNslfw9tr+sv/Lo8P8UQgWIB1DCN3tkly1CnJa2f5fkzcNwUg720 bFNdIzdTn1jbIu2l+8YReCw3tRVawc5a1XmfQjOhdsElWIa+Gdy/II6GfoKaIGyoWRtL y1j9D6vFn4QocL8bFaEdAIRH0cQIIcPFc8t2D1uDzGzAyTWhcTESiQsir38a17//D2Ki qgWA9fr4nNuip++eOB7WecU9hHXa8thuW7vKNj0QurXSofetsAoQziU5njciAWgbFDhi E0sOVD5670osk/Iv6S43SB0/YV4NHmyEw3/w9hQlATYbMX6IadDSzUROIsRYseSSRZQ+ K2Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=lDEQnHgg; 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 16si1807107pge.448.2018.02.16.10.45.54; Fri, 16 Feb 2018 10:45:54 -0800 (PST) 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=lDEQnHgg; 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 S1753724AbeBPSpW (ORCPT + 28 others); Fri, 16 Feb 2018 13:45:22 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:57775 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbeBPSlT (ORCPT ); Fri, 16 Feb 2018 13:41:19 -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 w1GIdBT5013418; Sat, 17 Feb 2018 03:39:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w1GIdBT5013418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1518806354; bh=TcwbpsyunP2zGuqv8JQctkwE0xC6/BHmB73ouAOs6XY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lDEQnHggJBLUc1YBu+aKVBgIbTe3EvBypOFig7n9R3jw83O2HiD7ep6RekRmfNAnk X4cb2sTw/eqDZBtTO15kYAzenXm4A/fzZ/kJgUe7pbbOGlAX2XXZeRQ5KJKJ033ep3 bToYWtaY/GCFj/UbUgc5du7nYFmY5GSapuBIJym6xSYSCzW299QRQWM6ktHAUZIKW4 UZmxa8x9z6/ZZI9fRdBMeapfppR6FmJyDTHvj4i6/EMjzqVfAgiP+Gz91hgXhutDQS Kra2RN5A8wIO/Fl6fJuOkxDikOYSrOi854nT2TwhMTUsyVrBQM+F1meDpsvKsXILNu rvNa5ezaQFNgQ== 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 , linux-kernel@vger.kernel.org Subject: [PATCH 02/23] kbuild: remove CONFIG_CROSS_COMPILE support Date: Sat, 17 Feb 2018 03:38:30 +0900 Message-Id: <1518806331-7101-3-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-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 --- Makefile | 3 --- init/Kconfig | 9 --------- 2 files changed, 12 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index a27e6d8..94a957e 100644 --- a/Makefile +++ b/Makefile @@ -307,12 +307,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