diff options
| author | Yonghong Song <yhs@fb.com> | 2017-06-21 16:48:27 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-06-22 11:35:19 -0400 |
| commit | 00a3855d68bd1ae633c94b13b8b404a5a238b135 (patch) | |
| tree | 57c1526b14b6fb2260d4daaaa249ae7eaee0995e /samples | |
| parent | 2de18105a8219bde0cc4947729d5f00ecb39179f (diff) | |
samples/bpf: fix a build problem
tracex5_kern.c build failed with the following error message:
../samples/bpf/tracex5_kern.c:12:10: fatal error: 'syscall_nrs.h' file not found
#include "syscall_nrs.h"
The generated file syscall_nrs.h is put in build/samples/bpf directory,
but this directory is not in include path, hence build failed.
The fix is to add $(obj) into the clang compilation path.
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/bpf/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index a0561dc762fe..e7ec9b8539a5 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile | |||
| @@ -197,7 +197,7 @@ $(obj)/tracex5_kern.o: $(obj)/syscall_nrs.h | |||
| 197 | # But, there is no easy way to fix it, so just exclude it since it is | 197 | # But, there is no easy way to fix it, so just exclude it since it is |
| 198 | # useless for BPF samples. | 198 | # useless for BPF samples. |
| 199 | $(obj)/%.o: $(src)/%.c | 199 | $(obj)/%.o: $(src)/%.c |
| 200 | $(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ | 200 | $(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) -I$(obj) \ |
| 201 | -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ | 201 | -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ |
| 202 | -Wno-compare-distinct-pointer-types \ | 202 | -Wno-compare-distinct-pointer-types \ |
| 203 | -Wno-gnu-variable-sized-type-not-at-end \ | 203 | -Wno-gnu-variable-sized-type-not-at-end \ |
