From 43cbdf89e9142b9b8cb54fb0932e4c7a45f1daeb Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Wed, 12 Aug 2020 16:24:00 +0900 Subject: [PATCH] BUILDING.md: fix description about static builds * `-linkmode external` is required since Go 1.15 for static builds: https://github.com/golang/go/issues/40711 * Clarify the meaning of "loading plugins" Signed-off-by: Akihiro Suda --- BUILDING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 7a37e1602..556172fde 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -117,13 +117,13 @@ You can build static binaries by providing a few variables to `make`: ```sudo make EXTRA_FLAGS="-buildmode pie" \ - EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' \ + EXTRA_LDFLAGS='-linkmode external -extldflags "-fno-PIC -static"' \ BUILDTAGS="netgo osusergo static_build" ``` > *Note*: > - static build is discouraged -> - static containerd binary does not support loading plugins +> - static containerd binary does not support loading shared object plugins (`*.so`) # Via Docker container