This got a bit out of hand after I noticed the ELFGCC and UNIXGCC toolchains that needed some tlc as well.
Anyway, this series aims to refactor the toolchains definitions for UNIXGCC, GCC44, GCC45, GCC46, GCC47, GCC48, GCC49, CLANG35, ELFGCC, CYGGCC and CYGGCCxASL so that they share as much of the settings as possible. Currently, there is very little coordination between these, which means for instance that the 4 KB alignment feature is only supported on GCC4x at the moment. The primary difference between these toolchains is that GCC4x and ELFGCC are entirely ELF based, whereas the other are PE/COFF based (but only when building for IA32 or X64) Note that this series does not remove any toolchains, nor should it result in major changes in the command lines that are passed to the various tools. However, things may be reordered, and (in case of ELFGCC), missing functionality such as increased section alignment has been added so there are some changes there. Patch #2 fixes a problem in the GenFv tool where it may access unallocated memory while rebasing the FFS when using large section and file alignment. Patch #3 removes an unused DEFINE from tools_def Patch #4 moved some warning flags that were applied to GCC4x 4.6 and up to all GCC versions. Patch #5 is the first big refactor patch that introduces PE and ELF variants for some CC flags. Patch #6 unifies the IA32 and X64 CC flags for all toolchains listed above. Patch #7 fixes the issue mentioned by Bill where the underscore decoration is erroneously applied on X64 as well. Patch #8 is the second refactor the introduces PE and ELF variants for the various DLINK flags. Patch #9 removes the explicit 64 byte alignment applied to GCC 4.9. The latest GenFw and linker script propagate the alignment automatically, i.e., if objects with such alignment requirement are present, GCC will set the ELF header accordingly, and this value will be used for the PE/COFF section alignment as well. Patch #10 unifies the IA32 and X64 linker flags for all toolchains listed above. Patch #11 unifies the ARM and AARCH64 CC flags, i.e., it removes all the redundant definitions. Patch #12 and #10 but for the linker. Patch #13 unifies the ASM flags for all archs. Patch #14 brings the remaining configuration options of ELFGCC in line with the GCC4x series. Patch #15 is a PoC that allows Ovmf/X64 to be built with 4 KB section alignment for DXE_RUNTIME modules using UNIXGCC and ELFGCC, as is required to support the properties table memprotection feature. Branch can be found here https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/shortlog/refs/heads/unify-gcc Ard Biesheuvel (14): BaseTools/GenFv: use PE/COFF virtual section size if raw size is larger BaseTools: remove unused definition of GCC_WINDRES_FLAGS BaseTools: merge warning flags for all GCC versions BaseTools GCC: refactor tools_def internal GCC defines for CC flags BaseTools: unify all IA32 and X64 CC flags for ELF based GCC BaseTools: use leading underscore for symbol names where appropriate BaseTools GCC: refactor tools_def internal GCC defines for [AS]DLINK BaseTools: remove GCC 4.9 specific linker alignment override BaseTools: unify all IA32 and X64 [AS]DLINK[2] flags for ELF based GCC BaseTools: unify ARM and AARCH64 GCC compiler flags BaseTools: unify ARM and AARCH64 DLINK flags for all GCC versions BaseTools: unify ASM flags for all GCC versions BaseTools: align ELFGCC with GCC4x toolchains OvmfPkg/X64: enable 4 KB alignment for DXE_RUNTIME modules Scott Duplichan (1): BaseTools: Fix GCC49 build failure BaseTools/Conf/tools_def.template | 412 ++++++++------------ BaseTools/Source/C/GenFv/GenFvInternalLib.c | 2 +- OvmfPkg/OvmfPkgX64.dsc | 7 + 3 files changed, 181 insertions(+), 240 deletions(-) -- 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel