#!/bin/bash # -*- coding: utf-8 -*- # # nacl_build.sh -- NaCl library build script # # Copyright (C) 2011 Daniel Borkmann # Copyright (C) 2009-2011 Emmanuel Roullit # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. cc="gcc" nacl_dir="/tmp" nacl_version="nacl-20110221" nacl_suffix="tar.bz2" nacl_base_url="http://hyperelliptic.org/nacl" nacl_path="$nacl_dir/$nacl_version.$nacl_suffix" nacl_build_dir="$1" if test -z "$nacl_build_dir"; then echo "Please input the path where NaCl should be build" exit 1 fi if ! test -d "$nacl_build_dir"; then mkdir "$nacl_build_dir" fi wget -O "$nacl_path" "$nacl_base_url/$nacl_version.$nacl_suffix" tar xjf "$nacl_path" -C "$nacl_build_dir" $cc -Wall -O2 ./abiname.c -o ./abiname arch="`./abiname`" shorthostname=$(hostname | sed 's/\..*//' | tr -cd '[a-z][A-Z][0-9]') echo "Building NaCl for arch $arch on host $shorthostname (grab a coffee, this takes a while) ..." cd "$nacl_build_dir"/"$nacl_version" ./do cd - > /dev/null nacl_lib_path="$nacl_build_dir/$nacl_version/build/$shorthostname/lib/$arch" nacl_include_path="$nacl_build_dir/$nacl_version/build/$shorthostname/include/$arch" echo "NaCl lib path $nacl_lib_path" echo "NaCl include path $nacl_include_path" ./nacl_path.sh "$nacl_include_path" "$nacl_lib_path" echo "Done!" Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <arnaldo.melo@gmail.com>2016-12-15 12:29:27 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-12-20 09:37:33 -0300
commit96c2fb69b92fcf6006dfb3017d6d887f8321407b (patch)
tree53f0ba13c187ffdfe352df05114002cb864e4b28
parentd40fc181ebec6b1d560e2167208276baa4f3bbf0 (diff)
samples/bpf: Make perf_event_read() static
While testing Joe's conversion of samples/bpf/ to use tools/lib/bpf/ I noticed some warnings building samples/bpf/ on a Fedora Rawhide container, with clang/llvm 3.9 I noticed this: [root@1e797fdfbf4f linux]# make -j4 O=/tmp/build/linux/ samples/bpf/ make[1]: Entering directory '/tmp/build/linux' CHK include/config/kernel.release GEN ./Makefile CHK include/generated/uapi/linux/version.h Using /git/linux as source for kernel <SNIP> HOSTCC samples/bpf/trace_output_user.o /git/linux/samples/bpf/trace_output_user.c:64:6: warning: no previous prototype for 'perf_event_read' [-Wmissing-prototypes] void perf_event_read(print_fn fn) ^~~~~~~~~~~~~~~ HOSTLD samples/bpf/trace_output make[1]: Leaving directory '/tmp/build/linux' Shut up the compiler by making that function static. Acked-by: Daniel Borkmann <daniel@iogearbox.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Joe Stringer <joe@ovn.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/20161215152927.GC6866@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--samples/bpf/trace_output_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/trace_output_user.c b/samples/bpf/trace_output_user.c