From patchwork Thu Jan 10 21:15:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1023228 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43bJgN3H2jz9s7h for ; Fri, 11 Jan 2019 08:15:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id F14F787B94; Thu, 10 Jan 2019 21:15:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NMsllMOO2m5D; Thu, 10 Jan 2019 21:15:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 504DF87B97; Thu, 10 Jan 2019 21:15:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 3AC4C1BF3E0 for ; Thu, 10 Jan 2019 21:15:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 383AC86130 for ; Thu, 10 Jan 2019 21:15:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r7Noszt99VXx for ; Thu, 10 Jan 2019 21:15:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by fraxinus.osuosl.org (Postfix) with ESMTP id 07B9C860CF for ; Thu, 10 Jan 2019 21:15:17 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id DD57920A06; Thu, 10 Jan 2019 22:15:15 +0100 (CET) Received: from localhost (lfbn-tou-1-411-96.w86-206.abo.wanadoo.fr [86.206.237.96]) by mail.bootlin.com (Postfix) with ESMTPSA id ACFD6206DC; Thu, 10 Jan 2019 22:15:05 +0100 (CET) From: Thomas Petazzoni To: buildroot@buildroot.org Date: Thu, 10 Jan 2019 22:15:00 +0100 Message-Id: <20190110211500.14368-4-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190110211500.14368-1-thomas.petazzoni@bootlin.com> References: <20190110211500.14368-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/3] linux: use HOSTCC_NOCCACHE as kconfig HOSTCC X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" linux is a bit different than other kconfig-package, because it has "toolchain" in KCONFIG_DEPENDENCIES. Thanks to this, host-ccache *is* ready by the time kconfig invocations are made, so we could use $(HOSTCC) as the host compiler for kconfig related operations. However, for consistency with other kconfig-package packages, we chose to use $(HOSTCC_NOCCACHE) as well. We cannot rely on the default value of HOSTCC passed by the kconfig-package infrastructure, because $(LINUX_MAKE_FLAGS) also contains a HOSTCC definition that would override the one passed by the kconfig-package infrastructure. Signed-off-by: Thomas Petazzoni Acked-by: "Yann E. MORIN" --- linux/linux.mk | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/linux/linux.mk b/linux/linux.mk index 6bf2b88038..02def89113 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -269,13 +269,16 @@ endif LINUX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES)) LINUX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig -# LINUX_MAKE_FLAGS overrides HOSTCC to allow the kernel build to find our -# host-openssl and host-libelf. However, this triggers a bug in the kconfig -# build script that causes it to build with /usr/include/ncurses.h (which is -# typically wchar) but link with $(HOST_DIR)/lib/libncurses.so (which is not). -# We don't actually need any host-package for kconfig, so remove the HOSTCC -# override again. -LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS) HOSTCC="$(HOSTCC)" +# LINUX_MAKE_FLAGS overrides HOSTCC to allow the kernel build to find +# our host-openssl and host-libelf. However, this triggers a bug in +# the kconfig build script that causes it to build with +# /usr/include/ncurses.h (which is typically wchar) but link with +# $(HOST_DIR)/lib/libncurses.so (which is not). We don't actually +# need any host-package for kconfig, so remove the HOSTCC override +# again. In addition, even though linux depends on the toolchain and +# therefore host-ccache would be ready, we use HOSTCC_NOCCACHE for +# consistency with other kconfig packages. +LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS) HOSTCC="$(HOSTCC_NOCCACHE)" # If no package has yet set it, set it from the Kconfig option LINUX_NEEDS_MODULES ?= $(BR2_LINUX_NEEDS_MODULES)