netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
	<clang-built-linux@googlegroups.com>,
	<linux-kernel@vger.kernel.org>,
	Xuefeng Li <lixuefeng@loongson.cn>
Subject: Re: [PATCH bpf] samples/bpf: Update README.rst for manually compiling LLVM and clang
Date: Mon, 18 Jan 2021 10:01:53 -0800	[thread overview]
Message-ID: <6bd33baa-ba8c-b38d-7375-12b3775c630e@fb.com> (raw)
In-Reply-To: <1610959982-6420-1-git-send-email-yangtiezhu@loongson.cn>



On 1/18/21 12:53 AM, Tiezhu Yang wrote:
> 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)

Thanks for the patch. Indeed llvm.org/git/llvm has been deprecated. We 
have recommended to use llvm-project at 
kernel/Documentation/bpf/bpf_devel_QA.rst.
 
https://github.com/torvalds/linux/blob/master/Documentation/bpf/bpf_devel_QA.rst#q-got-it-so-how-do-i-build-llvm-manually-anyway

Could you use the same scripts in the above link here?
There are different ways to build llvm/clang, I just want to be
consistent between bpf_devel_QA.rst and there.

I am also thinking whether we should just provide a link here to
bpf_devel_QA.rst. Looking at samples/bpf/README.rst, it all contains
direct commands for people to build/test, so copy-pasting the llvm
build scripts here should be fine.

>   
>   It is also possible to point make to the newly compiled 'llc' or
> 

      reply	other threads:[~2021-01-18 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6bd33baa-ba8c-b38d-7375-12b3775c630e@fb.com \
    --to=yhs@fb.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).