summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-02 16:31:26 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-08-03 17:41:59 +0200
commit478f50990a9a3b76524fd14f2085b9f1127fa41a (patch)
tree9e3504088f787668dc0664b1b703b5fdbbca0af4
parentf8d0b9662993796e89c200e9eaf38d1f54e5dd37 (diff)
downloadedk2-478f50990a9a3b76524fd14f2085b9f1127fa41a.tar.gz
edk2-478f50990a9a3b76524fd14f2085b9f1127fa41a.tar.bz2
edk2-478f50990a9a3b76524fd14f2085b9f1127fa41a.zip
BaseTools GCC: add the compiler flags to the linker command line
Now that we invoke GCC as the linker for the GCC toolchain family, we can pass the CC flags to the linker as well. This is only required for LTO (which may involve code generation during the link stage), but does not interfere with non-LTO builds. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
-rw-r--r--BaseTools/Conf/build_rule.template2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index c6de768197..f52f603b27 100644
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -292,7 +292,7 @@
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
<Command.GCC>
- "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(DLINK2_FLAGS)
+ "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(DLINK2_FLAGS)
"$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
<Command.GCCLD>