[3.19.y-ckt stable] Patch "samples/bpf: fix in-source build of samples with clang" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Thu Jul 16 01:07:36 UTC 2015


This is a note to let you know that I have just added a patch titled

    samples/bpf: fix in-source build of samples with clang

to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

This patch is scheduled to be released in version 3.19.y-ckt4.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 20f29ae6f0018d9126659cfa8b5cbeb2da34f859 Mon Sep 17 00:00:00 2001
From: Brenden Blanco <bblanco at plumgrid.com>
Date: Mon, 11 May 2015 21:25:51 -0700
Subject: samples/bpf: fix in-source build of samples with clang

commit b88c06e36dcb9b4ae285f7821f62d68dc34b25d3 upstream.

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 at plumgrid.com>
Signed-off-by: Alexei Starovoitov <ast at plumgrid.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 samples/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index b5b3600..0594a58 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -27,7 +27,7 @@ HOSTLOADLIBES_sockex2 += -lelf
 # 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.9.1





More information about the kernel-team mailing list