build as a static binary for perfect compatibility

This commit is contained in:
ppom 2023-11-05 12:00:00 +01:00
parent 52dc67ed34
commit 1f48964086
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ all: reaction ip46tables
clean: clean:
rm -f reaction ip46tables rm -f reaction ip46tables
ip46tables: ip46tables.d/ip46tables.c 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 reaction: app/* reaction.go go.mod go.sum
go build -buildvcs=false . CGO_ENABLED=0 go build -buildvcs=false .

View File

@ -164,7 +164,7 @@ $ gcc ip46tables.d/ip46tables.c -o ip46tables
Provided binaries in the previous section are compiled this way: Provided binaries in the previous section are compiled this way:
```shell ```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 ### NixOS