From patchwork Mon Jan 14 14:04:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 155511 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3693480jaa; Mon, 14 Jan 2019 06:04:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN4X0AaOYoowwfwg0PtLpaxvie0fD30eQx6gcsqQM4/gfHWfaq4sJzOQqmjhkYfXG5mV7ilj X-Received: by 2002:a62:7a8b:: with SMTP id v133mr26015746pfc.159.1547474697743; Mon, 14 Jan 2019 06:04:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547474697; cv=none; d=google.com; s=arc-20160816; b=tSBZgQjG5jBfuadlb/1AFu0DcUgF3bNBGZ5IXcEF3ylnFtZlqCNkRWWdzBSkTbrncL GJW3lPu+H2tZwAXjlwXO19Kqq5CtJafbT/MNnWF8JpJ6JaJQwt+VTSsVjncRsU16rtRX jMsfwmqDf9X5NeKJa0oVEwDh2MOsyNaDoLPoCBzamsFp4YS+F9AhiGwIJUzNYcUO9T7l jEHXFR7MDGsXHrKLz47yUPoHybDqLenrOTBGLug56bQ97mxRCzLtF1az8j8L4Qy4TV7j gT5Q4iKEZGqlv8RH/4jtn2iAk5CfBgm1T+SBDFxn4IiNRs7RU6uceN8+meKSIINFeQtp I0uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=qz6YwJ6+KmvWkncwg0aS7zpUNt1tz/PqRjvMhzbl0WI=; b=mKf0kDvH5QbSeP/c+CErks8MHZMi8/kv1J600fLnyFA95bYkhEjHfSEDukImJt/0qV DtPHPSVCkMbkCeKbV7Go99F7gd3QS8eXXa/rOTo7m+ppUkmOzJqsO1TAY5pQTwqtAsD7 n14UWX63ixfzIz3ejeO7hn+hCU6OqiLyefXt5j6A4zsIEAr2xcHwKr2apWa56vhNypB7 BBQqdChQB2fJhnRJXm/sLTtmDA3LgsHSYWnnw3fHrxqeq8ct4QhKaiPT69LnYUXu0JYP vI+OwwATKaI50Jm3mG9elG21gsUdtu7mr+uhGOVb6cQQdh0OgIWPzpvKxrXqfCcGHUcy 8s6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cnSOrJw0; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id w2si344760pgp.546.2019.01.14.06.04.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 06:04:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cnSOrJw0; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 49AAD211B5078; Mon, 14 Jan 2019 06:04:57 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::343; helo=mail-wm1-x343.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 9842B21959CB2 for ; Mon, 14 Jan 2019 06:04:55 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id b11so9051755wmj.1 for ; Mon, 14 Jan 2019 06:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1O6eBPVUlWu7aRRT0SChJdqycUWeyWgXYGSNOnqEyBs=; b=cnSOrJw0OpIbU6HRhxjcJmIsaQH79ofIzrts6CsSzsmJyZDL+YQ02z7goQU6b6ghPA 9DX4l0o1wioxtynnWE5LVUkxknU1YYzWcNkE9deQ3lxF9ikRMUeiYGH6blC4Jaa81W6B 0bfPRiENl7E1FRu/XH7lMCiC7fHgQuOEldZyI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1O6eBPVUlWu7aRRT0SChJdqycUWeyWgXYGSNOnqEyBs=; b=mLew6BxOG8FlTBwZksE8khkYxrxv1kmNjghb5bB2TiAumT/6x8dvVOGHYUqDnWJmN2 5FE/r8d+yqswG7R4DJxFSj+Xs1B1sRaUyEs5QC+DL/VJAq1ZlpBPiRwzVyW4q2OzfJzq gqyQufTJrhI7owZScifF+dElHRuB5HSfQ81bnu1CuzJEWosyPFty9ntOYQ3kL6GhdbLC eWGC+VhxkcdPFPTVR19vTG65pVhX+aujI2QDNTy2B9YSFw8+dRixhxTErqE1J4HwKetO ttZS8zUyNsJN9kMfcxVrjHlrRvO2Hsr5xP7QSvALs23xO+46hst2iBXxnCxvOvaXtLW4 P2Og== X-Gm-Message-State: AJcUukdsjsqjRhdaHxxaet8ZaeXMoq9Kgyaj3r9RHpSJ894mx4WC79i0 SmLDkZglMmSjr4Yhi810u5M0ws2PG9roDA== X-Received: by 2002:a1c:1c8:: with SMTP id 191mr12524737wmb.150.1547474693881; Mon, 14 Jan 2019 06:04:53 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-83-120.w92-154.abo.wanadoo.fr. [92.154.90.120]) by smtp.gmail.com with ESMTPSA id g129sm27033684wmf.39.2019.01.14.06.04.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 06:04:53 -0800 (PST) From: Ard Biesheuvel To: liming.gao@intel.com, edk2-devel@lists.01.org Date: Mon, 14 Jan 2019 15:04:49 +0100 Message-Id: <20190114140449.2416-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [edk2] [PATCH v2] BaseTools/tools_def GCC5: disable LTO for ASLC invocations X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" GCC for 32-bit ARM chokes on .aslc files when running with LTO enabled. Since LTO has no benefit whatsoever here, just disable it globally for GCC5 and up when building .aslc files. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- BaseTools/Conf/tools_def.template | 27 +++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Liming Gao diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 4d74816837ab..2bd098287219 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4155,6 +4155,7 @@ DEFINE GCC48_AARCH64_DLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) DEFINE GCC48_AARCH64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEFINE GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_ASLDLINK_FLAGS) -Wl,--oformat=elf32-littlearm DEFINE GCC48_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_ASLDLINK_FLAGS) +DEFINE GCC48_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) DEFINE GCC49_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) @@ -4177,6 +4178,7 @@ DEFINE GCC49_AARCH64_DLINK_FLAGS = DEF(GCC48_AARCH64_DLINK_FLAGS) -z common- DEFINE GCC49_AARCH64_DLINK2_FLAGS = DEF(GCC48_AARCH64_DLINK2_FLAGS) DEFINE GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC48_ARM_ASLDLINK_FLAGS) DEFINE GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC48_AARCH64_ASLDLINK_FLAGS) +DEFINE GCC49_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS) DEFINE GCC5_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -fno-pic -fno-pie DEFINE GCC5_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) @@ -4199,6 +4201,7 @@ DEFINE GCC5_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) DEFINE GCC5_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS) -Wno-error DEFINE GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS) DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS) +DEFINE GCC5_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -fno-lto #################################################################################### # @@ -4301,7 +4304,7 @@ DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS) *_GCC48_IA32_ASLPP_PATH = DEF(GCC48_IA32_PREFIX)gcc *_GCC48_IA32_RC_PATH = DEF(GCC48_IA32_PREFIX)objcopy -*_GCC48_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 +*_GCC48_IA32_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS) -m32 *_GCC48_IA32_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 *_GCC48_IA32_ASM_FLAGS = DEF(GCC48_ASM_FLAGS) -m32 -march=i386 *_GCC48_IA32_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386 @@ -4329,7 +4332,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but *_GCC48_X64_ASLPP_PATH = DEF(GCC48_X64_PREFIX)gcc *_GCC48_X64_RC_PATH = DEF(GCC48_X64_PREFIX)objcopy -*_GCC48_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 +*_GCC48_X64_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS) -m64 *_GCC48_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64 *_GCC48_X64_ASM_FLAGS = DEF(GCC48_ASM_FLAGS) -m64 *_GCC48_X64_DLINK_FLAGS = DEF(GCC48_X64_DLINK_FLAGS) @@ -4359,7 +4362,7 @@ RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-s *_GCC48_ARM_ARCHCC_FLAGS = -mthumb *_GCC48_ARM_PLATFORM_FLAGS = -march=armv7-a -*_GCC48_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) +*_GCC48_ARM_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS) *_GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC48_ARM_ASLDLINK_FLAGS) *_GCC48_ARM_ASM_FLAGS = DEF(GCC48_ARM_ASM_FLAGS) *_GCC48_ARM_DLINK_FLAGS = DEF(GCC48_ARM_DLINK_FLAGS) @@ -4389,7 +4392,7 @@ RELEASE_GCC48_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS) -Wno-unused-but-set-v *_GCC48_AARCH64_ASLPP_PATH = ENV(GCC48_AARCH64_PREFIX)gcc *_GCC48_AARCH64_RC_PATH = ENV(GCC48_AARCH64_PREFIX)objcopy -*_GCC48_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) +*_GCC48_AARCH64_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS) *_GCC48_AARCH64_ASLDLINK_FLAGS = DEF(GCC48_AARCH64_ASLDLINK_FLAGS) *_GCC48_AARCH64_ASM_FLAGS = DEF(GCC48_AARCH64_ASM_FLAGS) *_GCC48_AARCH64_DLINK_FLAGS = DEF(GCC48_AARCH64_DLINK_FLAGS) @@ -4440,7 +4443,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s *_GCC49_IA32_ASLPP_PATH = DEF(GCC49_IA32_PREFIX)gcc *_GCC49_IA32_RC_PATH = DEF(GCC49_IA32_PREFIX)objcopy -*_GCC49_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 +*_GCC49_IA32_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -m32 *_GCC49_IA32_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 *_GCC49_IA32_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m32 -march=i386 *_GCC49_IA32_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386 @@ -4468,7 +4471,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but *_GCC49_X64_ASLPP_PATH = DEF(GCC49_X64_PREFIX)gcc *_GCC49_X64_RC_PATH = DEF(GCC49_X64_PREFIX)objcopy -*_GCC49_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 +*_GCC49_X64_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -m64 *_GCC49_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64 *_GCC49_X64_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m64 *_GCC49_X64_DLINK_FLAGS = DEF(GCC49_X64_DLINK_FLAGS) @@ -4498,7 +4501,7 @@ RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-s *_GCC49_ARM_ARCHCC_FLAGS = -mthumb *_GCC49_ARM_PLATFORM_FLAGS = -march=armv7-a -*_GCC49_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) +*_GCC49_ARM_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) *_GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS) *_GCC49_ARM_ASM_FLAGS = DEF(GCC49_ARM_ASM_FLAGS) *_GCC49_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS) @@ -4528,7 +4531,7 @@ RELEASE_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-v *_GCC49_AARCH64_ASLPP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc *_GCC49_AARCH64_RC_PATH = ENV(GCC49_AARCH64_PREFIX)objcopy -*_GCC49_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) +*_GCC49_AARCH64_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) *_GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS) *_GCC49_AARCH64_ASM_FLAGS = DEF(GCC49_AARCH64_ASM_FLAGS) *_GCC49_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS) @@ -4586,7 +4589,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 *_GCC5_IA32_ASLPP_PATH = DEF(GCC5_IA32_PREFIX)gcc *_GCC5_IA32_RC_PATH = DEF(GCC5_IA32_PREFIX)objcopy -*_GCC5_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto +*_GCC5_IA32_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m32 *_GCC5_IA32_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -no-pie *_GCC5_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie @@ -4618,7 +4621,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl, *_GCC5_X64_ASLPP_PATH = DEF(GCC5_X64_PREFIX)gcc *_GCC5_X64_RC_PATH = DEF(GCC5_X64_PREFIX)objcopy -*_GCC5_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto +*_GCC5_X64_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m64 *_GCC5_X64_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64 *_GCC5_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS) @@ -4650,7 +4653,7 @@ RELEASE_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os *_GCC5_ARM_RC_PATH = ENV(GCC5_ARM_PREFIX)objcopy *_GCC5_ARM_ARCHCC_FLAGS = -mthumb -*_GCC5_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) +*_GCC5_ARM_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) *_GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC5_ARM_ASLDLINK_FLAGS) *_GCC5_ARM_ASM_FLAGS = DEF(GCC5_ARM_ASM_FLAGS) *_GCC5_ARM_DLINK2_FLAGS = DEF(GCC5_ARM_DLINK2_FLAGS) @@ -4684,7 +4687,7 @@ RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS *_GCC5_AARCH64_ASLPP_PATH = ENV(GCC5_AARCH64_PREFIX)gcc *_GCC5_AARCH64_RC_PATH = ENV(GCC5_AARCH64_PREFIX)objcopy -*_GCC5_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) +*_GCC5_AARCH64_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) *_GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC5_AARCH64_ASLDLINK_FLAGS) *_GCC5_AARCH64_ASM_FLAGS = DEF(GCC5_AARCH64_ASM_FLAGS) *_GCC5_AARCH64_DLINK2_FLAGS = DEF(GCC5_AARCH64_DLINK2_FLAGS)