Fix 32bit arm build
Had to use the hack from https://github.com/golang/go/issues/12443
This commit is contained in:
parent
4da380bbbf
commit
f2cf2b1df1
|
@ -20,7 +20,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential curl git-
|
|||
liblxc1 lxc-dev lxc-templates \
|
||||
gcc-5-aarch64-linux-gnu binutils-aarch64-linux-gnu \
|
||||
libc6-dev-i386 linux-libc-dev:i386 \
|
||||
gcc-5-arm-linux-gnueabi gcc-5-multilib-arm-linux-gnueabi binutils-arm-linux-gnueabi
|
||||
gcc-5-arm-linux-gnueabihf gcc-5-multilib-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
|
||||
|
||||
# Setup go, for development of Nomad
|
||||
SRCROOT="/opt/go"
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
// +build linux,cgo
|
||||
|
||||
// #cgo LDFLAGS: -mfloat-abi=hard
|
||||
|
||||
package main
|
|
@ -33,7 +33,7 @@ if [[ $(uname) == "Linux" ]]; then
|
|||
CGO_ENBALED=1 GOARCH="amd64" GOOS="linux" go build -ldflags "-X $LDFLAG" -o "pkg/linux_amd64-lxc/nomad" -tags "lxc"
|
||||
|
||||
echo "==> Building linux arm..."
|
||||
CC="arm-linux-gnueabi-gcc-5" GOOS=linux GOARCH="arm" CGO_ENABLED=1 go build -ldflags "-X $LDFLAG" -o "pkg/linux_arm/nomad"
|
||||
CC="arm-linux-gnueabihf-gcc-5" GOOS=linux GOARCH="arm" CGO_ENABLED=1 go build -ldflags "-X $LDFLAG" -o "pkg/linux_arm/nomad"
|
||||
|
||||
echo "==> Building linux arm64..."
|
||||
CC="aarch64-linux-gnu-gcc-5" GOOS=linux GOARCH="arm64" CGO_ENABLED=1 go build -ldflags "-X $LDFLAG" -o "pkg/linux_arm64/nomad"
|
||||
|
|
Loading…
Reference in New Issue