github.com/shiroyuki/docker@v1.9.0/hack/make/gccgo (about)

     1  #!/bin/bash
     2  set -e
     3  
     4  BINARY_NAME="docker-$VERSION"
     5  BINARY_EXTENSION="$(binary_extension)"
     6  BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
     7  
     8  source "${MAKEDIR}/.go-autogen"
     9  
    10  if [[ "${BUILDFLAGS[@]}" =~ 'netgo ' ]]; then
    11  	EXTLDFLAGS_STATIC+=' -lnetgo'
    12  fi
    13  go build -compiler=gccgo \
    14  	-o "$DEST/$BINARY_FULLNAME" \
    15  	"${BUILDFLAGS[@]}" \
    16  	-gccgoflags "
    17  		-g
    18  		$EXTLDFLAGS_STATIC
    19  		-Wl,--no-export-dynamic
    20  		-ldl
    21  	" \
    22  	./docker
    23  
    24  echo "Created binary: $DEST/$BINARY_FULLNAME"
    25  ln -sf "$BINARY_FULLNAME" "$DEST/docker$BINARY_EXTENSION"
    26  
    27  hash_files "$DEST/$BINARY_FULLNAME"