Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1259088
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/8] tools build: Fix libiberty feature detection |
| Date | 2015-10-30 00:10 +0100 |
| Message-ID | <qp4uu-6yv-25@gated-at.bofh.it> (permalink) |
| References | <qp4ut-6yv-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Rabin Vincent <rabin.vincent@axis.com> 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 <rabin.vincent@axis.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Rabin Vincent <rabinv@axis.com> Link: http://lkml.kernel.org/r/1446104978-26429-2-git-send-email-rabin.vincent@axis.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/build/feature/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index e43a2971bf56..cea04ce9f35c 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -132,10 +132,10 @@ test-libbfd.bin: $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl test-liberty.bin: - $(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty + $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty test-liberty-z.bin: - $(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz + $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz test-cplus-demangle.bin: $(BUILD) -liberty -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-30 00:10 +0100 [PATCH 2/8] perf script: Enable printing of branch stack Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-30 00:10 +0100 [PATCH 5/8] perf record: Add clang options for compiling BPF scripts Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-30 00:10 +0100 [PATCH 1/8] perf trace: Add cmd string table to decode sys_bpf first arg Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-30 00:10 +0100 [PATCH 3/8] perf tools: Make sure fixdep is built before libbpf Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-30 00:10 +0100 [PATCH 7/8] tools build: Fix libiberty feature detection Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-30 00:10 +0100 [PATCH 4/8] perf bpf: Attach eBPF filter to perf event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-30 00:10 +0100 [PATCH 6/8] perf tools: Compile scriptlets to BPF objects when passing '.c' to --event Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-30 00:10 +0100 Re: [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-10-30 10:20 +0100
csiph-web