Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1318678 > unrolled thread
| Started by | Joel Fernandes <agnel.joel@gmail.com> |
|---|---|
| First post | 2016-01-27 07:00 +0100 |
| Last post | 2016-01-27 07:30 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
make samples/bpf/ using gcc instead of clang/llvm Joel Fernandes <agnel.joel@gmail.com> - 2016-01-27 07:00 +0100
Re: make samples/bpf/ using gcc instead of clang/llvm Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-01-27 07:10 +0100
Re: make samples/bpf/ using gcc instead of clang/llvm Joel Fernandes <agnel.joel@gmail.com> - 2016-01-27 07:20 +0100
Re: make samples/bpf/ using gcc instead of clang/llvm Joel Fernandes <agnel.joel@gmail.com> - 2016-01-27 07:30 +0100
| From | Joel Fernandes <agnel.joel@gmail.com> |
|---|---|
| Date | 2016-01-27 07:00 +0100 |
| Subject | make samples/bpf/ using gcc instead of clang/llvm |
| Message-ID | <qVrj4-7je-15@gated-at.bofh.it> |
Hi Brendan, Alexei,
I noticed your patch fixing the $subject issue.
https://patchwork.ozlabs.org/patch/471118/
However, I still see make samples/bpf/ using gcc instead of clang.
Here's a verbose kbuild output of make samples/bpf/. My kernel version
is 4.4. It looks to me like Kbuild is ignoring the Makefile in
samples/bpf/. Let me know if you spot anything of the ordinary?
Thanks.
make KBUILD_VERBOSE=1 samples/bpf/
[..]
make KBUILD_MODULES=1 \
-f /home/joel/data/repo/linux-4.4/scripts/Makefile.build obj=samples/bpf
(cat /dev/null; ) > samples/bpf/modules.order
gcc -Wp,-MD,samples/bpf/.test_verifier.o.d -Isamples/bpf -Wall
-Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
-std=gnu89 -I/home/joel/data/repo/linux-4.4/./usr/include
-I./usr/include -c -o samples/bpf/test_verifier.o
/home/joel/data/repo/linux-4.4/samples/bpf/test_verifier.c
/home/joel/data/repo/linux-4.4/samples/bpf/test_verifier.c:12:23:
fatal error: linux/bpf.h: No such file or directory
#include <linux/bpf.h>
^
compilation terminated.
make[2]: *** [samples/bpf/test_verifier.o] Error 1
[toc] | [next] | [standalone]
| From | Alexei Starovoitov <alexei.starovoitov@gmail.com> |
|---|---|
| Date | 2016-01-27 07:10 +0100 |
| Message-ID | <qVrsK-7FL-13@gated-at.bofh.it> |
| In reply to | #1318678 |
On Tue, Jan 26, 2016 at 09:51:54PM -0800, Joel Fernandes wrote: > Hi Brendan, Alexei, > > I noticed your patch fixing the $subject issue. > > https://patchwork.ozlabs.org/patch/471118/ > > However, I still see make samples/bpf/ using gcc instead of clang. > > Here's a verbose kbuild output of make samples/bpf/. My kernel version > is 4.4. It looks to me like Kbuild is ignoring the Makefile in > samples/bpf/. Let me know if you spot anything of the ordinary? > Thanks. > > make KBUILD_VERBOSE=1 samples/bpf/ > [..] > make KBUILD_MODULES=1 \ > -f /home/joel/data/repo/linux-4.4/scripts/Makefile.build obj=samples/bpf > (cat /dev/null; ) > samples/bpf/modules.order > gcc -Wp,-MD,samples/bpf/.test_verifier.o.d -Isamples/bpf -Wall > -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer > -std=gnu89 -I/home/joel/data/repo/linux-4.4/./usr/include > -I./usr/include -c -o samples/bpf/test_verifier.o > /home/joel/data/repo/linux-4.4/samples/bpf/test_verifier.c > /home/joel/data/repo/linux-4.4/samples/bpf/test_verifier.c:12:23: > fatal error: linux/bpf.h: No such file or directory > #include <linux/bpf.h> > ^ > compilation terminated. test_verifier.c should be built with gcc. *_kern.c are built with clang. In this case likely 'make headers_install' is missing.
[toc] | [prev] | [next] | [standalone]
| From | Joel Fernandes <agnel.joel@gmail.com> |
|---|---|
| Date | 2016-01-27 07:20 +0100 |
| Message-ID | <qVrCq-7KH-9@gated-at.bofh.it> |
| In reply to | #1318681 |
Alexei, Thanks for the quick reply. But, the bpf sample programs like tracex1_kern.c are marked with hostprogs-y in the Makefile as well, just like test_verifier.c. How does Kbuild/Make know when to use gcc and when to use clang? Best, On Tue, Jan 26, 2016 at 10:08 PM, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote: > On Tue, Jan 26, 2016 at 09:51:54PM -0800, Joel Fernandes wrote: >> Hi Brendan, Alexei, >> >> I noticed your patch fixing the $subject issue. >> >> https://patchwork.ozlabs.org/patch/471118/ >> >> However, I still see make samples/bpf/ using gcc instead of clang. >> >> Here's a verbose kbuild output of make samples/bpf/. My kernel version >> is 4.4. It looks to me like Kbuild is ignoring the Makefile in >> samples/bpf/. Let me know if you spot anything of the ordinary? >> Thanks. >> >> make KBUILD_VERBOSE=1 samples/bpf/ >> [..] >> make KBUILD_MODULES=1 \ >> -f /home/joel/data/repo/linux-4.4/scripts/Makefile.build obj=samples/bpf >> (cat /dev/null; ) > samples/bpf/modules.order >> gcc -Wp,-MD,samples/bpf/.test_verifier.o.d -Isamples/bpf -Wall >> -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer >> -std=gnu89 -I/home/joel/data/repo/linux-4.4/./usr/include >> -I./usr/include -c -o samples/bpf/test_verifier.o >> /home/joel/data/repo/linux-4.4/samples/bpf/test_verifier.c >> /home/joel/data/repo/linux-4.4/samples/bpf/test_verifier.c:12:23: >> fatal error: linux/bpf.h: No such file or directory >> #include <linux/bpf.h> >> ^ >> compilation terminated. > > test_verifier.c should be built with gcc. > *_kern.c are built with clang. > In this case likely 'make headers_install' is missing. >
[toc] | [prev] | [next] | [standalone]
| From | Joel Fernandes <agnel.joel@gmail.com> |
|---|---|
| Date | 2016-01-27 07:30 +0100 |
| Message-ID | <qVrM6-7PH-9@gated-at.bofh.it> |
| In reply to | #1318689 |
Hi Alexei, Ok, I take that back. I see how it works now. Thanks for sharing that. On Tue, Jan 26, 2016 at 10:18 PM, Joel Fernandes <agnel.joel@gmail.com> wrote: > Alexei, > > Thanks for the quick reply. > > But, the bpf sample programs like tracex1_kern.c are marked with > hostprogs-y in the Makefile as well, just like test_verifier.c. How > does Kbuild/Make know when to use gcc and when to use clang? > > Best, > > On Tue, Jan 26, 2016 at 10:08 PM, Alexei Starovoitov > <alexei.starovoitov@gmail.com> wrote: >> On Tue, Jan 26, 2016 at 09:51:54PM -0800, Joel Fernandes wrote: >>> Hi Brendan, Alexei, >>> >>> I noticed your patch fixing the $subject issue. >>> >>> https://patchwork.ozlabs.org/patch/471118/ >>> >>> However, I still see make samples/bpf/ using gcc instead of clang. >>> >>> Here's a verbose kbuild output of make samples/bpf/. My kernel version >>> is 4.4. It looks to me like Kbuild is ignoring the Makefile in >>> samples/bpf/. Let me know if you spot anything of the ordinary? >>> Thanks. >>> >>> make KBUILD_VERBOSE=1 samples/bpf/ >>> [..] >>> make KBUILD_MODULES=1 \ >>> -f /home/joel/data/repo/linux-4.4/scripts/Makefile.build obj=samples/bpf >>> (cat /dev/null; ) > samples/bpf/modules.order >>> gcc -Wp,-MD,samples/bpf/.test_verifier.o.d -Isamples/bpf -Wall >>> -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer >>> -std=gnu89 -I/home/joel/data/repo/linux-4.4/./usr/include >>> -I./usr/include -c -o samples/bpf/test_verifier.o >>> /home/joel/data/repo/linux-4.4/samples/bpf/test_verifier.c >>> /home/joel/data/repo/linux-4.4/samples/bpf/test_verifier.c:12:23: >>> fatal error: linux/bpf.h: No such file or directory >>> #include <linux/bpf.h> >>> ^ >>> compilation terminated. >> >> test_verifier.c should be built with gcc. >> *_kern.c are built with clang. >> In this case likely 'make headers_install' is missing. >>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web