Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Statically link the toolbox binary
The Go implementation of Toolbox uses in few places code written in C (not directly in the Toolbox code but in some library). This causes Toolbox to be dynamically linked to the systems C library (libc). Under other circumstances this would not be a problem but Toolbox itself is being used as the entry-point of toolbox containers. The most widely used implementation of libc is glibc. Its versions seem to be backwards-compatible but not forward-compatible, making Toolbox unusable in older distros that ship a previous version of glibc. One of the solutions is to statically link libc (resp. glibc) which is what this commit does. The size of the final binary seems to not be affected. https://golang.org/pkg/os/user/ https://golang.org/cmd/cgo/
- Loading branch information