[edk2] [PATCH] BaseTools/tools_def ARM GCC5: disable LTO for ASLC invocations

Philippe Mathieu-Daudé philmd at redhat.com
Mon Jan 7 02:08:51 PST 2019


Hi Ard,

On 1/7/19 7:55 AM, 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.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> ---
>  BaseTools/Conf/tools_def.template | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
> index f7eb87af14c2..e68cfd9a4997 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -5145,7 +5145,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(GCC_ASLCC_FLAGS) -fno-lto

Why not add it globally to 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)
> 


More information about the edk2-devel mailing list