vlmcsd/make_mainframe_linux
2016-04-11 12:49:47 +08:00

51 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
SMALLCC="-pipe -fno-common -fno-exceptions -fno-stack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fmerge-all-constants"
SMALLLD="-pipe -Wl,--hash-style=sysv -Wl,-z,norelro -Wl,--build-id=none"
SMALL="$SMALLCC $SMALLLD"
export CFLAGS="$SMALLCC"
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m31 -mesa -mpacked-stack -msmall-exec"
export LDFLAGS="$SMALLLD -Wl,--hash-style=gnu"
export THREADS=0
export FEATURES=full
export MULTI_NAME=vlmcsdmulti-s390-glibc
export CLIENT_NAME=vlmcs-s390-glibc
export PROGRAM_NAME=vlmcsd-s390-glibc
make -B -j`nproc` $CLIENT_NAME $PROGRAM_NAME
rm -f vlmcsd.o vlmcs.o vlmcsdmulti.o
make -j`nproc` $MULTI_NAME
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
export MULTI_NAME=vlmcsdmulti-s390x-glibc
export CLIENT_NAME=vlmcs-s390x-glibc
export PROGRAM_NAME=vlmcsd-s390x-glibc
make -B -j`nproc` $CLIENT_NAME $PROGRAM_NAME
rm -f vlmcsd.o vlmcs.o vlmcsdmulti.o
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -m64 -mzarch -mpacked-stack -msmall-exec"
make -j`nproc` $MULTI_NAME
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
cp -af vlmcsd-s390-glibc /usr/local/sbin/vlmcsd
cp -af vlmcs-s390-glibc /usr/local/bin/vlmcs
mkdir -p /usr/local/man/man1 2>/dev/null
mkdir -p /usr/local/man/man5 2>/dev/null
mkdir -p /usr/local/man/man8 2>/dev/null
mkdir -p /usr/local/man/man7 2>/dev/null
cp -a vlmcs.1 vlmcsdmulti.1 /usr/local/man/man1/
cp -a vlmcsd.7 /usr/local/man/man7/
cp -a vlmcsd.8 /usr/local/man/man8/
cp -a vlmcsd.ini.5 /usr/local/man/man5/
pbzip2 -f -9 /usr/local/man/man5/vlmcsd.ini.5 /usr/local/man/man1/vlmcs.1 /usr/local/man/man1/vlmcsdmulti.1 /usr/local/man/man7/vlmcsd.7 /usr/local/man/man8/vlmcsd.8
scp -p vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc ubuntu64.internal:x/binaries/Linux/s390/glibc