|
|
|
#!/usr/pkg/bin/bash
|
|
|
|
|
|
|
|
export VERBOSE=3
|
|
|
|
export DNS_PARSER=OS
|
|
|
|
|
|
|
|
rm -f vlmcsd-* vlmcs-* vlmcsdmulti-* *_all.* 2>/dev/null
|
|
|
|
gmake clean
|
|
|
|
|
|
|
|
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"
|
|
|
|
CF45="-static-libgcc -pipe -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=sysv -Wl,--build-id=none"
|
|
|
|
LFCLANG="-Wl,-z,norelro -Wl,--hash-style=sysv"
|
|
|
|
|
|
|
|
gmake $MAKEFLAGS CC=/usr/pkg/gcc5/bin/gcc PROGRAM_NAME=vlmcsd-NetBSD-x64 CLIENT_NAME=vlmcs-NetBSD-x64 CFLAGS="$CF" LDFLAGS="$LF"
|
|
|
|
rm vlmcsd.o vlmcs.o
|
|
|
|
gmake vlmcsdmulti-NetBSD-x64 $REUSEOBJFLAGS CC=/usr/pkg/gcc5/bin/gcc CFLAGS="$CF" LDFLAGS="$LF" MULTI_NAME=vlmcsdmulti-NetBSD-x64
|
|
|
|
|
|
|
|
gmake allmulti CC=gcc $MAKEFLAGS CAT=2 MULTI_NAME=vlmcsdmulti-NetBSD-x86 PROGRAM_NAME=vlmcsd-NetBSD-x86 CLIENT_NAME=vlmcs-NetBSD-x86 CFLAGS="$CF45 -m32" LDFLAGS="$LF"
|
|
|
|
|
|
|
|
#gmake $MAKEFLAGS CC=clang PROGRAM_NAME=vlmcsd-NetBSD-x64-clang CLIENT_NAME=vlmcs-NetBSD-x64-clang CFLAGS="$CFCLANG" LDFLAGS="$LFCLANG"
|
|
|
|
|
|
|
|
rm *.o
|
|
|
|
|
|
|
|
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-*
|
|
|
|
#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
|
|
|
|
scp -p vlmcsdmulti-* vlmcsd-* vlmcs-* root@ubuntu64:x/binaries/NetBSD/intel/
|