All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] samples/bpf: fix in-source build of samples with clang
@ 2015-05-12  4:25 Alexei Starovoitov
  2015-05-13  3:15 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexei Starovoitov @ 2015-05-12  4:25 UTC (permalink / raw)
  To: David S. Miller; +Cc: Brenden Blanco, Daniel Borkmann, netdev

From: Brenden Blanco <bblanco@plumgrid.com>

in-source build of 'make samples/bpf/' was incorrectly
using default compiler instead of invoking clang/llvm.
out-of-source build was ok.

Fixes: a80857822b0c ("samples: bpf: trivial eBPF program in C")
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
---
It's a minor fix and not strictly necessary for stable.

 samples/bpf/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 76e3458a5419..8fdbd73429dd 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -44,7 +44,7 @@ HOSTLOADLIBES_tracex4 += -lelf -lrt
 # point this to your LLVM backend with bpf support
 LLC=$(srctree)/tools/bpf/llvm/bld/Debug+Asserts/bin/llc
 
-%.o: %.c
+$(obj)/%.o: $(src)/%.c
 	clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \
 		-D__KERNEL__ -Wno-unused-value -Wno-pointer-sign \
 		-O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] samples/bpf: fix in-source build of samples with clang
  2015-05-12  4:25 [PATCH net-next] samples/bpf: fix in-source build of samples with clang Alexei Starovoitov
@ 2015-05-13  3:15 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-05-13  3:15 UTC (permalink / raw)
  To: ast; +Cc: bblanco, daniel, netdev

From: Alexei Starovoitov <ast@plumgrid.com>
Date: Mon, 11 May 2015 21:25:51 -0700

> From: Brenden Blanco <bblanco@plumgrid.com>
> 
> in-source build of 'make samples/bpf/' was incorrectly
> using default compiler instead of invoking clang/llvm.
> out-of-source build was ok.
> 
> Fixes: a80857822b0c ("samples: bpf: trivial eBPF program in C")
> Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-13  3:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-12  4:25 [PATCH net-next] samples/bpf: fix in-source build of samples with clang Alexei Starovoitov
2015-05-13  3:15 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.