From: Laszlo Ersek Date: Wed, 25 Jul 2018 23:24:40 +0000 (+0200) Subject: BaseTools/Source/C: take EXTRA_LDFLAGS from the caller X-Git-Tag: edk2-stable201903~1199 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=81502cee20ac4046f08bb4aec754c7091c8808dc;p=mirror_edk2.git BaseTools/Source/C: take EXTRA_LDFLAGS from the caller Allow the caller of the top-level makefile either to set EXTRA_LDFLAGS in the environment or to pass EXTRA_LDFLAGS as a macro definition on the command line. EXTRA_LDFLAGS extends (and potentially overrides) default link-editing flags set in the makefiles. Cc: Liming Gao Cc: Yonghong Zhu Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1540244 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile index 1b4cad5497..7f283d6464 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -99,6 +99,9 @@ endif BUILD_CFLAGS += $(BUILD_OPTFLAGS) BUILD_CXXFLAGS += $(BUILD_OPTFLAGS) +# keep EXTRA_LDFLAGS last +BUILD_LFLAGS += $(EXTRA_LDFLAGS) + .PHONY: all .PHONY: install .PHONY: clean