diff options
author | Jiong Wang <jiong.wang@netronome.com> | 2018-01-16 15:51:47 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-01-17 01:15:05 +0100 |
commit | 39b72ccdb278f53735af1a378e67e6110e3210ad (patch) | |
tree | f55ec48a5e30b5c45bd00e78252ab7ae14880da6 /tools/build | |
parent | 48b325632641da27a241912d66b38a1221ab425f (diff) | |
download | linux-39b72ccdb278f53735af1a378e67e6110e3210ad.tar.gz linux-39b72ccdb278f53735af1a378e67e6110e3210ad.tar.bz2 linux-39b72ccdb278f53735af1a378e67e6110e3210ad.zip |
tools: bpftool: add -DPACKAGE when including bfd.h
bfd.h is requiring including of config.h except when PACKAGE or
PACKAGE_VERSION are defined.
/* PR 14072: Ensure that config.h is included first. */
#if !defined PACKAGE && !defined PACKAGE_VERSION
#error config.h must be included before this header
#endif
This check has been introduced since May-2012. It doesn't show up in bfd.h
on some Linux distribution, probably because distributions have remove it
when building the package.
However, sometimes the user might just build libfd from source code then
link bpftool against it. For this case, bfd.h will be original that we need
to define PACKAGE or PACKAGE_VERSION.
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/build')
-rw-r--r-- | tools/build/feature/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 17f2c73fff8b..bc715f6ac320 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -190,7 +190,7 @@ $(OUTPUT)test-libbfd.bin: $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl $(OUTPUT)test-disassembler-four-args.bin: - $(BUILD) -lbfd -lopcodes + $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes $(OUTPUT)test-liberty.bin: $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty |