From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (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 673031A1DEB for ; Tue, 2 Aug 2016 07:47:01 -0700 (PDT) Received: by mail-it0-x22f.google.com with SMTP id u186so274090508ita.0 for ; Tue, 02 Aug 2016 07:47:01 -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=3nhZXDe1n2Evn72WAsEbmrr7uP1zQSR4dBn3iAg9tsE=; b=K/CIC4yYVuLuilSxPr1+54M9osaS9Og3tVqNzcpaOCdh0iQs9XPfCCWyhaKyeo6MBB hc/zoQwzwdiX1GuisSwzY3/4y0f/ljD2EQrcmDB5LoCatvZCRADtJiAL0MkVxxPfVb8Z 0+p15tVPXV7oyoQ1KnpsxDAph0xHVAi/GC3jM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3nhZXDe1n2Evn72WAsEbmrr7uP1zQSR4dBn3iAg9tsE=; b=O2iVbxdotra3ZlXzo8Wgj9D+HJE/HZj9lBx8TcNTmDiKWlJ+rfdBeRxPSzOgBO2dAO fvBxeMY8qPjwBCVCAiE4qOfO2xSkbAFLpCNspTiaTPeFKdiZXaJ1Tk3vQXjYTBAipf/r UXtdSukJHgsHReAhuSifN2l8AouvA/moSjR0+pPdrKrcEir3hLCO5RZZWwE/+6dF3ilJ YlMb51/wROcUxKLtZrnwyvYn2RKzdQwc74nnb3NFJy7NhB5fYuQvtcUWgX51OOh7kPAU tzxjOW8aOPWGRhVB34XOS098spo23KzrxlKIknCcNLqE6I3/UhfY8ONLWv9oU2SRrc19 UYVQ== X-Gm-Message-State: AEkoouvtYumJ64HOdbSzxEkv1EtXBPdlLml5WvpqHwrFq4GhMNidigxoVWn6zvMsHGE3yR1fFDHyKT8D0GYVjsmf X-Received: by 10.36.57.215 with SMTP id l206mr20914054ita.5.1470149220609; Tue, 02 Aug 2016 07:47:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Tue, 2 Aug 2016 07:47:00 -0700 (PDT) In-Reply-To: References: <1470038497-2536-1-git-send-email-ard.biesheuvel@linaro.org> <06C8AB66E78EE34A949939824ABE2B3103383880@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Tue, 2 Aug 2016 16:47:00 +0200 Message-ID: To: Michael Zimmermann Cc: "Shi, Steven" , "Justen, Jordan L" , edk2-devel-01 , Leif Lindholm , "Gao, Liming" , Laszlo Ersek Subject: Re: [PATCH v5 0/8] BaseTools: add support for GCC5 in LTO mode X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 14:47:01 -0000 Content-Type: text/plain; charset=UTF-8 On 2 August 2016 at 16:39, Michael Zimmermann wrote: > Sry for the late reply but I tried your latest gcc-lto branch to make sure > my answers are still correct. > I tested it with all configurations(StdLib:X64/ARM, Ovmf:X64, ArmVirtPkg:ARM > with both RELEASE and DEBUG). > In StdLib are many warnings actually. That's because of > -Wunused-const-variable and -Wmisleading-indentation. > Also I had to apply the commit to fix 'Unsupported ELF EM_X86_64 relocation > 0x4.' for X64. > Only 0x4 or 0x9 or others as well? This is relevent since 0x4 is a PLT relocation which can be fixed up easily. The GOT based ones are trickier since they involve a GOT entry with an absolute symbol address that needs to be fixed up by the PE/COFF loader > '-b RELEASE -a ARM -t GCC5 -p AppPkg/AppPkg.dsc' is the only configuration I > can't get to compile with gcc6(DEBUG works): > /tmp/ccYJi1bO.ltrans0.ltrans.o: In function `memmove': > :(.text+0x3670): multiple definition of `memmove' > /media/Data/repositories/git/efidroid/testing/linuxtoolchain/edk2/Build/AppPkg/RELEASE_GCC5/ARM/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib/OUTPUT/CompilerIntrinsicsLib.lib(memmove.obj):(.text+0x0): > first defined here > /tmp/ccYJi1bO.ltrans0.ltrans.o: In function `memset': > :(.text+0x3674): multiple definition of `memset' > /media/Data/repositories/git/efidroid/testing/linuxtoolchain/edk2/Build/AppPkg/RELEASE_GCC5/ARM/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib/OUTPUT/CompilerIntrinsicsLib.lib(memset.obj):(.text+0x10): > first defined here Interesting. I wonder where the first memmove resp. memset are coming from. Are you linking with libgcc are sth like that? > /media/Data/repositories/git/efidroid/prebuilts/gcc/linux-x86/arm/gcc-linaro-6.1.1~linaro-gcc-6-branch@f3888e76-20160721-x86_64_arm-eabi/bin/../lib/gcc/arm-eabi/6.1.1/../../../../arm-eabi/bin/ld: > printf.obj: plugin needed to handle lto object > /media/Data/repositories/git/efidroid/prebuilts/gcc/linux-x86/arm/gcc-linaro-6.1.1~linaro-gcc-6-branch@f3888e76-20160721-x86_64_arm-eabi/bin/../lib/gcc/arm-eabi/6.1.1/../../../../arm-eabi/bin/ld: > puts.obj: plugin needed to handle lto object > /media/Data/repositories/git/efidroid/prebuilts/gcc/linux-x86/arm/gcc-linaro-6.1.1~linaro-gcc-6-branch@f3888e76-20160721-x86_64_arm-eabi/bin/../lib/gcc/arm-eabi/6.1.1/../../../../arm-eabi/bin/ld: > internal error > /media/Data/repositories/git/abe/_build/snapshots/binutils-gdb.git~linaro_binutils-2_26-branch/ld/ldlang.c > 6299 > collect2: error: ld returned 1 exit status > make: *** [GNUmakefile:417: > /media/Data/repositories/git/efidroid/testing/linuxtoolchain/edk2/Build/AppPkg/RELEASE_GCC5/ARM/AppPkg/Applications/Main/Main/DEBUG/Main.dll] > Error 1 > Not sure what's going on here ... > Also, I only did compilation tests, I didn't try to run any of the produced > binaries. > > this is the fixed branch: > https://github.com/M1cha/edk2/commits/edk2-master-gcc6 > it's based on your gcc5-lto-v6 branch. > Thanks for the report. I will look into this.