public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Michael Zimmermann <sigmaepsilon92@gmail.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	"Cohen, Eugene" <eugene@hp.com>
Subject: Re: [PATCH 1/3] ArmPkg/ArmSoftFloatLib: disable LTO build for GCC
Date: Sun, 7 Aug 2016 12:29:30 +0200	[thread overview]
Message-ID: <CAKv+Gu-4fXRSvf==Wz_HUPrYB+Ld=choLLVyTnQ-5E+DfUSpjA@mail.gmail.com> (raw)
In-Reply-To: <CAN9vWDLCiGhaKXkUC89N=FJT_=RiBumGxNNBkhxRN+w-Xs+0GQ@mail.gmail.com>

On 7 August 2016 at 11:28, Michael Zimmermann <sigmaepsilon92@gmail.com> wrote:
> Hi,
>
> I researched a little bit on this topic and it seems that you have to add
> fuse-linker-plugin to the build options to enable lto plugins.
>

I think that is no longer needed.

> I did that and unfortunately it had no effect. After running gcc through
> strace I could see that liblto_plugin.so does get loaded from the
> cross-toolchains libexec directory though.
>
> Does that mean that the toolchain I use (GCC5 from releases.linaro.org and
> GCC6 from git.linaro.org) generates lto objects which it can't process with
> the shipped plugin?
>

The LTO works fine except for these particular objects. The reason is
that the compiler backend generates the function calls, so they are
not visible to the LTO routines. For this exact reason, I added
liblto-arm.a and liblto-aarch64.a to the normal GCC5 builds

> btw, if I compile using my hosts native GCC(x64) but for IA32 I get lto
> errors even for MdePkg. It looks like the fno-lto option is a very bad
> workaround and can break any time using specific configurations.
>

It shouldn't be. In a normal environment (i.e., building glibc apps),
things like libgcc and anything that is implemented in assembler is
included in the build as  non-LTO objects. The problems specific to
ARM and AARCH64 are the intrinsics, due to the issue mentioned above.
Perhaps we have some of those for IA32 as well? Which entry points
does the build complain about?

-- 
Ard.


  reply	other threads:[~2016-08-07 10:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 14:42 [PATCH 0/3] Build fixes for ARM/OpenSSL Ard Biesheuvel
2016-08-04 14:42 ` [PATCH 1/3] ArmPkg/ArmSoftFloatLib: disable LTO build for GCC Ard Biesheuvel
2016-08-06 14:18   ` Michael Zimmermann
2016-08-06 14:42     ` Ard Biesheuvel
2016-08-06 14:53       ` Michael Zimmermann
2016-08-07  9:28         ` Michael Zimmermann
2016-08-07 10:29           ` Ard Biesheuvel [this message]
2016-08-04 14:42 ` [PATCH 2/3] ArmPkg/CompilerIntrinsicsLib: make the default memset() weak Ard Biesheuvel
2016-08-04 14:42 ` [PATCH 3/3] BaseTools GCC/ARM: add -fno-builtin to CC flags Ard Biesheuvel
2016-08-04 16:01   ` Michael Zimmermann
2016-08-05 14:34     ` Ard Biesheuvel
2016-08-05 14:26   ` Gao, Liming
2016-08-05 14:33     ` Ard Biesheuvel
2016-08-05 12:53 ` [PATCH 0/3] Build fixes for ARM/OpenSSL Leif Lindholm

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+Gu-4fXRSvf==Wz_HUPrYB+Ld=choLLVyTnQ-5E+DfUSpjA@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