Skip to content

Commit d9e3ae1

Browse files
committed
fix: cross compile when building
Signed-off-by: Ji Hwan <[email protected]>
1 parent 950de82 commit d9e3ae1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ cross: $(BUILD_DIR) ## Cross-compile go binaries using CGO.
4141
# - `-s -w` enables to strip debug and suppress warnings.
4242
# - `-linkmode external -extldflags "-static-libgo"` allows dynamic linking.
4343
echo "Building $(BIN_NAME)_$(GIT_TAG)_linux_arm64..."
44+
export CC=arm-linux-gnueabi-gcc
4445
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build \
4546
-ldflags '$(VERSION_FLAGS) -s -w -linkmode external -extldflags "-static-libgo"' \
4647
-tags netgo \

0 commit comments

Comments
 (0)