|
|
285b94 |
From c1a087a76d91665433f190d0468be2b33da443cd Mon Sep 17 00:00:00 2001
|
|
|
285b94 |
From: Laszlo Ersek <lersek@redhat.com>
|
|
|
285b94 |
Date: Thu, 26 Jul 2018 01:24:40 +0200
|
|
|
285b94 |
Subject: [PATCH] BaseTools/Source/C: take EXTRA_LDFLAGS from the caller
|
|
|
285b94 |
|
|
|
285b94 |
Allow the caller of the top-level makefile either to set EXTRA_LDFLAGS in
|
|
|
285b94 |
the environment or to pass EXTRA_LDFLAGS as a macro definition on the
|
|
|
285b94 |
command line. EXTRA_LDFLAGS extends (and potentially overrides) default
|
|
|
285b94 |
link-editing flags set in the makefiles.
|
|
|
285b94 |
|
|
|
285b94 |
Cc: Liming Gao <liming.gao@intel.com>
|
|
|
285b94 |
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
|
|
|
285b94 |
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1540244
|
|
|
285b94 |
Contributed-under: TianoCore Contribution Agreement 1.1
|
|
|
285b94 |
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
285b94 |
Reviewed-by: Liming Gao <liming.gao@intel.com>
|
|
|
285b94 |
(cherry picked from commit 81502cee20ac4046f08bb4aec754c7091c8808dc)
|
|
|
285b94 |
---
|
|
|
285b94 |
BaseTools/Source/C/Makefiles/header.makefile | 3 +++
|
|
|
285b94 |
1 file changed, 3 insertions(+)
|
|
|
285b94 |
|
|
|
285b94 |
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
|
|
|
285b94 |
index 1b4cad5497..7f283d6464 100644
|
|
|
285b94 |
--- a/BaseTools/Source/C/Makefiles/header.makefile
|
|
|
285b94 |
+++ b/BaseTools/Source/C/Makefiles/header.makefile
|
|
|
285b94 |
@@ -99,6 +99,9 @@ endif
|
|
|
285b94 |
BUILD_CFLAGS += $(BUILD_OPTFLAGS)
|
|
|
285b94 |
BUILD_CXXFLAGS += $(BUILD_OPTFLAGS)
|
|
|
285b94 |
|
|
|
285b94 |
+# keep EXTRA_LDFLAGS last
|
|
|
285b94 |
+BUILD_LFLAGS += $(EXTRA_LDFLAGS)
|
|
|
285b94 |
+
|
|
|
285b94 |
.PHONY: all
|
|
|
285b94 |
.PHONY: install
|
|
|
285b94 |
.PHONY: clean
|