Blame SOURCES/edk2-BaseTools-Source-C-take-EXTRA_LDFLAGS-from-the-calle.patch

cc9195
From 7ad1348d09a32c467229ee8bef98a09e47b5a708 Mon Sep 17 00:00:00 2001
cc9195
From: Laszlo Ersek <lersek@redhat.com>
cc9195
Date: Wed, 29 Aug 2018 17:12:02 +0200
cc9195
Subject: [PATCH 5/7] BaseTools/Source/C: take EXTRA_LDFLAGS from the caller
cc9195
cc9195
Message-id: <20180829151204.26958-6-lersek@redhat.com>
cc9195
Patchwork-id: 81965
cc9195
O-Subject:  [RHEL8/virt212 edk2 PATCH 5/7] BaseTools/Source/C: take EXTRA_LDFLAGS
cc9195
	from the caller
cc9195
Bugzilla: 1607906
cc9195
Acked-by: Thomas Huth <thuth@redhat.com>
cc9195
Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
cc9195
cc9195
Allow the caller of the top-level makefile either to set EXTRA_LDFLAGS in
cc9195
the environment or to pass EXTRA_LDFLAGS as a macro definition on the
cc9195
command line. EXTRA_LDFLAGS extends (and potentially overrides) default
cc9195
link-editing flags set in the makefiles.
cc9195
cc9195
Cc: Liming Gao <liming.gao@intel.com>
cc9195
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
cc9195
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1540244
cc9195
Contributed-under: TianoCore Contribution Agreement 1.1
cc9195
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
cc9195
Reviewed-by: Liming Gao <liming.gao@intel.com>
cc9195
(cherry picked from commit 81502cee20ac4046f08bb4aec754c7091c8808dc)
cc9195
---
cc9195
 BaseTools/Source/C/Makefiles/header.makefile | 3 +++
cc9195
 1 file changed, 3 insertions(+)
cc9195
cc9195
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
cc9195
index 1b4cad5..7f283d6 100644
cc9195
--- a/BaseTools/Source/C/Makefiles/header.makefile
cc9195
+++ b/BaseTools/Source/C/Makefiles/header.makefile
cc9195
@@ -99,6 +99,9 @@ endif
cc9195
 BUILD_CFLAGS   += $(BUILD_OPTFLAGS)
cc9195
 BUILD_CXXFLAGS += $(BUILD_OPTFLAGS)
cc9195
   
cc9195
+# keep EXTRA_LDFLAGS last
cc9195
+BUILD_LFLAGS += $(EXTRA_LDFLAGS)
cc9195
+
cc9195
 .PHONY: all
cc9195
 .PHONY: install
cc9195
 .PHONY: clean
cc9195
-- 
cc9195
1.8.3.1
cc9195