You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vlmcsd/hotbird64-mass-build/make_freebsd

47 lines
3.3 KiB
Plaintext

#!/usr/local/bin/bash
export VLMCSD_VERSION=$(git describe)
export VERBOSE=3
export DNS_PARSER=OS
cd "$( dirname "$0" )"
gmake -C .. clean
cd ../src
VERSION="$(uname -r | sed -e 's/-.*//')"
MAKE="gmake"
BINDIR="../bin"
PATH=/usr/local/bin:$PATH
MAKEFLAGS="-B -j12"
REUSEOBJFLAGS="-j12"
CF="-flto=12 -static-libgcc -pipe -fwhole-program -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
CFCLANG="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
LF="-Wl,-z,norelro -Wl,--hash-style=gnu -Wl,--build-id=none"
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=gnu"
$MAKE $MAKEFLAGS allmulti CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x64-gcc CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64-gcc PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-gcc CC=gcc9 CFLAGS="$CF" LDFLAGS="$LF"
$MAKE $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x64 CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64 PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64 CC=clang-devel CFLAGS="$CFCLANG" LDFLAGS="$LF" allmulti
$MAKE $MAKEFLAGS MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x86 CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86 PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86 CC=clang-devel CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
$MAKE $MAKEFLAGS allmulti CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-FreeBSD-$VERSION-x86-gcc CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86-gcc PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-gcc CC=gcc9 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-L/usr/lib32 -B/usr/lib32 $LF"
$MAKE $MAKEFLAGS CAT=2 vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-threads-gcc THREADS=1 CC=gcc9 CFLAGS="$CF" LDFLAGS="-lpthread $LF"
$MAKE $MAKEFLAGS vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-threads THREADS=1 CC=clang-devel CFLAGS="$CFCLANG" LDFLAGS="-lpthread $LF"
$MAKE $MAKEFLAGS vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-threads THREADS=1 CC=clang-devel CFLAGS="$CFCLANG -m32" LDFLAGS="-lpthread $LF"
$MAKE $MAKEFLAGS CAT=2 vlmcsd PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-threads-gcc THREADS=1 CC=gcc9 CFLAGS="$CF -m32 -DCOMPAT_32BIT" LDFLAGS="-lpthread -L/usr/lib32 -B/usr/lib32 $LF"
$MAKE $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x64-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x64-openssl1.0.1-EXPERIMENTAL CC=clang-devel CFLAGS="$CFCLANG" LDFLAGS="$LF"
$MAKE $MAKEFLAGS CRYPTO=openssl_with_aes CLIENT_NAME=$BINDIR/vlmcs-FreeBSD-$VERSION-x86-openssl1.0.1-EXPERIMENTAL PROGRAM_NAME=$BINDIR/vlmcsd-FreeBSD-$VERSION-x86-openssl1.0.1-EXPERIMENTAL CC=clang-devel CFLAGS="$CFCLANG -m32" LDFLAGS="$LF"
cd ../bin
strip -s --strip-unneeded --remove-section=.eh_frame_hdr --remove-section=.eh_frame --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
sudo cp -af ../etc/vlmcsd.kmd /usr/local/sbin
sudo cp -af vlmcsd-FreeBSD-$VERSION-x64-gcc /usr/local/sbin/vlmcsd
sudo cp -af vlmcs-FreeBSD-$VERSION-x64-gcc /usr/local/bin/vlmcs
# Copy everything to distribution server
scp -p * root@ubuntu64:x/binaries/FreeBSD/intel/