From patchwork Thu May 17 06:16:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 136086 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1877081lji; Wed, 16 May 2018 23:18:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrYyKSwc2dNSnq9JskunZCsSj84Ghuh9Ud91/MPK2UdRC5NhP10FKwS3xV8AVcVQ0X/akWv X-Received: by 2002:a63:41c4:: with SMTP id o187-v6mr3042862pga.7.1526537936048; Wed, 16 May 2018 23:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526537936; cv=none; d=google.com; s=arc-20160816; b=vYFSizlHusmuTW30FA5QK794k0FpfDEtw3wEl2bkVWIOa2nZNQWqjwMUY9SQ7Q6ThJ /wNEQBk5XvvNiWBdDvDB1G55N1NkVzUJTrzu3fParENRQPL1hng1ss+DV6AbGYFIiOde znuos1zPcyFUP6G/GV7IzAZ3kqGfCAsxAOcl6tXjZgfIjlZk0FPkku6peE9U9lou2NrL k6VOWpifTSswnXQYT30jRYksiCdFom6YjBLX9lZ6GR/2K598ut75DFOK+sXUxbsjLIbv 05JcTZOt0XBPTNmzyCSvNfHSuJPm0z5lQZxBWgD7ieuybKXOrei062flo+6p/tBr21EX NV2A== 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=aSQS3FUJ5e9EiNCD8cynkA8thqQ6GIhoa7wXOMABLyU=; b=sQy7izNblKoIRvBDyBnhT+vr6GDi9y1ZaMrXFCX9RGSI4FEclOplnsCPmHZQJNorbq 9t4VLVUOx8t6iqCnYRupf4vuf4Q+87w6ZjKJB3W4z3FtRYUJ3mRPbeGa1Qx17B3SHsKP 6J6yqssYzFDf3kSOs4ZlgzcM0j4gW9YCV6FAYi/6EF2BW+UZEQ4U/hxYQQQTKIQMAvWb 9kCJxfLV24OUhBYwlPrNjqO1sTj534VgVXx2QdHRpZ+p/B3U2LZIoopHIJDJ9QI+hhAl QInoo7OFrbCqvg6ECpBETZ9idc7ABuG6vbW4cVc8Lfg/2cjqiBBBqxPCmVLM/PDIc+D0 Y6YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=sq5USuqo; 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 l63-v6si4243754plb.49.2018.05.16.23.18.55; Wed, 16 May 2018 23:18:56 -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=sq5USuqo; 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 S1751664AbeEQGSx (ORCPT + 29 others); Thu, 17 May 2018 02:18:53 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:24132 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbeEQGSu (ORCPT ); Thu, 17 May 2018 02:18:50 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w4H6HbU0002841; Thu, 17 May 2018 15:17:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w4H6HbU0002841 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1526537860; bh=aSQS3FUJ5e9EiNCD8cynkA8thqQ6GIhoa7wXOMABLyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sq5USuqomOD497a1nNm2pZIPl3t1VK1mHZUTJT8GoaZz6ctG2PAAsTXrMLMW3vN57 3IvX1w5fYhTal9suKCG4Y6MKZhjCOLrnj3131/aqNqoclTDg8DTtr/56XYc2bQ213U xljVFR9z1Awrkcy8PSGU0JtDHYJQcEgyMsmPRW3JvPvhvN8daC1FKd/pZDjPL2FPKW VTt5BtAMuDyTyTALSlsmKczLCQNUvRhYb3f7QwqDDFnxBO00BCVdL4ag1yy9dkXh55 NC7Q963oH8j76A3I1YFnlmeZRXptOqbfY35OXLLawLXgg1HgdUCxXFlVXmXri8NVTV cwdQGPyh+z7dw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Linus Torvalds , Sam Ravnborg , Ulf Magnusson , "Luis R . Rodriguez" , linux-kernel@vger.kernel.org, Nicholas Piggin , Kees Cook , Emese Revfy , x86@kernel.org, Masahiro Yamada Subject: [PATCH v4 02/31] kbuild: remove CONFIG_CROSS_COMPILE support Date: Thu, 17 May 2018 15:16:41 +0900 Message-Id: <1526537830-22606-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526537830-22606-1-git-send-email-yamada.masahiro@socionext.com> References: <1526537830-22606-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 v4: None 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 e78f73f..01b2211 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 f013afc..4537962 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