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:
parent
00eddf5e67
commit
bcd5e20a09
2 changed files with 4 additions and 0 deletions
|
@ -12,6 +12,7 @@ go build --compiler=gccgo \
|
|||
-g
|
||||
-Wl,--no-export-dynamic
|
||||
$EXTLDFLAGS_STATIC_DOCKER
|
||||
-lnetgo
|
||||
" \
|
||||
./dockerinit
|
||||
|
||||
|
|
|
@ -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[@]}" \
|
||||
|
|
Loading…
Reference in a new issue