public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Shi, Steven" <steven.shi@intel.com>,
	"Zhu, Yonghong" <yonghong.zhu@intel.com>,
	 "Gao, Liming" <liming.gao@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	edk2-devel-01 <edk2-devel@lists.01.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>,
	Laszlo Ersek <lersek@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode
Date: Tue, 2 Aug 2016 11:03:06 +0200	[thread overview]
Message-ID: <CAKv+Gu9wSc4XXFCOWYhwSJhd7T2wH_apKYoC-SPEvqpb4UDxrg@mail.gmail.com> (raw)
In-Reply-To: <1470038497-2536-1-git-send-email-ard.biesheuvel@linaro.org>

On 1 August 2016 at 10:01, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> This v5 to introduce GCC5 is now a 8 piece series, including some
> preparatory cleanup patches that allow all GCC4x and CLANG35 toolchains
> to switch to using 'gcc' as the linker. This allows us to get rid of
> the wrapper script to marshall ld arguments in order to make them
> understandable by gcc, which is fragile and likely to cause problems in
> the future.
>
> Since there appears to be a natural split between the 'legacy' GCC
> toolchains UNIXGCC, ELFGCC, and CYGGCC[xASL], both in term of supported
> architectures [IA32, X64, IPF] vs [IA32, X64, ARM, AARCH64], and in
> terms of maintenance, these toolchains are not moved to using 'gcc' as
> the linker, and instead, a new BUILDRULEFAMILY is introduced called GCCLD
> that will retain the old behavior.
>
> The result is that GCC5 can align much more closely with its predecessors,
> making the expected maintenance burden of supporting GCC back to v4.4
> much lower.
>
> Changes since v4:
> - added patch to use 'protected' visibility only for the libraries that
>   define the module entry points (_ModuleEntryPoint), to prevent them from
>   being optimized away by the LTO routines
> - added Jordan's ack/RBs
> - add some extra comments to tools_def.template (#8)
>

Thanks all. Committed as

1c63516075b3 BaseTools CLANG35: drop problematic use-movt and save-temps options
ff54bcdf2e4e ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: ignore .hash
and .note sections
befb3ba51502 BaseTools UNIXGCC ELFGCC CYGGCC: clone GCC build rule
family into GCCLD
a1b8baccc30b BaseTools GCC: use 'gcc' as the linker command for GCC44 and later
e1458aaded8e ArmPkg: add prebuilt glue binaries for GCC5 LTO support
7fd5d619806d BaseTools GCC: drop GNU notes section from EFI image
4a8466d4baba BaseTools GCC: introduce GCC5 toolchain to support GCC
v5.x in LTO mode

with Leif and Liming's R-b. I dropped patch #7, and instead made the
visibility pragma conditional on whether LTO is disabled.

-- 
Ard.


> Changes since v3:
> - like Steven does in his GCC5LTO patch, add -fno-builtin to IA32 and X64
>   CC_FLAGS; this addresses a build issue reported by Liming
> - add -Os the the linker flags as well, for AARCH64 this does not seem to make
>   a difference, but it is arguably correct since the LTO processing at link
>   time involves code generation as well
> - add Laszlo's ack to #2
> - new patch #6 to omit the autogenerated build-id from the PE/COFF binary
>
> Changes since v2:
> - add license headers to LTO glue files for ARM and AARCH64 (#5)
> - get rid of lto-ld-wrapper script
>
> Ard Biesheuvel (8):
>   BaseTools CLANG35: drop problematic use-movt and save-temps options
>   ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: ignore .hash and .note
>     sections
>   BaseTools UNIXGCC ELFGCC CYGGCC: clone GCC build rule family into
>     GCCLD
>   BaseTools GCC: use 'gcc' as the linker command for GCC44 and later
>   ArmPkg: add prebuilt glue binaries for GCC5 LTO support
>   BaseTools GCC: drop GNU notes section from EFI image
>   MdePkg GCC/X64: avoid 'hidden' visibility for module entry points
>   BaseTools GCC: introduce GCC5 toolchain to support GCC v5.x in LTO
>     mode
>
>  ArmPkg/GccLto/liblto-aarch64.a                                         | Bin 0 -> 1016 bytes
>  ArmPkg/GccLto/liblto-aarch64.s                                         |  27 ++
>  ArmPkg/GccLto/liblto-arm.a                                             | Bin 0 -> 2096 bytes
>  ArmPkg/GccLto/liblto-arm.s                                             |  61 ++++
>  ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf                    |   2 +-
>  ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds                                 |   3 +
>  BaseTools/Conf/build_rule.template                                     |  31 +-
>  BaseTools/Conf/tools_def.template                                      | 350 +++++++++++++++-----
>  BaseTools/Scripts/GccBase.lds                                          |   6 +
>  EmulatorPkg/Unix/Host/Host.inf                                         |   6 +-
>  MdePkg/Include/X64/ProcessorBind.h                                     |   9 +-
>  MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf                 |   2 +
>  MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf                 |   2 +
>  MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf                       |   2 +
>  MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf |   2 +
>  MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf           |   2 +
>  16 files changed, 396 insertions(+), 109 deletions(-)
>  create mode 100644 ArmPkg/GccLto/liblto-aarch64.a
>  create mode 100644 ArmPkg/GccLto/liblto-aarch64.s
>  create mode 100644 ArmPkg/GccLto/liblto-arm.a
>  create mode 100644 ArmPkg/GccLto/liblto-arm.s
>
> --
> 2.7.4
>


  parent reply	other threads:[~2016-08-02  9:03 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01  8:01 [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode Ard Biesheuvel
2016-08-01  8:01 ` [PATCH v5 1/8] BaseTools CLANG35: drop problematic use-movt and save-temps options Ard Biesheuvel
2016-08-01  8:01 ` [PATCH v5 2/8] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: ignore .hash and .note sections Ard Biesheuvel
2016-08-01  8:01 ` [PATCH v5 3/8] BaseTools UNIXGCC ELFGCC CYGGCC: clone GCC build rule family into GCCLD Ard Biesheuvel
2016-08-01  8:01 ` [PATCH v5 4/8] BaseTools GCC: use 'gcc' as the linker command for GCC44 and later Ard Biesheuvel
2016-08-01  8:01 ` [PATCH v5 5/8] ArmPkg: add prebuilt glue binaries for GCC5 LTO support Ard Biesheuvel
2016-08-02  8:50   ` Leif Lindholm
2016-08-01  8:01 ` [PATCH v5 6/8] BaseTools GCC: drop GNU notes section from EFI image Ard Biesheuvel
2016-08-01  8:01 ` [PATCH v5 7/8] MdePkg GCC/X64: avoid 'hidden' visibility for module entry points Ard Biesheuvel
2016-08-01 14:18   ` Gao, Liming
2016-08-01 14:49     ` Ard Biesheuvel
2016-08-01 14:56       ` Ard Biesheuvel
2016-08-01 15:51         ` Ard Biesheuvel
2016-08-01 16:11           ` Ard Biesheuvel
2016-08-02  2:39             ` Gao, Liming
2016-08-02  5:26               ` Gao, Liming
2016-08-01  8:01 ` [PATCH v5 8/8] BaseTools GCC: introduce GCC5 toolchain to support GCC v5.x in LTO mode Ard Biesheuvel
2016-08-01 14:01 ` [PATCH v5 0/8] BaseTools: add support for GCC5 " Shi, Steven
2016-08-01 14:04   ` Ard Biesheuvel
2016-08-02  9:03 ` Ard Biesheuvel [this message]
2016-08-02 10:57   ` Laszlo Ersek
2016-08-02 11:13     ` Ard Biesheuvel
2016-08-02 11:41   ` Shi, Steven
2016-08-02 11:42     ` Ard Biesheuvel
2016-08-02 13:55       ` Michael Zimmermann
2016-08-02 13:56         ` Ard Biesheuvel
2016-08-02 14:39           ` Michael Zimmermann
2016-08-02 14:46             ` Michael Zimmermann
2016-08-02 14:51               ` Michael Zimmermann
2016-08-02 14:47             ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKv+Gu9wSc4XXFCOWYhwSJhd7T2wH_apKYoC-SPEvqpb4UDxrg@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox