netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf] samples/bpf: Update README.rst for manually compiling LLVM and clang
@ 2021-01-18  8:53 Tiezhu Yang
  2021-01-18 18:01 ` Yonghong Song
  0 siblings, 1 reply; 2+ messages in thread
From: Tiezhu Yang @ 2021-01-18  8:53 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Nathan Chancellor, Nick Desaulniers
  Cc: netdev, bpf, clang-built-linux, linux-kernel, Xuefeng Li

In the current samples/bpf/README.rst, the url of llvm and clang git
may be out of date, they are unable to access:

$ git clone http://llvm.org/git/llvm.git
Cloning into 'llvm'...
fatal: unable to access 'http://llvm.org/git/llvm.git/': Maximum (20) redirects followed
$ git clone --depth 1 http://llvm.org/git/clang.git
Cloning into 'clang'...
fatal: unable to access 'http://llvm.org/git/clang.git/': Maximum (20) redirects followed

The Clang Getting Started page [1] might have more accurate information,
I verified the procedure and it is proved to be feasible, so we should
update it to reflect the reality.

[1] https://clang.llvm.org/get_started.html

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 samples/bpf/README.rst | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/samples/bpf/README.rst b/samples/bpf/README.rst
index dd34b2d..f606c08 100644
--- a/samples/bpf/README.rst
+++ b/samples/bpf/README.rst
@@ -65,11 +65,9 @@ To generate a smaller llc binary one can use::
 Quick sniplet for manually compiling LLVM and clang
 (build dependencies are cmake and gcc-c++)::
 
- $ git clone http://llvm.org/git/llvm.git
- $ cd llvm/tools
- $ git clone --depth 1 http://llvm.org/git/clang.git
- $ cd ..; mkdir build; cd build
- $ cmake .. -DLLVM_TARGETS_TO_BUILD="BPF;X86"
+ $ git clone https://github.com/llvm/llvm-project.git
+ $ cd llvm-project; mkdir build; cd build
+ $ cmake -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD="BPF;X86" -G "Unix Makefiles" ../llvm
  $ make -j $(getconf _NPROCESSORS_ONLN)
 
 It is also possible to point make to the newly compiled 'llc' or
-- 
2.1.0


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

end of thread, other threads:[~2021-01-18 18:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18  8:53 [PATCH bpf] samples/bpf: Update README.rst for manually compiling LLVM and clang Tiezhu Yang
2021-01-18 18:01 ` Yonghong Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).