From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbdBOPSi (ORCPT ); Wed, 15 Feb 2017 10:18:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35898 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbdBOPSg (ORCPT ); Wed, 15 Feb 2017 10:18:36 -0500 Date: Wed, 15 Feb 2017 13:18:33 -0200 From: Arnaldo Carvalho de Melo To: Marcin Nowakowski Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] tools/lib/api: allow the linker to be overridden Message-ID: <20170215151833.GA2196@redhat.com> References: <1487170590-17970-1-git-send-email-marcin.nowakowski@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487170590-17970-1-git-send-email-marcin.nowakowski@imgtec.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 15 Feb 2017 15:18:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Feb 15, 2017 at 03:56:30PM +0100, Marcin Nowakowski escreveu: > Makefile in lib/api unconditionally sets the LD to support > cross-compilation. However, when invoked from within the perf build LD > may be already appropriately set for a given platform and the override > may lead to cross-compilation without appropriate linker flags. > Change the unconditional override to a conditional one. > > Fixes: 37b4e2020a5f ('perf build: Add EXTRA_LDFLAGS option to makefile') > Fixes: 703e01652d25 ('tools lib api: Respect CROSS_COMPILE for the linker') > > Signed-off-by: Marcin Nowakowski > --- > tools/lib/api/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile > index adba83b..42e00c4 100644 > --- a/tools/lib/api/Makefile > +++ b/tools/lib/api/Makefile > @@ -10,7 +10,7 @@ endif > > CC = $(CROSS_COMPILE)gcc > AR = $(CROSS_COMPILE)ar > -LD = $(CROSS_COMPILE)ld > +LD ?= $(CROSS_COMPILE)ld Looks strange to do this just for LD, what about CC and AR? - Arnaldo > MAKEFLAGS += --no-print-directory > > -- > 2.7.4