lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 11 Jun 2015 10:42:41 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	"Wangnan (F)" <wangnan0@...wei.com>,
	Namhyung Kim <namhyung@...nel.org>
CC:	acme@...nel.org, brendan.d.gregg@...il.com, daniel@...earbox.net,
	masami.hiramatsu.pt@...achi.com, paulus@...ba.org,
	a.p.zijlstra@...llo.nl, mingo@...hat.com, jolsa@...nel.org,
	dsahern@...il.com, linux-kernel@...r.kernel.org,
	lizefan@...wei.com, hekuang@...wei.com, xiakaixu@...wei.com,
	pi3orama@....com
Subject: Re: [RFC PATCH v6 24/32] perf record: Compile scriptlets if pass
 '.c' to --event

On 6/11/15 12:35 AM, Wangnan (F) wrote:
> Now I'm trying this:
>
>        "$CLANG_EXEC $CLANG_OPTIONS $KERNEL_INC_OPTIONS "
>        "-Wno-unused-value -Wno-pointer-sign "
>        "-working-directory $WORKING_DIR "
>        " -c \"$CLANG_SOURCE\" -march=bpf -O2 -o -"
>
> WORKING_DIR is appended because we will get relative include directory
> using the
> Makefile trick.

clang bpf support is in.
so please pull the latest llvm and clang, rebuild and you should
be able to use:
clang -O2 -target bpf -c file.c
Just like any other arch use -S to generate .s and so on.
Old style 'clang -emit-llvm -o - | llc -march=bpf' is fine too.

To build llvm/clang do:
git clone https://github.com/llvm-mirror/llvm.git
git clone https://github.com/llvm-mirror/clang.git llvm/tools/clang
mkdir llvm/build/
cd llvm/build/
cmake .. \
   -DCMAKE_BUILD_TYPE=Release \
   -DLLVM_TARGETS_TO_BUILD="X86;BPF" \
   -DCMAKE_INSTALL_PREFIX=/opt/local/llvm
make -j
sudo make install

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ