From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 49F881A1E11 for ; Mon, 1 Aug 2016 01:01:47 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id f65so359151434wmi.0 for ; Mon, 01 Aug 2016 01:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=c5BmplmkbHM6FyPdhPab3BMMgvak0TpMt7ycKYyQl3c=; b=dDyaZfndBwI9HqUd5YfMWb0txbzw0F5+HiVbuSBAlPwK1JzO9gSt7SbalRErQymTpj dL7A1qdzpuka2Qz+6Jw0iOqWNZ6fSgALCytXPHX9Sed4C09MJv6cccXvkJOmLTdwZbcJ ILAta80WSMdiVrnbAel0DRe2h2+Elqe2O2zlg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=c5BmplmkbHM6FyPdhPab3BMMgvak0TpMt7ycKYyQl3c=; b=bslmvGdYX2uYlwGe3z25YL2FHjqF7wlBiz7odK5MS7042H8xSfhsoiEMywSVcdL1Vn mJ41rIEc5yZyZk6LK3HSFuaz+CwolDUfJy2nvg+pnysBzuPGu3Dg+jobPKAs5oBTca4l vucLIQBaWGFuSwwSW3X6i8uivSGD1g3ZUVbWFht7KaNltefp337L/YbqjgzOJCb3gGFn t/YWQv1L9UtNNXgeqtzg/wprm5wkvZ2BGgSNWsYD+j1eQdfI44qzX3WTYPor34CFnGLI mXHdB5SPjjWkmhC51QHzx4rq7ESBnKvIxZ7u/PbI34vsJQQIu15rXd3DwtFbOfT0BB4n yF8A== X-Gm-Message-State: AEkoousUrfwccvg+TvyoyDG0zKbJ8NS5TOMvuuazKWG0cnvAF0F2bUg0yAObQxXUhO2+5bkd X-Received: by 10.28.128.15 with SMTP id b15mr57071649wmd.100.1470038505850; Mon, 01 Aug 2016 01:01:45 -0700 (PDT) Received: from localhost.localdomain (3.red-81-34-118.dynamicip.rima-tde.net. [81.34.118.3]) by smtp.gmail.com with ESMTPSA id m62sm15671943wmm.24.2016.08.01.01.01.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Aug 2016 01:01:44 -0700 (PDT) From: Ard Biesheuvel To: steven.shi@intel.com, yonghong.zhu@intel.com, liming.gao@intel.com, jordan.l.justen@intel.com, edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, lersek@redhat.com, Ard Biesheuvel Date: Mon, 1 Aug 2016 10:01:29 +0200 Message-Id: <1470038497-2536-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [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: Mon, 01 Aug 2016 08:01:47 -0000 This v5 to introduce GCC5 is now a 8 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 GCCLD that will retain the old behavior. The result is that GCC5 can align much more closely with its predecessors, making the expected maintenance burden of supporting GCC back to v4.4 much lower. Changes since v4: - added patch to use 'protected' visibility only for the libraries that define the module entry points (_ModuleEntryPoint), to prevent them from being optimized away by the LTO routines - added Jordan's ack/RBs - add some extra comments to tools_def.template (#8) Changes since v3: - like Steven does in his GCC5LTO patch, add -fno-builtin to IA32 and X64 CC_FLAGS; this addresses a build issue reported by Liming - add -Os the the linker flags as well, for AARCH64 this does not seem to make a difference, but it is arguably correct since the LTO processing at link 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 binary Changes since v2: - add license headers to LTO glue files for ARM and AARCH64 (#5) - get rid of lto-ld-wrapper script Ard Biesheuvel (8): 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 MdePkg GCC/X64: avoid 'hidden' visibility for module entry points BaseTools GCC: introduce GCC5 toolchain to support GCC v5.x in LTO mode ArmPkg/GccLto/liblto-aarch64.a | Bin 0 -> 1016 bytes ArmPkg/GccLto/liblto-aarch64.s | 27 ++ ArmPkg/GccLto/liblto-arm.a | Bin 0 -> 2096 bytes 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 | 350 +++++++++++++++----- BaseTools/Scripts/GccBase.lds | 6 + EmulatorPkg/Unix/Host/Host.inf | 6 +- MdePkg/Include/X64/ProcessorBind.h | 9 +- MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf | 2 + MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf | 2 + MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf | 2 + MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf | 2 + MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf | 2 + 16 files changed, 396 insertions(+), 109 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