From patchwork Mon Aug 6 11:17:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sonic Zhang X-Patchwork-Id: 175328 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id C312D2C0084 for ; Mon, 6 Aug 2012 21:24:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 489E8101932; Mon, 6 Aug 2012 11:24:02 +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 jSk9W8kwFBgj; Mon, 6 Aug 2012 11:23:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id BAF991016E8; Mon, 6 Aug 2012 11:23:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id AE6098F753 for ; Mon, 6 Aug 2012 11:23:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A5ABB8C32A for ; Mon, 6 Aug 2012 11:23:37 +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 WGRKEbcNgvPU for ; Mon, 6 Aug 2012 11:23:36 +0000 (UTC) X-Greylist: delayed 00:15:05 by SQLgrey-1.7.6 Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe004.messaging.microsoft.com [216.32.180.187]) by whitealder.osuosl.org (Postfix) with ESMTPS id 341478C332 for ; Mon, 6 Aug 2012 11:23:36 +0000 (UTC) Received: from mail129-co1-R.bigfish.com (10.243.78.237) by CO1EHSOBE006.bigfish.com (10.243.66.69) with Microsoft SMTP Server id 14.1.225.23; Mon, 6 Aug 2012 11:08:29 +0000 Received: from mail129-co1 (localhost [127.0.0.1]) by mail129-co1-R.bigfish.com (Postfix) with ESMTP id C5D1C803BF; Mon, 6 Aug 2012 11:08:29 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.57; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta2.analog.com; RD:nwd2mail11.analog.com; EFVD:NLI X-SpamScore: 8 X-BigFish: VS8(zzzz1202hzz8275bhz2ei87h2a8h668h839hd24he5bhe96h107ahff4o) Received-SPF: neutral (mail129-co1: 137.71.25.57 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.57; envelope-from=sonic.adi@gmail.com; helo=nwd2mta2.analog.com ; 2.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail129-co1 (localhost.localdomain [127.0.0.1]) by mail129-co1 (MessageSwitch) id 1344251307755913_8967; Mon, 6 Aug 2012 11:08:27 +0000 (UTC) Received: from CO1EHSMHS001.bigfish.com (unknown [10.243.78.243]) by mail129-co1.bigfish.com (Postfix) with ESMTP id B65FF9C004A; Mon, 6 Aug 2012 11:08:27 +0000 (UTC) Received: from nwd2mta2.analog.com (137.71.25.57) by CO1EHSMHS001.bigfish.com (10.243.66.11) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 6 Aug 2012 11:08:26 +0000 Received: from NWD2HUBCAS2.ad.analog.com (nwd2hubcas2.ad.analog.com [10.64.73.30]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id q76CAk8a024397 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 6 Aug 2012 08:10:46 -0400 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS2.ad.analog.com (10.64.73.30) with Microsoft SMTP Server id 8.3.83.0; Mon, 6 Aug 2012 07:08:25 -0400 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.5/8.14.5) with ESMTP id q76B8O4L017881; Mon, 6 Aug 2012 07:08:24 -0400 Received: from localhost.localdomain (unknown [10.99.22.81]) by linux.site (Postfix) with ESMTP id 2682942A5480; Sun, 5 Aug 2012 21:34:08 -0600 (MDT) From: Sonic Zhang To: Peter Korsgaard , Thomas Petazzoni Date: Mon, 6 Aug 2012 19:17:26 +0800 Message-ID: <1344251847-7709-2-git-send-email-sonic.adi@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1344251847-7709-1-git-send-email-sonic.adi@gmail.com> References: <1344251847-7709-1-git-send-email-sonic.adi@gmail.com> MIME-Version: 1.0 Cc: buildroot@busybox.net, buildroot-devel@lackfin.uclinux.org, Sonic Zhang Subject: [Buildroot] [PATCH 2/2] buildroot:package: Avoids prefix absolute compiler path when external toolchain path is empty. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Sonic Zhang Current external compiler is always prefixed by he customer path. When external toolchain path is left empty, this patch avoids prefix absolute path. Signed-off-by: Sonic Zhang --- package/Makefile.in | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/package/Makefile.in b/package/Makefile.in index 6fad224..ecbdc00 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -101,8 +101,13 @@ TARGET_LDFLAGS=$(call qstrip,$(BR2_TARGET_LDFLAGS)) ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG),y) TARGET_CROSS=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)- else +TOOLCHAIN_EXTERNAL_LOCATION=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)) +ifeq ($(TOOLCHAIN_EXTERNAL_LOCATION),) +TARGET_CROSS=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))- +else TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))- endif +endif # Quotes are needed for spaces et al in path components. TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)"