From patchwork Thu May 17 12:39:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 915408 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind-be.20150623.gappssmtp.com header.i=@mind-be.20150623.gappssmtp.com header.b="ODMT/gqh"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40mrTy1t6gz9s1B for ; Thu, 17 May 2018 22:39:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 42D0E872FF; Thu, 17 May 2018 12:39:30 +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 mPV9TuW9GGMU; Thu, 17 May 2018 12:39:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7714F870C4; Thu, 17 May 2018 12:39:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 095051C1594 for ; Thu, 17 May 2018 12:39:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 065E3841B3 for ; Thu, 17 May 2018 12:39:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T05OMQwn3qmd for ; Thu, 17 May 2018 12:39:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id 539B184108 for ; Thu, 17 May 2018 12:39:25 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id l1-v6so8845431wmb.2 for ; Thu, 17 May 2018 05:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind-be.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=E2q4PzLUwZWHFVeMOEr4D6DAbH8Ruji6e4V23KXKuJQ=; b=ODMT/gqhz5Jrnc5ZO1tH+PXjdjquMBP/FROz2sjo0X9iXQZNSqS4cYdP8Rs7Upx9nY 7aOQsnnpOypywVjImMpaKv+X9BYV2upi/ztng5bM8e+bWRS/GcoyYr2C4SVDwrEgPyNl yGl3Ps6JyJq4NhR8Npv35CjS09Uq6V4IU4lytnq3XOn7eBtN8bI5MdkGy4EsRpEsC6pZ hKynnoZr0Jhyj2taSHixWT+8PE42aOGv+qpVmyrHDp8K17mUQ/nSZV6MFVm1SUWScLYC BNJ0jmx3fir5zZjFA4KLfQZexfZWOm7BSMlHoFXsu2LhcLaMIz8tGCZX9DPCsy3hCdmL x1ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=E2q4PzLUwZWHFVeMOEr4D6DAbH8Ruji6e4V23KXKuJQ=; b=FYqGYZSBduaXGIPyTlNJ1iWL29Y41DWIXCG16RmvI0I+28R5tyv2RXP6kHySNm0pRe vQLCCT3aYMQ9AvZ36TVD8Jza5XMmQ+OZ/NsqsqQASAa7fu7sFcqH99TGBjm5eGItlu3y tcFjHT/Iykvw8lEUG9f1MZv6WMHU1N8VPwrNYHTQwqV/d4K++vjR/UaWFirngG1R9vWv I7nuJ1IAS5UJ3bCVCcCxTOD7qLaqFgWs1VhrX4t1QqV/QIaH5y3+XnsrRUNAUJNfGFWJ f9eifHVy1dP3SPnWS5JKvjImlAzbMpFkuRKcBt3iwDKurCv9UhJQLxi1aTeFYSXN0Nle 1a+A== X-Gm-Message-State: ALKqPwdefExGwdvmsCF7H6upQzQ8YnKg8W8VDpV0/lTjPqsVUtGRV8Gv pm1QaZMgTn8DMsbXgq3SvChGDyimGRU= X-Google-Smtp-Source: AB8JxZrkK86+FtKaCeMrnIyOQtRlyBoXWWKhAZmYboorGShtC7uCSpGFYKOZSoVh61wrLV9Jimosig== X-Received: by 2002:a50:aefc:: with SMTP id f57-v6mr6788119edd.72.1526560763300; Thu, 17 May 2018 05:39:23 -0700 (PDT) Received: from vandecaa-laptop.local.ess-mail.com (ip-188-118-3-185.reverse.destiny.be. [188.118.3.185]) by smtp.gmail.com with ESMTPSA id b7-v6sm2553715eda.18.2018.05.17.05.39.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 05:39:22 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Thu, 17 May 2018 14:39:21 +0200 Message-Id: <20180517123921.16086-1-arnout@mind.be> X-Mailer: git-send-email 2.17.0 Subject: [Buildroot] [PATCH] linux: don't override HOSTCC for kconfig X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E . MORIN" , David De Grave , Scott Fan MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Kconfig uses either pkg-config or hard-coded /usr/include paths to find the ncurses or ncursesw library. If ncursesw is found, it will include . Since Buildroot's host-ncurses doesn't install a .pc file, and linux.mk anyway doesn't pass the pkg-config options to find the host pkg-config files, Kconfig will always find the system's ncursesw.h. However, since commit dde090c299 (linux: fix passing of host CFLAGS and LDFLAGS) HOST_LDFLAGS is passed to the linux build system. Thus, if host-ncurses was already built before 'make linux-menuconfig' is called, the build will pick up libncurses from the host directory, which is NOT widechar. Thus, two different ncurses configurations are mixed into the final mconf program. This will result in serious breakage in the rendering of the menus (lots of @ and question mark characters). As a workaround (suggested by Yann), don't pass HOST_CFLAGS and HOST_LDFLAGS when running kconfig commands. For kconfig, we should never need host packages anyway. This way, the kconfig calls will always use the system's ncurses and never our host-ncurses. Note that the same problem could pop up for other kconfig packages as well if we ever pass HOST_CFLAGS/HOST_LDFLAGS to them. We could force HOSTCC=$(HOSTCC) directly in kconfig-package. However, for now there are no other packages that exhibit this problem, so this can be revisited when they do. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Cc: David De Grave Cc: Scott Fan Cc: Yann E. MORIN Tested-by: Matt Weber --- v3: override LINUX_KCONFIG_OPTS instead of building host-ncurses with wchar --- linux/linux.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linux/linux.mk b/linux/linux.mk index b6b91391b6..6b5f5344ed 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -235,7 +235,14 @@ LINUX_KCONFIG_FILE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)) endif LINUX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES)) LINUX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig -LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS) + +# 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)" # If no package has yet set it, set it from the Kconfig option LINUX_NEEDS_MODULES ?= $(BR2_LINUX_NEEDS_MODULES)