From 1f48964086ca4820361a0e4cc7ad22683638c9d1 Mon Sep 17 00:00:00 2001 From: ppom <> Date: Sun, 5 Nov 2023 12:00:00 +0100 Subject: [PATCH] build as a static binary for perfect compatibility --- Makefile | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8d340db..e063026 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ all: reaction ip46tables clean: rm -f reaction ip46tables ip46tables: ip46tables.d/ip46tables.c - gcc ip46tables.d/ip46tables.c -o ip46tables + gcc -static ip46tables.d/ip46tables.c -o ip46tables reaction: app/* reaction.go go.mod go.sum - go build -buildvcs=false . + CGO_ENABLED=0 go build -buildvcs=false . diff --git a/README.md b/README.md index 2e66e3a..83e5df2 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ $ gcc ip46tables.d/ip46tables.c -o ip46tables Provided binaries in the previous section are compiled this way: ```shell -$ docker run -it --rm -v (pwd):/code -w /code golang:1.20-bullseye make +$ docker run -it --rm -v (pwd):/code -w /code -e CGO_ENABLED=0 golang:1.20 make ``` ### NixOS