From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.221.67; helo=mail-wr1-f67.google.com; envelope-from=philmd@redhat.com; receiver=edk2-devel@lists.01.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) (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 81C31211ADA52 for ; Mon, 14 Jan 2019 06:08:46 -0800 (PST) Received: by mail-wr1-f67.google.com with SMTP id z5so22976024wrt.11 for ; Mon, 14 Jan 2019 06:08:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VdayMW6M+yhx6JoCfGOS3aLd380qDtrbjKLRRURxwo8=; b=iCGLJRC21CmGHj0rxxqZdHQWPBob6jn9l8/DekFiwPnWQbdVJS6imMd5DiOrHpQ14y qcWaBkxM8EfxxwFFDy00R3xheFgxFGmwmBDv5InTTxC8fHRob5yQhbP7nCBtwLWXwvUE Y3U1OW9Ehhw+ddpFHY6DeUDWfMEKxJVThq2uUWXUSb+/WP/ui98XSWZIYy9Q0Fa4jbwY sILnEocxiKt3QZH1SPLlT+IHcpj/HAhZAr8EOG1B9izqRUQ/0CIOL0l0X9ADtrQ+dfyP K1kqK+Ur6DVeN4prNPobe4SlRDJ7QOgZi/t+/UlWeogfkOjpLvrsXeNlZ4GBTaFu1fcv xv3g== X-Gm-Message-State: AJcUukcys7C519IXjvN9FK929EcD1sO4UwIJg6QIjA8/ckGa8cn4AtAB hi0htRFIHhFxImwj0k6yMVLGnQ== X-Google-Smtp-Source: ALg8bN5JJGpocYLbI0IVduqnqmwezHp7jbyu73bQhdU+aJsCdMbvFc24j5ckjNuPn8yp0a8f5Guptg== X-Received: by 2002:adf:be0f:: with SMTP id n15mr25258254wrh.267.1547474924836; Mon, 14 Jan 2019 06:08:44 -0800 (PST) Received: from [192.168.1.33] (110.red-83-51-161.dynamicip.rima-tde.net. [83.51.161.110]) by smtp.gmail.com with ESMTPSA id b13sm70101507wrn.28.2019.01.14.06.08.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 06:08:44 -0800 (PST) To: Ard Biesheuvel , liming.gao@intel.com, edk2-devel@lists.01.org References: <20190114140449.2416-1-ard.biesheuvel@linaro.org> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <153d57ac-f82a-b489-f834-71759d95d136@redhat.com> Date: Mon, 14 Jan 2019 15:08:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20190114140449.2416-1-ard.biesheuvel@linaro.org> Subject: Re: [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: , X-List-Received-Date: Mon, 14 Jan 2019 14:08:46 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 1/14/19 3:04 PM, Ard Biesheuvel wrote: > 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 Reviewed-by: Philippe Mathieu-Daudé > --- > BaseTools/Conf/tools_def.template | 27 +++++++++++--------- > 1 file changed, 15 insertions(+), 12 deletions(-) > > 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) >