From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757862AbbJ2UpW (ORCPT ); Thu, 29 Oct 2015 16:45:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34488 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757063AbbJ2UpU (ORCPT ); Thu, 29 Oct 2015 16:45:20 -0400 Date: Thu, 29 Oct 2015 21:45:11 +0100 From: Jiri Olsa To: Rabin Vincent Cc: Arnaldo Carvalho de Melo , jolsa@kernel.org, namhyung@kernel.org, Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Rabin Vincent Subject: Re: [PATCHv2 2/3] tools: build: fix libiberty feature detection Message-ID: <20151029204511.GA12291@krava.redhat.com> References: <1446104978-26429-1-git-send-email-rabin.vincent@axis.com> <1446104978-26429-2-git-send-email-rabin.vincent@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446104978-26429-2-git-send-email-rabin.vincent@axis.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 29, 2015 at 08:49:37AM +0100, Rabin Vincent wrote: > Any CFLAGS or LDFLAGS set by the user need to be passed to the feature build > command. This many include for example -I or -L to point to libraries and > include files in custom paths. > > In most of the test-*.bin rules in build/feature/Makefile, we use the BUILD > macro which always sends in CFLAGS and LDFLAGS. The libiberty build line > however doesn't use the BUILD macro and thus needs to send in CFLAGS and > LDFLAGS explicitly. Without this, when using custom CFLAGS/LDFLAGS, libiberty > fails to be detected and the perf link fails with something like: > > LINK perf > libbfd.a(bfd.o): In function `bfd_errmsg': > bfd.c:(.text+0x168): undefined reference to `xstrerror' > bbfd.a(opncls.o): In function `_bfd_new_bfd': > opncls.c:(.text+0xe8): undefined reference to `objalloc_create' > ... > > Signed-off-by: Rabin Vincent Acked-by: Jiri Olsa thanks, jirka