Pass system LDFLAGS by default
A lot of build system pass LDFLAGS they assume the compiler will use later on. This could enable important features such as RELRO being enabled.
This commit is contained in:
parent
06a0c38805
commit
e828a9510d
4
Makefile
4
Makefile
@ -28,8 +28,8 @@ BUILTIN_LD_FLAGS += -s
|
||||
BUILTIN_LD_FLAGS += -w
|
||||
endif
|
||||
# EXTRA_LD_FLAGS are given by the caller, and are passed to the Go linker after
|
||||
# BUILTIN_LD_FLAGS are processed.
|
||||
EXTRA_LD_FLAGS =
|
||||
# BUILTIN_LD_FLAGS are processed. By default the system LDFLAGS are passed.
|
||||
EXTRA_LD_FLAGS ?= -extldflags ${LDFLAGS}
|
||||
# LD_FLAGS is the union of the above two BUILTIN_LD_FLAGS and EXTRA_LD_FLAGS.
|
||||
LD_FLAGS = $(BUILTIN_LD_FLAGS) $(EXTRA_LD_FLAGS)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user