2015-11-29 17:30:52 +08:00
|
|
|
#!/usr/pkg/bin/bash
|
|
|
|
|
2016-11-16 12:12:36 +08:00
|
|
|
export VLMCSD_VERSION=$(git describe)
|
2015-11-29 17:30:52 +08:00
|
|
|
export VERBOSE=3
|
|
|
|
export DNS_PARSER=OS
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
cd "$( dirname "$0" )"
|
|
|
|
gmake -C .. clean
|
|
|
|
|
|
|
|
BINDIR="../bin"
|
|
|
|
cd ../src
|
2015-11-29 17:30:52 +08:00
|
|
|
|
|
|
|
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"
|
2016-06-28 13:07:01 +08:00
|
|
|
CF45="-flto=12 -static-libgcc -pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
|
2015-11-29 17:30:52 +08:00
|
|
|
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=sysv -Wl,--build-id=none"
|
|
|
|
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=sysv"
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
gmake $MAKEFLAGS CC=/usr/pkg/gcc6/bin/gcc PROGRAM_NAME=$BINDIR/vlmcsd-NetBSD-x64 CLIENT_NAME=$BINDIR/vlmcs-NetBSD-x64 MULTI_NAME=$BINDIR/vlmcsdmulti-NetBSD-x64 allmulti CFLAGS="$CF" LDFLAGS="$LF"
|
2015-11-29 17:30:52 +08:00
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
gmake allmulti CC=gcc $MAKEFLAGS CAT=2 MULTI_NAME=$BINDIR/vlmcsdmulti-NetBSD-x86 PROGRAM_NAME=$BINDIR/vlmcsd-NetBSD-x86 CLIENT_NAME=$BINDIR/vlmcs-NetBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
|
2015-11-29 17:30:52 +08:00
|
|
|
|
|
|
|
#gmake $MAKEFLAGS CC=clang PROGRAM_NAME=vlmcsd-NetBSD-x64-clang CLIENT_NAME=vlmcs-NetBSD-x64-clang CFLAGS="$CFCLANG" LDFLAGS="$LFCLANG"
|
|
|
|
|
2016-10-14 13:28:23 +08:00
|
|
|
cd $BINDIR
|
2015-11-29 17:30:52 +08:00
|
|
|
|
2016-06-06 10:36:00 +08:00
|
|
|
strip -s --strip-unneeded -R .ident -R .got -R .note.netbsd.pax -R .gnu.version -R .eh_frame -R .note.gnu.gold-version -R .comment -R .note -R .note.gnu.build-id -R .note.ABI-tag vlmcs-* vlmcsd-* vlmcsdmulti-*
|
2015-11-29 17:30:52 +08:00
|
|
|
#sstrip -z vlmcs-* vlmcsd-* vlmcsdmulti-*
|
|
|
|
|
|
|
|
cp -af vlmcsd-NetBSD-x86 /usr/local/sbin/vlmcsd
|
|
|
|
cp -af vlmcs-NetBSD-x86 /usr/local/bin/vlmcs
|
|
|
|
|
|
|
|
# Copy everything to distribution server
|
2016-06-28 13:07:01 +08:00
|
|
|
scp -p vlmcsdmulti-* vlmcsd-Net* vlmcs-* root@ubuntu64:x/binaries/NetBSD/intel/
|