1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Enable "netgo" library when we build a static binary with gccgo

Signed-off-by: Tatsushi Inagaki <e29253@jp.ibm.com>
This commit is contained in:
Tatsushi Inagaki 2015-04-08 04:41:03 -04:00
parent 00eddf5e67
commit bcd5e20a09
2 changed files with 4 additions and 0 deletions

View file

@ -12,6 +12,7 @@ go build --compiler=gccgo \
-g
-Wl,--no-export-dynamic
$EXTLDFLAGS_STATIC_DOCKER
-lnetgo
" \
./dockerinit

View file

@ -8,6 +8,9 @@ BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
source "$(dirname "$BASH_SOURCE")/.go-autogen"
if [[ "${BUILDFLAGS[@]}" =~ 'netgo ' ]]; then
EXTLDFLAGS_STATIC_DOCKER+=' -lnetgo'
fi
go build -compiler=gccgo \
-o "$DEST/$BINARY_FULLNAME" \
"${BUILDFLAGS[@]}" \