Skip to content

Commit 24d53cf

Browse files
authored
Merge pull request #3545 from hartzell/extldflags-fix
Don't set -extldflags unless LDFLAGS has a value
2 parents f34fd84 + b1db456 commit 24d53cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ BUILTIN_LD_FLAGS += -w
2929
endif
3030
# EXTRA_LD_FLAGS are given by the caller, and are passed to the Go linker after
3131
# BUILTIN_LD_FLAGS are processed. By default the system LDFLAGS are passed.
32+
ifdef LDFLAGS
3233
EXTRA_LD_FLAGS ?= -extldflags ${LDFLAGS}
34+
endif
3335
# LD_FLAGS is the union of the above two BUILTIN_LD_FLAGS and EXTRA_LD_FLAGS.
3436
LD_FLAGS = $(BUILTIN_LD_FLAGS) $(EXTRA_LD_FLAGS)
3537

0 commit comments

Comments
 (0)