On 17 August 2015 at 20:37, Scott Duplichan <sc...@notabs.org> wrote:
> Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]  wrote:
>
> ]Sent: Monday, August 17, 2015 09:25 AM
> ]To: edk2-de...@ml01.01.org; yingke.d....@intel.com
> ]Cc: wp...@windriver.com; sc...@notabs.org; Ard Biesheuvel 
> <ard.biesheu...@linaro.org>; jordan.l.jus...@intel.com; 
> ]liming....@intel.com; dw...@infradead.org
> ]Subject: [edk2] [PATCH v2 00/16] unify GCC command line options
> ]
> ]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 #1 is a patch from Scott that I am reposting, but updated to cover
> ]AARCH64 as well.
> ]
> ]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 changes the way the start of the .data section is set in 
> GccBase.lds.
> ]This is needed since the linker will reorganize the internal layout of the 
> .data
> ]section rather than update its start address to ensure all objects that it
> ]contains meet their respective alignments, even if the start address is not
> ]aligned to the max value of all inputs.
> ]
> ]Patch #10 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 #11 unifies the IA32 and X64 linker flags for all toolchains listed 
> above.
> ]
> ]Patch #12 unifies the ARM and AARCH64 CC flags, i.e., it removes all the
> ]redundant definitions.
> ]
> ]Patch #13 as #11 but for the linker.
> ]
> ]Patch #14 unifies the ASM flags for all archs.
> ]
> ]Patch #15 brings the remaining configuration options of ELFGCC in line with
> ]the GCC4x series.
> ]
> ]Patch #16 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.
> ]
> ]Changes since v1:
> ]- added patch #9 to address the IA32 and X86 failures on 4.9 reported by 
> Scott
> ]- don't pass -mno-unaligned-access to ARM 4.6 compiler (Scott)
> ]- improved wording of commit messages of various patches
> ]- rebased onto latest upstream, which includes a fix related to the ARM 4.6
> ]  issue mentioned above
> ]
> ]Branch can be found here
> ]https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/shortlog/refs/heads/unify-gcc-v2
> ]
> ]Ard Biesheuvel (15):
> ]  BaseTools/GenFv: use PE/COFF virtual section size if raw size is
> ]    larger
> ]  BaseTools GCC: remove unused definition of GCC_WINDRES_FLAGS
> ]  BaseTools GCC: merge warning flags for all GCC versions
> ]  BaseTools GCC: refactor tools_def internal GCC defines for CC flags
> ]  BaseTools GCC: unify all IA32 and X64 CC flags for ELF based GCC
> ]  BaseTools GCC: use leading underscore for symbol names where
> ]    appropriate
> ]  BaseTools GCC: refactor tools_def internal GCC defines for [AS]DLINK
> ]  BaseTools GCC: don't set .data address explicitly
> ]  BaseTools GCC: remove GCC 4.9 specific linker alignment override
> ]  BaseTools GCC: unify all IA32 and X64 [AS]DLINK[2] flags for ELF based
> ]    GCC
> ]  BaseTools GCC: unify ARM and AARCH64 GCC compiler flags
> ]  BaseTools GCC: unify ARM and AARCH64 DLINK flags for all GCC versions
> ]  BaseTools GCC: unify ASM flags for all GCC versions
> ]  BaseTools GCC: align ELFGCC with GCC4x toolchains
> ]  OvmfPkg/X64: enable 4 KB alignment for DXE_RUNTIME modules
> ]
> ]Scott Duplichan (1):
> ]  BaseTools GCC: Fix GCC49 build failure
> ]
> ] BaseTools/Conf/tools_def.template           | 412 ++++++++------------
> ] BaseTools/Scripts/GccBase.lds               |   3 +-
> ] BaseTools/Source/C/GenFv/GenFvInternalLib.c |   2 +-
> ] OvmfPkg/OvmfPkgX64.dsc                      |   7 +
> ] 4 files changed, 183 insertions(+), 241 deletions(-)
> ]
> ]--
> ]1.9.1
>
>
> With this v2 version of patch set, the previous test using Windows
> hosted GCC44-GCC49 from sourceforge passes all 228 build tests.
>

Thanks a lot Scott, that is very helpful

-- 
Ard.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to