From patchwork Thu Aug 18 23:39:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 660594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3sFjHp3Flrz9t2H for ; Fri, 19 Aug 2016 09:39:49 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=faB5in3C; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 963EE86EDE; Thu, 18 Aug 2016 23:39:47 +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 SVbex_W4K3jh; Thu, 18 Aug 2016 23:39:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D562186D98; Thu, 18 Aug 2016 23:39:45 +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 0B5AE1C2CFE for ; Thu, 18 Aug 2016 23:39:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 088E988E2B for ; Thu, 18 Aug 2016 23:39:44 +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 y0LPrn19n5av for ; Thu, 18 Aug 2016 23:39:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id C9EB98BFFD for ; Thu, 18 Aug 2016 23:39:42 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id i5so1419068wmg.2 for ; Thu, 18 Aug 2016 16:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=KLBr79O56MbReJaJUwLDVYyZTgvons/2gJLGR/d+084=; b=faB5in3C4zDUFI8WC+hKljwBRR9qgtOSPADgB0jPbPrtiHyB5QbR0jGjFR5ewBxH/x I591NL8oKygyO3/GT9GI7Q1sW+/JJGuU8BgRl4fJEnlOHGkoYxWmkSl/pdRbdireJ7Oh 3L6iwWEL/yjCQqJqDoizmdJrZshP1WRlTTPfjQ6zByL7/AM+GyxYfNAx6nRpWGk3QtMT Q7DaS1sJ6YV7c8nTQ2k76KlwkVNlOGyEG3FTE7iV9U1M2CH0luDzLZa7164lEfQp32UY sA3ywn7Hv+Ps9LySbHANKP8D0lVjrWfj7Pk7Y+uDgRnTkMSR/b3D5tX1wVYo3YPLBSVO q3KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=KLBr79O56MbReJaJUwLDVYyZTgvons/2gJLGR/d+084=; b=EJ+AYin9lz8qqt5mrYcHjeHSzlvEzkE443wTJqavJYMiO7fwFy55VfR+bBOf/uO02/ gn4qnt5BMhhuQqeIY3uX635GCXkaAFqWayXxw8jW49PbQMdmRjc4f4OpTQiuHpvxeUbZ gqLjEHOKuUBkaJIN05FtH1eA5GIdahIBMjXL/WFfeAs+sr1/1DyIRiJQnkugOhSuEDrP qFiGQeyFDxGjvCmfRMCNjQJ1KvFqiYCC8L4KFIeftumqaL9AKITPCMFNSED+KsTtfF4G A9LoSz+R6a97RfLIY7dOSZ989Vc4C1IZXNf6RdiG+tUNEwgJxv+hy4dWdjEEQhwBh7MT t46A== X-Gm-Message-State: AEkoousmraU6e0OyooBWIOZD+JaDGRXBjhm2ppt4n9tEzYroDsDaPnjpIJbwNPOAhR829Q== X-Received: by 10.28.56.3 with SMTP id f3mr1341890wma.59.1471563581278; Thu, 18 Aug 2016 16:39:41 -0700 (PDT) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id i1sm4377599wjl.9.2016.08.18.16.39.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Aug 2016 16:39:40 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Fri, 19 Aug 2016 01:39:36 +0200 Message-Id: <1471563576-13415-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 2.7.4 Cc: Joergen Pihlflyckt , "Yann E. MORIN" Subject: [Buildroot] [PATCH] linux: cpupower needs gettexto X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The cpupower linux tool needs gettext, always (even without locales). We need to disable NLS, otherwise it tries to compile the .po files. We also need to pass -lintl, otherwise it forgets to link with it (because, the world is glibc-only, you did not know? And glibc does not need we link with -lintl, so why would we? Oh, yes, we also reinvented our super intelligent one-off Makefile rather than use one of the standard buildsystems). Fixes #9181: CC utils/helpers/sysfs.o In file included from utils/helpers/amd.c:9:0: ./utils/helpers/helpers.h:13:21: fatal error: libintl.h: No such file or directory #include ^ Without NLS=false (yes, we could depend on host-gettext): MSGFMT po/de.gmo make[3]: msgfmt: Command not found Without LDFLAGS=-lintl: CC cpupower ./utils/cpupower.o: In function `main': cpupower.c:(.text.startup+0x1a4): undefined reference to `libintl_textdomain' ./utils/idle_monitor/cpupower-monitor.o: In function `list_monitors': cpupower-monitor.c:(.text+0x5dc): undefined reference to `libintl_gettext' ./utils/cpupower-set.o: In function `cmd_set': cpupower-set.c:(.text+0x38): undefined reference to `libintl_textdomain' ./utils/cpupower-info.o: In function `cmd_info': cpupower-info.c:(.text+0x20): undefined reference to `libintl_textdomain' collect2: error: ld returned 1 exit status Reported-by: Joergen Pihlflyckt Signed-off-by: "Yann E. MORIN" Cc: Joergen Pihlflyckt --- linux/Config.tools.in | 6 ++++++ linux/linux-tool-cpupower.mk | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/linux/Config.tools.in b/linux/Config.tools.in index 09bcfab..5ada98d 100644 --- a/linux/Config.tools.in +++ b/linux/Config.tools.in @@ -3,11 +3,17 @@ menu "Linux Kernel Tools" config BR2_LINUX_KERNEL_TOOL_CPUPOWER bool "cpupower" depends on !BR2_bfin # pciutils + depends on BR2_USE_WCHAR || !BR2_NEEDS_GETTEXT # gettext select BR2_PACKAGE_PCIUTILS + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT help cpupower is a collection of tools to examine and tune power saving related features of your processor. +comment "cpupower needs a toolchain w/ wchar" + depends on !BR2_bfin + depends on !BR2_USE_WCHAR && BR2_NEEDS_GETTEXT + config BR2_LINUX_KERNEL_TOOL_PERF bool "perf" help diff --git a/linux/linux-tool-cpupower.mk b/linux/linux-tool-cpupower.mk index 4551cda..16b2860 100644 --- a/linux/linux-tool-cpupower.mk +++ b/linux/linux-tool-cpupower.mk @@ -6,10 +6,12 @@ LINUX_TOOLS += cpupower -CPUPOWER_DEPENDENCIES = pciutils +CPUPOWER_DEPENDENCIES = pciutils $(if $(BR2_NEEDS_GETTEXT),gettext) CPUPOWER_MAKE_OPTS = CROSS=$(TARGET_CROSS) \ CPUFREQ_BENCH=false \ + NLS=false \ + LDFLAGS=-lintl \ DEBUG=false define CPUPOWER_BUILD_CMDS