mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Tweak cross compilation Make
Only use cross compile if not compiling in target architecture. Also, use the latest gcc for cross compilation.
This commit is contained in:
10
GNUmakefile
10
GNUmakefile
@@ -72,8 +72,14 @@ endif
|
||||
CC=$(CC) \
|
||||
go build -trimpath -ldflags $(GO_LDFLAGS) -tags "$(GO_TAGS)" -o $(GO_OUT)
|
||||
|
||||
pkg/linux_arm/nomad: CC = arm-linux-gnueabihf-gcc-5
|
||||
pkg/linux_arm64/nomad: CC = aarch64-linux-gnu-gcc-5
|
||||
ifneq (armv7l,$(THIS_ARCH))
|
||||
pkg/linux_arm/nomad: CC = arm-linux-gnueabihf-gcc
|
||||
endif
|
||||
|
||||
ifneq (aarch64,$(THIS_ARCH))
|
||||
pkg/linux_arm64/nomad: CC = aarch64-linux-gnu-gcc
|
||||
endif
|
||||
|
||||
pkg/windows_%/nomad: GO_OUT = $@.exe
|
||||
|
||||
# Define package targets for each of the build targets we actually have on this system
|
||||
|
||||
@@ -31,9 +31,9 @@ apt-get install -y \
|
||||
apt-get install -y \
|
||||
binutils-aarch64-linux-gnu \
|
||||
binutils-arm-linux-gnueabihf \
|
||||
gcc-5-aarch64-linux-gnu \
|
||||
gcc-5-arm-linux-gnueabihf \
|
||||
gcc-5-multilib-arm-linux-gnueabihf
|
||||
gcc-aarch64-linux-gnu \
|
||||
gcc-arm-linux-gnueabihf \
|
||||
gcc-multilib-arm-linux-gnueabihf
|
||||
|
||||
# Install Windows build utilities
|
||||
apt-get install -y \
|
||||
|
||||
Reference in New Issue
Block a user