update build-script, remove ppc64be

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
master
kim (grufwub) 4 years ago
parent 3077661510
commit 2046c3ad84

@ -3,12 +3,6 @@
PROJECT='gophor'
OUTDIR='build'
build() {
echo "Building $PROJECT for $2_$3..."
CC="$1" CGO_ENABLED=1 GOOS="$2" GOARCH="$3" go build -trimpath -o="$OUTDIR/$PROJECT.$2.$3" -buildmode="$4" -a -tags "$5" -ldflags "$6"
echo ''
}
echo "PLEASE BE WARNED THIS SCRIPT IS WRITTEN FOR MY VOID LINUX BUILD ENVIRONMENT"
echo "YOUR CC CROSS-COMPILER LOCATIONS MAY DIFFER ON YOUR BUILD SYSTEM"
echo ""
@ -18,12 +12,28 @@ rm -rf "$OUTDIR"
mkdir -p "$OUTDIR"
# Build time :)
build 'i686-linux-musl-gcc' 'linux' '386' 'pie' 'netgo' '-s -w -extldflags "-static"'
build 'x86_64-linux-musl-gcc' 'linux' 'amd64' 'pie' 'netgo' '-s -w -extldflags "-static"'
build 'arm-linux-musleabi-gcc' 'linux' 'arm' 'pie' 'netgo' '-s -w -extldflags "-static"'
build 'aarch64-linux-musl-gcc' 'linux' 'arm64' 'pie' 'netgo' '-s -w -extldflags "-static"'
build 'mips-linux-musl-gcc' 'linux' 'mips' 'default' 'netgo' '-s -w -extldflags "-static"'
#build 'powerpc64-linux-musl-gcc' 'linux' 'ppc64' 'default' 'netgo' '-s -w -extldflags "-static"'
build 'powerpc64le-linux-musl-gcc' 'linux' 'ppc64le' 'pie' 'netgo' '-s -w -extldflags "-static"'
echo "PLEASE DON'T JUDGE THIS SCRIPT, IT IS TRULY SO AWFUL. TO BE IMPROVED..."
echo "Building for linux 386..."
CGO_ENABLED=1 CC='i686-linux-musl-gcc' GOOS='linux' GOARCH='386' go build -trimpath -o "$OUTDIR/$PROJECT.linux.386" -buildmode 'pie' -a -tags 'netgo' -ldflags '-s -w -extldflags "-static"'
echo ""
echo "Building for linux amd64..."
CGO_ENABLED=1 CC='x86_64-linux-musl-gcc' GOOS='linux' GOARCH='amd64' go build -trimpath -o "$OUTDIR/$PROJECT.linux.amd64" -buildmode 'pie' -a -tags 'netgo' -ldflags '-s -w -extldflags "-static"'
echo ""
echo "Building for linux arm..."
CGO_ENABLED=1 CC='arm-linux-musleabi-gcc' GOOS='linux' GOARCH='arm' go build -trimpath -o "$OUTDIR/$PROJECT.linux.arm" -buildmode 'pie' -a -tags 'netgo' -ldflags '-s -w -extldflags "-static"'
echo ""
echo "Building for linux arm64..."
CGO_ENABLED=1 CC='aarch64-linux-musl-gcc' GOOS='linux' GOARCH='arm64' go build -trimpath -o "$OUTDIR/$PROJECT.linux.arm64" -buildmode 'pie' -a -tags 'netgo' -ldflags '-s -w -extldflags "-static"'
echo ""
echo "Building for linux mips..."
CGO_ENABLED=1 CC='mips-linux-musl-gcc' GOOS='linux' GOARCH='mips' go build -trimpath -o "$OUTDIR/$PROJECT.linux.mips" -buildmode 'default' -a -tags 'netgo' -ldflags '-s -w -extldflags "-static"'
echo ""
echo "Building for linux ppc64le..."
CGO_ENABLED=1 CC='powerpc64le-linux-musl-gcc' GOOS='linux' GOARCH='ppc64le' go build -trimpath -o "$OUTDIR/$PROJECT.linux.ppc64le" -buildmode 'pie' -a -tags 'netgo' -ldflags '-s -w -extldflags "-static"'
echo ""
echo "PLEASE DON'T JUDGE THIS SCRIPT, IT IS TRULY SO AWFUL. TO BE IMPROVED..."

Loading…
Cancel
Save