From patchwork Wed Feb 18 02:18:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 5842451 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 404B19F37F for ; Wed, 18 Feb 2015 02:20:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 471542015E for ; Wed, 18 Feb 2015 02:20:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F0ED20149 for ; Wed, 18 Feb 2015 02:20:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753055AbbBRCUf (ORCPT ); Tue, 17 Feb 2015 21:20:35 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:42100 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752351AbbBRCTf (ORCPT ); Tue, 17 Feb 2015 21:19:35 -0500 Received: by padhz1 with SMTP id hz1so10882290pad.9; Tue, 17 Feb 2015 18:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PrpjQqT4EtwiVtVFWs8VuC0ScXK2F6dp70Zn7xLyGhU=; b=TcEdOnotPI4uyodWcc5lNd9g8l1kQRsIEgzCdYO4Qp1kDDByR1RFFkWPofsMg6v/ve sU5Os5Rf1GQDX4Mf+r7sRtnee4fjfzW8z6zHymsPCJMOogtzRq3bITHZ0q3iKworlE4a azbpLP9j81bNAJjV/ej/7zztmCB8xCuCIWpqfu5iXIYQ+dUiqe5E1qOGAICGwIAxcMxz BGFlJKxJimr86ZnUIFXbnouv/lgexdY+F332VuvEcAXnVG8Tw6oMzTqRtZXDPH+PgyTu kRduodD5NVFNUXAYm0GK8FtTDDcju43SqAAYad9iw84PEw7X9KLXA7zAgANu/yFBSx4i JAKA== X-Received: by 10.70.37.202 with SMTP id a10mr54531209pdk.108.1424225975475; Tue, 17 Feb 2015 18:19:35 -0800 (PST) Received: from ld-irv-0074.broadcom.com (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id ff10sm19169159pad.1.2015.02.17.18.19.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Feb 2015 18:19:34 -0800 (PST) From: Brian Norris To: Zhang Rui , Cc: Neil Horman , Brian Norris , Javi Merino , Florian Fainelli , , Subject: [PATCH 6/8] tools/thermal: tmon: support cross-compiling Date: Tue, 17 Feb 2015 18:18:34 -0800 Message-Id: <1424225916-13488-7-git-send-email-computersforpeace@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424225916-13488-1-git-send-email-computersforpeace@gmail.com> References: <1424225916-13488-1-git-send-email-computersforpeace@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We might want to prepare CFLAGS outside of this Makefile, so don't overwrite its initial value. Then, support $(CROSS_COMPILE), so we can use a cross-compile toolchain. Signed-off-by: Brian Norris --- tools/thermal/tmon/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile index e775adcbd29f..13d1876c7889 100644 --- a/tools/thermal/tmon/Makefile +++ b/tools/thermal/tmon/Makefile @@ -2,8 +2,8 @@ VERSION = 1.0 BINDIR=usr/bin WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int -CFLAGS= -O1 ${WARNFLAGS} -fstack-protector -CC=gcc +CFLAGS+= -O1 ${WARNFLAGS} -fstack-protector +CC=$(CROSS_COMPILE)gcc CFLAGS+=-D VERSION=\"$(VERSION)\" LDFLAGS+=