Skip to content

Commit

Permalink
hack: remove unnecessary vars in make.sh script
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 877baae)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
crazy-max authored and thaJeztah committed Jan 30, 2023
1 parent 9674623 commit b7e0725
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions hack/make.sh
Expand Up @@ -110,14 +110,8 @@ if [ -z "$DOCKER_DEBUG" ]; then
LDFLAGS='-w'
fi

LDFLAGS_STATIC=''
EXTLDFLAGS_STATIC='-static'
BUILDFLAGS=(${BUILDFLAGS} -tags "netgo osusergo static_build $DOCKER_BUILDTAGS")

LDFLAGS_STATIC_DOCKER="
$LDFLAGS_STATIC
-extldflags \"$EXTLDFLAGS_STATIC\"
"
LDFLAGS_STATIC="-extldflags -static"

if [ "$(uname -s)" = 'FreeBSD' ]; then
# Tell cgo the compiler is Clang, not GCC
Expand Down
2 changes: 1 addition & 1 deletion hack/make/.binary
Expand Up @@ -68,7 +68,7 @@ source "${MAKEDIR}/.go-autogen"
"${BUILDFLAGS[@]}" \
-ldflags "
$LDFLAGS
$LDFLAGS_STATIC_DOCKER
$LDFLAGS_STATIC
$DOCKER_LDFLAGS
" \
${GO_PACKAGE}
Expand Down
2 changes: 1 addition & 1 deletion hack/make/dynbinary-daemon
Expand Up @@ -4,7 +4,7 @@ set -e
[ -z "$KEEPDEST" ] && rm -rf "$DEST"

(
export LDFLAGS_STATIC_DOCKER=''
export LDFLAGS_STATIC=''
export BUILDFLAGS=("${BUILDFLAGS[@]/netgo /}") # disable netgo, since we don't need it for a dynamic binary
export BUILDFLAGS=("${BUILDFLAGS[@]/osusergo /}") # ditto for osusergo
export BUILDFLAGS=("${BUILDFLAGS[@]/static_build /}") # we're not building a "static" binary here
Expand Down
2 changes: 1 addition & 1 deletion hack/make/dynbinary-proxy
Expand Up @@ -3,7 +3,7 @@
set -e

(
export LDFLAGS_STATIC_DOCKER=''
export LDFLAGS_STATIC=''
export BUILDFLAGS=("${BUILDFLAGS[@]/netgo /}") # disable netgo, since we don't need it for a dynamic binary
export BUILDFLAGS=("${BUILDFLAGS[@]/osusergo /}") # ditto for osusergo
export BUILDFLAGS=("${BUILDFLAGS[@]/static_build /}") # we're not building a "static" binary here
Expand Down

0 comments on commit b7e0725

Please sign in to comment.