From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B266B21A07AA1 for ; Tue, 20 Jun 2017 09:23:33 -0700 (PDT) Received: by mail-io0-x235.google.com with SMTP id k93so87909523ioi.2 for ; Tue, 20 Jun 2017 09:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=H8fj91CFJaO1IB9u5L3kc3gqJvisiS/PW/B9cY/XmdI=; b=kdKcN3J5+Xl8Nlqlxmmen3QrTRRG2YAsynAtHJscx0b5qAUfRo8x0KAqOdIH2RigSW H4+t4G1Q0x+53c2FCpaxrmuxCPsfNHh2PELzzpWVizbD5aLR+Maq5fMj9H+nODqSvUX9 butsZDxSypREQwiH7qi3f2if9jSYxtZV50W2Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=H8fj91CFJaO1IB9u5L3kc3gqJvisiS/PW/B9cY/XmdI=; b=dsW/cK+Epj8cPlUajBvzH82CaTQQmQSpyiPBZQH9953wgloEWsOC3BxlFeOJ4q7J6s iZm/CbqGsBL8HkAsjl4NvYpXXn/sofTgTJU/abXUYXmYLBWrOWiKSjC+PakZVBlUlPER 9vQqCRDNGeztsx8wLMN26RyyO4bkJDU/OCZ/c9LyVi/8iYCWAKb3dTcqW8hHxdRqxpsF eHD9768sHgSe8t65eaF6ZSTxcyzuo7KSuKhrqlCGNhReog6CnjDPH/JqWFn56kpBp9tx hit6dWe0+AkS4u+x9YuHBQBWL2uY6WgQntZqyl3oC2uLOrk/q2IHbzHIAbkxlUhGlxh1 1Hbg== X-Gm-Message-State: AKS2vOzDAl/W7RmBSQIrx+1fPNY/6VyzOOxQZiye1ma5O/VKFUih2ugq Vg1UJ2RGFQkjKR5q6cW1fFsMYEVa/Mkk X-Received: by 10.107.35.83 with SMTP id j80mr25575950ioj.72.1497975895734; Tue, 20 Jun 2017 09:24:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.164.76 with HTTP; Tue, 20 Jun 2017 09:24:55 -0700 (PDT) In-Reply-To: <20170508184842.000041fb@bluestop.org> References: <20170508184842.000041fb@bluestop.org> From: Ard Biesheuvel Date: Tue, 20 Jun 2017 18:24:55 +0200 Message-ID: To: Rebecca Cran , Leif Lindholm Cc: "edk2-devel@lists.01.org" Subject: Re: Warnings cross-building AARCH64 package with GCC 6.2.1 (-Wlto-type-mismatch) X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 16:23:34 -0000 Content-Type: text/plain; charset="UTF-8" On 9 May 2017 at 02:48, Rebecca Cran 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.