Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2145680imm; Mon, 28 May 2018 02:33:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq540gyXkDAOmJYNcPt/AQp4p7hQPHOqstI0vnKjo41y7tsc0XzCIAb0xeTvKdvb6HakckS X-Received: by 2002:a65:4003:: with SMTP id f3-v6mr10137630pgp.130.1527499985131; Mon, 28 May 2018 02:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527499985; cv=none; d=google.com; s=arc-20160816; b=I/ns3Jj6SYPtlN3SdNIfylM1RKHKub35fPJqvj60VEOSGOktXY159qMAZyi+VqbJIB EYUwN/R3nwMcR03Qv/e/J7dPO/CEP0iIivbMniY+7/oTaGz7Ei+1MSpYWEXWxbV8Dj6N lY21ed1rB/HUAMy1ivW5W1g7mnJjIWOMdAxsaWPSr8amyIFxf75z68XL1FDVylDcqUUt HT4DlybXmv6TzGN1GuLAVCJmXqq4xqdMoy6gcn1xon02p7Cqvlpg0At3C2xz2mRb0WB/ HZeNXJiipYYbgRsXuuVMyJDYyd4+atJzuhz3F5j4XIAL9eFk25GmMD69uuAyvGqvrH6Z y8iw== 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 y190-v6si3231456pgd.532.2018.05.28.02.32.50; Mon, 28 May 2018 02:33:05 -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 S1754553AbeE1JbJ (ORCPT + 99 others); Mon, 28 May 2018 05:31:09 -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(-) 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 -- 2.7.4