summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2018-07-26 01:24:40 +0200
committerLaszlo Ersek <lersek@redhat.com>2018-08-16 20:18:57 +0200
commit81502cee20ac4046f08bb4aec754c7091c8808dc (patch)
tree361a7419d4278e7b233bb1e70ae89dc8e45ad795 /BaseTools/Source
parentb0ca5dae78ff71397a8ef568f1914da7668ff5a9 (diff)
downloadedk2-81502cee20ac4046f08bb4aec754c7091c8808dc.tar.gz
edk2-81502cee20ac4046f08bb4aec754c7091c8808dc.tar.bz2
edk2-81502cee20ac4046f08bb4aec754c7091c8808dc.zip
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 <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1540244 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r--BaseTools/Source/C/Makefiles/header.makefile3
1 files changed, 3 insertions, 0 deletions
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