forked from the-tcpdump-group/tcpdump
-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildem
executable file
·28 lines (24 loc) · 933 Bytes
/
buildem
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# this script builds libpcap and tcpdump using the matrix of compilers and architectures
# that travis also buildsd.
if [ -f Makefile.in ]; then cd ..; fi
here=`pwd`
mkdir -p builds
cd builds
export CFLAGS='-fno-omit-frame-pointer -fsanitize=address -fno-optimize-sibling-calls -fPIC -Wextra -g3 -ggdb3 -O0 -Werror'
for arch in i386 x86_64
do
case $arch in
i386) CFLAGS="-m32 $CFLAGS"; export LDFLAGS="-m32"; export CXXFLAGS=-m32; target="i686-pc-linux-gnu" ;;
esac
(
for compiler in clang-6.0 gcc
do
mkdir -p $arch/$compiler
set -x
(cd $arch/$compiler && mkdir -p libpcap tcpdump &&
(cd libpcap && CC=$compiler $here/libpcap/configure --target=$target && make ) &&
(cd tcpdump && CC=$compiler $here/tcpdump/configure --target=$target && make && make check))
done
)
done