A new option -Wsparse-error has been introduced to sparse in the
commits:
4d8811 sparse: Make -Werror turn warnigns into errors
fe57af rename -Werror to -Wsparse-error
which makes sparse fail on warnings. Start using the sparse git tree
for verification and make use of the new flag.
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
install_kernel
fi
-[ "$DPDK" ] && {
+if [ "$DPDK" ]; then
install_dpdk
# Disregard bad function cassts until DPDK is fixed
CFLAGS="$CFLAGS -Wno-error=bad-function-cast -Wno-error=cast-align"
-}
+elif [ $CC != "clang" ]; then
+ # DPDK headers currently trigger sparse errors
+ CFLAGS="$CFLAGS -Wsparse-error"
+fi
configure_ovs $*
sudo apt-get update -qq
sudo apt-get install -qq libssl-dev llvm-dev
-wget https://www.kernel.org/pub/software/devel/sparse/dist/sparse-0.5.0.tar.gz
-tar -xzvf sparse-0.5.0.tar.gz
-cd sparse-0.5.0 && make && sudo make install PREFIX=/usr && cd ..
+git clone git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
+cd sparse && make && sudo make install PREFIX=/usr && cd ..