1
0
mirror of https://github.com/Wind4/vlmcsd.git synced 2024-11-25 03:21:03 +08:00
vlmcsd/make_multilib_linux

123 lines
4.2 KiB
Plaintext
Raw Normal View History

2016-06-06 10:36:00 +08:00
#!/bin/bash
2016-08-15 18:35:59 +08:00
export VLMCSD_VERSION="svn`svnversion`"
2016-06-06 10:36:00 +08:00
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"
2016-06-28 13:07:01 +08:00
rm -f vlmcsd vlmcs vlmcsdmulti vlmcsd-s390* vlmcsd-sparc64* vlmcsd-mips64* vlmcs-* vlmcsdmulti-*
2016-06-06 10:36:00 +08:00
## IBM S/390
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 CC=s390x-linux-gnu-gcc
export VERBOSE=3
export MULTI_NAME=vlmcsdmulti-s390-glibc
export CLIENT_NAME=vlmcs-s390-glibc
export PROGRAM_NAME=vlmcsd-s390-glibc
2016-06-28 13:07:01 +08:00
make -B -j`nproc` allmulti
2016-06-06 10:36:00 +08:00
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
2016-06-28 13:07:01 +08:00
make -B -j`nproc` allmulti
2016-06-06 10:36:00 +08:00
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
2016-06-28 13:07:01 +08:00
2016-06-06 10:36:00 +08:00
## SPARC64
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mcpu=v7"
export LDFLAGS="$SMALLLD"
export CC=sparc64-linux-gnu-gcc
export MULTI_NAME=vlmcsdmulti-sparc64v9-glibc
export CLIENT_NAME=vlmcs-sparc64v9-glibc
export PROGRAM_NAME=vlmcsd-sparc64v9-glibc
2016-06-28 13:07:01 +08:00
make -B -j`nproc` allmulti
2016-06-06 10:36:00 +08:00
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
2016-06-28 13:07:01 +08:00
2016-06-06 10:36:00 +08:00
## MIPS64 BIG-ENDIAN
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
export LDFLAGS="$SMALLLD"
export CC=mips64-linux-gnuabi64-gcc
export MULTI_NAME=vlmcsdmulti-mips64-glibc
export CLIENT_NAME=vlmcs-mips64-glibc
export PROGRAM_NAME=vlmcsd-mips64-glibc
2016-06-28 13:07:01 +08:00
make -B -j`nproc` allmulti
2016-06-06 10:36:00 +08:00
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
export MULTI_NAME=vlmcsdmulti-mips64mm-glibc
export CLIENT_NAME=vlmcs-mips64mm-glibc
export PROGRAM_NAME=vlmcsd-mips64mm-glibc
2016-06-28 13:07:01 +08:00
make -B -j`nproc` allmulti
2016-06-06 10:36:00 +08:00
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
## MIPS64 LITTLE-ENDIAN
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mno-mips16"
export LDFLAGS="$SMALLLD"
export CC=mips64el-linux-gnuabi64-gcc
export MULTI_NAME=vlmcsdmulti-mips64el-glibc
export CLIENT_NAME=vlmcs-mips64el-glibc
export PROGRAM_NAME=vlmcsd-mips64el-glibc
2016-06-28 13:07:01 +08:00
make -B -j`nproc` allmulti
2016-06-06 10:36:00 +08:00
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
export PLATFORMFLAGS="-flto=jobserver -fwhole-program -mips64 -mmicromips"
export MULTI_NAME=vlmcsdmulti-mips64elmm-glibc
export CLIENT_NAME=vlmcs-mips64elmm-glibc
export PROGRAM_NAME=vlmcsd-mips64elmm-glibc
2016-06-28 13:07:01 +08:00
make -B -j`nproc` allmulti
2016-06-06 10:36:00 +08:00
sstrip -z $CLIENT_NAME $PROGRAM_NAME $MULTI_NAME
if [ "$1" == "nocopy" ]; then
exit 0
fi
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
scp -p vlmcsdmulti-sparc64v9-glibc vlmcs-sparc64v9-glibc vlmcsd-sparc64v9-glibc ubuntu64.internal:x/binaries/Linux/sparc/glibc
scp -p vlmcsdmulti-mips64-glibc vlmcs-mips64-glibc vlmcsd-mips64-glibc vlmcsdmulti-mips64mm-glibc vlmcs-mips64mm-glibc vlmcsd-mips64mm-glibc ubuntu64.internal:x/binaries/Linux/mips/big-endian/glibc
scp -p vlmcsdmulti-mips64el-glibc vlmcs-mips64el-glibc vlmcsd-mips64el-glibc vlmcsdmulti-mips64elmm-glibc vlmcs-mips64elmm-glibc vlmcsd-mips64elmm-glibc ubuntu64.internal:x/binaries/Linux/mips/little-endian/glibc
scp -p -P 2222 vlmcsdmulti-s390-glibc vlmcs-s390-glibc vlmcsd-s390-glibc vlmcsdmulti-s390x-glibc vlmcs-s390x-glibc vlmcsd-s390x-glibc s390:vlmcsd
scp -p -P 2222 vlmcsdmulti-s390-glibc vlmcsdmulti-s390x-glibc s390:/usr/local/sbin