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

Remove -lpthread and -ldl from ldflags

There is no need in those flags now when we use amalgamated sqlite3 from
mattn/go-sqlite3.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov 2015-09-08 11:29:43 -07:00
parent a8d6b033e1
commit 8845eb4345
4 changed files with 5 additions and 8 deletions

View file

@ -150,12 +150,9 @@ BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" )
: ${TIMEOUT:=60m}
TESTFLAGS+=" -test.timeout=${TIMEOUT}"
# A few more flags that are specific just to building a completely-static binary (see hack/make/binary)
# PLEASE do not use these anywhere else.
EXTLDFLAGS_STATIC_DOCKER="$EXTLDFLAGS_STATIC -lpthread -ldl"
LDFLAGS_STATIC_DOCKER="
$LDFLAGS_STATIC
-extldflags \"$EXTLDFLAGS_STATIC_DOCKER\"
-extldflags \"$EXTLDFLAGS_STATIC\"
"
if [ "$(uname -s)" = 'FreeBSD' ]; then

View file

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

View file

@ -13,7 +13,7 @@ fi
(
export IAMSTATIC="false"
export EXTLDFLAGS_STATIC_DOCKER=''
export EXTLDFLAGS_STATIC=''
export LDFLAGS_STATIC_DOCKER=''
export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
export BUILDFLAGS=( "${BUILDFLAGS[@]/static_build /}" ) # we're not building a "static" binary here

View file

@ -8,14 +8,14 @@ BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
source "${MAKEDIR}/.go-autogen"
if [[ "${BUILDFLAGS[@]}" =~ 'netgo ' ]]; then
EXTLDFLAGS_STATIC_DOCKER+=' -lnetgo'
EXTLDFLAGS_STATIC+=' -lnetgo'
fi
go build -compiler=gccgo \
-o "$DEST/$BINARY_FULLNAME" \
"${BUILDFLAGS[@]}" \
-gccgoflags "
-g
$EXTLDFLAGS_STATIC_DOCKER
$EXTLDFLAGS_STATIC
-Wl,--no-export-dynamic
-ldl
" \