lkml.org 
[lkml]   [2015]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 4/5] samples/bpf: Add proper prefix to objects in Makefile
On 5/17/15 10:30 PM, He Kuang wrote:
> Always use $(obj) when referring to generated files and use $(src) when
> referring to files located in the src tree.
>
> Signed-off-by: He Kuang <hekuang@huawei.com>
> ---
> samples/bpf/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> index 76e3458..8fdbd73 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 $@

the same fix is already in net-next:
https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=b88c06e36dcb9b4ae285f7821f62d68dc34b25d3



\
 
 \ /
  Last update: 2015-05-18 22:21    [W:0.077 / U:3.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site