From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (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 A03501A1E20 for ; Thu, 28 Jul 2016 23:09:16 -0700 (PDT) Received: by mail-io0-x22a.google.com with SMTP id 38so120174415iol.0 for ; Thu, 28 Jul 2016 23:09:16 -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:content-transfer-encoding; bh=MnSFpgsaEjSEgUdonCrLm0sAdMkDlJVpxBZXTlLJ2g8=; b=di3XdwQl1oE1VNQcplMM1M5sdwwVQOieh+/GImfVZApNcSzPTzsm9m0QWO5t+AJOGs 4dG8ywan4uAf/VmqKoGjaHx4V+pQ0lGx4sMRGoRwulL+ZkrzkQYz+3CHUYNZt97FmuYk wpFOmnv4nnb/f1dAMxpP2NSFEe0AzpoFcMPdA= 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:content-transfer-encoding; bh=MnSFpgsaEjSEgUdonCrLm0sAdMkDlJVpxBZXTlLJ2g8=; b=AdPMo1Gn4XJKLL4hUuLvLEvvgcJn18hsCi/HKHL2T6N+D/t1WZ/R/mf4ird6JeJHEv Md+z3FRZRE2AmoQigF2PgmgTOOh3yxmWW3WTwf7jCnWo6hI3FmPHsFIJYPSG5Sakz7sx A+JmI1mpi/uToivtnwRlMO9uhtZu/lJ1ScyaQXI9WdWSmVGeEYU2VsBGnu4o5n610+9l 3gjoTy9qXMzdtFfbPekZT5HHHAFfvL3g4pGhA4Icf5R3UcQyIMe1m10cbuR5JaBo81S6 2Pjx0CypBGITbd3bzNWLzu1AE+QSWIft/RXJt3g1K/H35BTWBLzU7zaEtwdnA2PlP9cg uWjQ== X-Gm-Message-State: AEkooutDSrsfuqr2Ft+Xw1POaD7H0TCK39+INJRSAkwBjrwtBcSJAyIZPA6lqBQ+T2v/0czh5PxOSUTFUmRYL/Og X-Received: by 10.107.40.133 with SMTP id o127mr40763313ioo.183.1469772555814; Thu, 28 Jul 2016 23:09:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Thu, 28 Jul 2016 23:09:15 -0700 (PDT) In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E24F5@shsmsx102.ccr.corp.intel.com> References: <1469618017-6534-1-git-send-email-ard.biesheuvel@linaro.org> <4A89E2EF3DFEDB4C8BFDE51014F606A1155E24F5@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Fri, 29 Jul 2016 08:09:15 +0200 Message-ID: To: "Gao, Liming" Cc: "edk2-devel@lists.01.org" , "lersek@redhat.com" , "Shi, Steven" , "Zhu, Yonghong" , "Justen, Jordan L" , "leif.lindholm@linaro.org" Subject: Re: [PATCH v4 0/7] 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: Fri, 29 Jul 2016 06:09:16 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 29 July 2016 at 06:47, Gao, Liming wrote: > Ard: > Thanks for your update. I have some comments for them. > 1) It uses GCC as Link for GCC44-GCC49. Have you done verification on the= m? I verify GCC49 in OVMFIa32X64 platform. It works. Yes, I tested all of them. > 2) After this change, how to append new link option in platform DSC? Use = style -Wl, ? It depends. Some options (like -z) don't need it, but others do. > 3) I see GCC5 uses gcc-ar as its SLINK, and GCC49 uses ar as its SLINK. I= s gcc-ar required only by LTO? Yes > 4) Before GCC49 optimization, GCC49 means GCC49 or later, GCC5 can work w= ith GCC49 tool chain configuration. But now, I configure gcc to point to GC= C5, and build OVMF with GCC49 tool chain, it reports GenFw failure. I expec= t GCC5 work with GCC49 and GCC5 tool chain both. GCC49 for no lto, GCC5 for= lto. I know Steven has provided the patch to fix this GenFw issue. > > GenFw: ERROR 3000: Invalid > /home/hwu/work/lgao4/AllPkg/Build/Ovmf3264/DEBUG_GCC49/X64/MdeModulePkg= /Core/Dxe/DxeMain/DEBUG/DxeCore.dll unsupported ELF EM_X86_64 relocation 0x= 9. > GenFw: ERROR 3000: Invalid > /home/hwu/work/lgao4/AllPkg/Build/Ovmf3264/DEBUG_GCC49/X64/MdeModulePkg= /Core/Dxe/DxeMain/DEBUG/DxeCore.dll unsupported ELF EM_X86_64 relocation 0x= 9. > GenFw: ERROR 3000: Invalid > Which GCC version are you using? >> -----Original Message----- >> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] >> Sent: Wednesday, July 27, 2016 7:14 PM >> To: edk2-devel@lists.01.org; lersek@redhat.com; Gao, Liming >> ; Shi, Steven ; Zhu, >> Yonghong ; Justen, Jordan L >> >> Cc: leif.lindholm@linaro.org; Ard Biesheuvel >> Subject: [PATCH v4 0/7] BaseTools: add support for GCC5 in LTO mode >> >> This v4 to introduce GCC5 is now a 7 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 GCCL= D >> that will retain the old behavior. >> >> The result is that GCC5 can align much more closely with its predecessor= s, >> making the expected maintenance burden of supporting GCC back to v4.4 >> much lower. >> >> Changes since v3: >> - like Steven does in his GCC5LTO patch, add -fno-builtin to IA32 and X6= 4 >> CC_FLAGS; this addresses a build issue reported by Liming >> - add -Os the the linker flags as well, for AARCH64 this does not seem t= o >> make >> a difference, but it is arguably correct since the LTO processing at l= ink >> 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 binar= y >> >> Changes since v2: >> - add license headers to LTO glue files for ARM and AARCH64 (#5) >> - get rid of lto-ld-wrapper script >> >> Ard Biesheuvel (7): >> 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 >> BaseTools GCC: add support for GCC v5.x in LTO mode >> >> ArmPkg/GccLto/liblto-aarch64.a | Bin 0 -> 1016 byt= es >> ArmPkg/GccLto/liblto-aarch64.s | 27 ++ >> ArmPkg/GccLto/liblto-arm.a | Bin 0 -> 2096 byt= es >> 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 | 344 +++++++++++++= +------ >> BaseTools/Scripts/GccBase.lds | 6 + >> EmulatorPkg/Unix/Host/Host.inf | 6 +- >> 10 files changed, 372 insertions(+), 108 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 >