From patchwork Mon May 28 09:21:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 137067 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2597416lji; Mon, 28 May 2018 02:31:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq35rCeYYGMMdlEKiRyvI2aMiZwsYAgOJsMkYq18GhF10FVmIFOB7+CrDvL8skoC60joyit X-Received: by 2002:a17:902:7896:: with SMTP id q22-v6mr13046833pll.243.1527499872878; Mon, 28 May 2018 02:31:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527499872; cv=none; d=google.com; s=arc-20160816; b=u0WPCv7OLr2x5DHpjlZ6w5qSLFXTHRAUxaIO4P1smExHv2XvKEJwVK0rwlZYVJ+Lc9 SVS5m0RC/lO/TgItdq3PWeR6wY8I3ZVwtWYgw/kEjQHm57SdgZgnR+sVGTJsBVIKH/bo iXC88DOMJ8DHrk6nisieC0dxs7zozpxfRDyDfH+xxbBRhpL360rtKTVAiUMKDYLbIccM DaDYVzJqE7gc84fvvWYjA2A9RPYzujo4gfSThOkWfyQt9RGoLabATfvBERAm3kXne95P EEICfl5hG9ZjAQ5k3kPYUbPn1OfDPSXpb31s5zRK4d0zTAQAxzXuB+6MvoBswAWn4Swc BpaA== 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=+mERXWOaTOmV7BBi3Br812M4paeN+QQdqw/nLvrJLJA=; b=Cpu/H+Jj0zfW5A8jfvseYwx4n9GHn3ED88/aK47uo2GyahhpNSMKGgVxT/a/9BCOcg Wa6Z6cV+Oi59u/IWUFgS9Ow2Hsa5AmHMizQpxlBEkHmKRMbwJdlJ+0GjWAT2HnBlCyd6 Nzm1pq/5l0fMegjPWqUEY/tUr9JqwmrgwBQ+nh5m49yyqbKQ3NpeDMBvGJaQoe0EEZyn zV6ftxM7phHBpfmGoJ6U0jy/AvsCM54Ea4ytTDTA/13oAhRtLo+DrpHYDcWisQiURMIu LZZ2wSTU0kFh6z9u1nHCPIXZfh30PBrAShG8jEJ4FLUxZqhkS8nkuUwRkRpxFwhSou7v DaWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zBFiC56o; 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 f2-v6si30732615pli.569.2018.05.28.02.31.12; Mon, 28 May 2018 02:31:12 -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=zBFiC56o; 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 S1754563AbeE1JbK (ORCPT + 30 others); Mon, 28 May 2018 05:31:10 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:21486 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754216AbeE1JYN (ORCPT ); Mon, 28 May 2018 05:24:13 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w4S9MInJ027506; Mon, 28 May 2018 18:22:20 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w4S9MInJ027506 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1527499341; bh=+mERXWOaTOmV7BBi3Br812M4paeN+QQdqw/nLvrJLJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zBFiC56ot9GXFpPYqu21vSQ2e1140t5x84vKwpxg0qG/wAmVnBL76p1UCYQ5dtDtN 4p8rkUuScN4fw8JSPiCUJTJuVm45XE3YwCrmoRmIP0rk9+kV11Nb0AsubEkEeg4rfn DXiVcrSQdtnHJ/NNSz5MJuKeYBUbfPfdeZDvYM1ug6VUBg7CyfDpygiO7l3LEeDxWq Nw01KH2kFkNK5crLz+Cp/TtC7VTmEVMecC5wu4k9jP04HbNnmP7IJH1jOfufDB4S3u wOX0yU6rfDyWjvr4+jvJV4UsLWhPVREt7VLThRvsudrT7N4rMRFieBocH0DEudsxCZ lZncN+m+FJxjg== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Kees Cook , Nicholas Piggin , "Luis R . Rodriguez" , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Linus Torvalds , Masahiro Yamada Subject: [PATCH v5 02/31] kbuild: remove CONFIG_CROSS_COMPILE support Date: Mon, 28 May 2018 18:21:39 +0900 Message-Id: <1527499328-13213-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527499328-13213-1-git-send-email-yamada.masahiro@socionext.com> References: <1527499328-13213-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 v5: None 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 02202d3..58afa07 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 18b151f..15aae32 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