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