diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-08-11 12:57:53 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-08-12 09:01:58 +0200 |
commit | 6f8ecc41d75338826d208db1638814fa598fdf9d (patch) | |
tree | 4bcb5b41df548053fdb9f85847d82193bd55b09f /BaseTools/Conf | |
parent | f358703983c37c388479d0ff78a9f26b211e151f (diff) | |
download | edk2-6f8ecc41d75338826d208db1638814fa598fdf9d.tar.gz edk2-6f8ecc41d75338826d208db1638814fa598fdf9d.tar.bz2 edk2-6f8ecc41d75338826d208db1638814fa598fdf9d.zip |
BaseTools ARM AARCH64: pass CC flags to linker for XIP modules as well
Commit 478f50990a ("BaseTools GCC: add the compiler flags to the linker
command line") added the compiler flags to the linker command line,
which is required for LTO to function correctly, since it involves code
generation at link time.
This patch failed to update the build rules for XIP modules on AARCH64,
which not only requires the ordinary CC flags but also the XIP CC flags
to prevent the LTO backend to, e.g., emit code that does not adhere to
the strict alignment rules we impose for code that may execute with the
MMU off.
So update the XIP link rules as well. Since AARCH64 and ARM are not
supported by any toolchains in the GCCLD build rule family, drop the
reference to GCCLD while we're at it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Conf')
-rwxr-xr-x | BaseTools/Conf/build_rule.template | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template index 6191957e0e..7e2c6a9658 100755 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -310,7 +310,7 @@ "$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -filelist $(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
-[Static-Library-File.SEC.AARCH64, Static-Library-File.PEI_CORE.AARCH64, Static-Library-File.PEIM.AARCH64]
+[Static-Library-File.SEC.AARCH64, Static-Library-File.PEI_CORE.AARCH64, Static-Library-File.PEIM.AARCH64,Static-Library-File.SEC.ARM, Static-Library-File.PEI_CORE.ARM, Static-Library-File.PEIM.ARM]
<InputFile>
*.lib
@@ -320,8 +320,8 @@ <OutputFile>
$(DEBUG_DIR)(+)$(MODULE_NAME).dll
- <Command.GCC, Command.GCCLD>
- "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(DLINK2_FLAGS)
+ <Command.GCC>
+ "$(DLINK)" -o ${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) -Wl,--start-group,@$(STATIC_LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(CC_XIPFLAGS) $(DLINK2_FLAGS)
"$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
|