From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Rebecca Cran <rebecca@bluestop.org>,
Leif Lindholm <leif.lindholm@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Warnings cross-building AARCH64 package with GCC 6.2.1 (-Wlto-type-mismatch)
Date: Tue, 20 Jun 2017 18:24:55 +0200 [thread overview]
Message-ID: <CAKv+Gu_zuVgnNq1T0CXfP19X_mKdP_h68r9666Xzf=OeumV_aQ@mail.gmail.com> (raw)
In-Reply-To: <20170508184842.000041fb@bluestop.org>
On 9 May 2017 at 02:48, Rebecca Cran <rebecca@bluestop.org> wrote:
> I suspect I should be trying to build AARCH64 stuff with something more
> like gcc 4.8 instead of 6.2.1, but when I did build the
> Overdrive1000Board package I saw lots of warnings complaining about the
> implementation not matching the prototype (with
> the warning being -Wlto-type-mismatch).
>
> I cross-compiled on an OpenSUSE x64 system with
> aarch64-suse-linux-gcc-6, with the commandline:
>
> build -a AARCH64 -t GCC5 -b RELEASE -p
> OpenPlatformPkg/Platforms/AMD/Styx/Overdrive1000Board/Overdrive1000Board.dsc
>
> ArmPlatformPkg is from
> linaro git master, edk2 is tianocore git master
>
> The warnings were all similar to:
>
> /workspace/edk2/MdePkg/Include/Library/BaseMemoryLib.h:462:1:
> warning: type of 'IsZeroGuid' does not match original declaration
> [-Wlto-type-mismatch] IsZeroGuid ( ^
> //workspace/edk2/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c:158:1:
> note: 'IsZeroGuid' was previously declared here IsZeroGuid (
> ^
> /workspace/edk2/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c:158:1:
> note: code may be misoptimized unless -fno-strict-aliasing is used
>
>
>
> Are these real problems, or just because gcc 6.2 and/or LTO aren't ready
> for AARCH64 yet?
>
Hi,
This issue is caused by the fact that some libraries are built with
-mstrict-align on AArch64. This is necessary since code that may
execute with the MMU off should not use unaligned access, which GCC
may emit by default for AArch64 targets.
prev parent reply other threads:[~2017-06-20 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 0:48 Warnings cross-building AARCH64 package with GCC 6.2.1 (-Wlto-type-mismatch) Rebecca Cran
2017-06-20 16:24 ` Ard Biesheuvel [this message]
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_zuVgnNq1T0CXfP19X_mKdP_h68r9666Xzf=OeumV_aQ@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