GCC Stack Protector options come from GCC4.9.3. But, there is GCC48 in
tools_def. I am not sure whether GCC48 is still used.

Thanks
Liming

> -----邮件原件-----
> 发件人: [email protected] <[email protected]> 代表 Oliver Steffen
> 发送时间: 2022年4月19日 22:47
> 收件人: [email protected]
> 抄送: [email protected]; [email protected];
> [email protected]; Oliver Steffen <[email protected]>
> 主题: [edk2-devel] [PATCH 1/1] BaseTools: disable stack protector (gcc,
> AARCH64)
> 
> Explicity disable the stack protection with
> -fno-stack-protection for builds using GCC on
> AARCH64.
> 
> The gcc on Ubuntu enables -fstack-protector-strong
> by default starting with Ubuntu 21.10.
> 
> GenFw fails if stack protection is enabled.
> 
> Signed-off-by: Oliver Steffen <[email protected]>
> ---
>  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 9c310cf23d25..bd3edf0d219b 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -1872,7 +1872,7 @@ DEFINE GCC_IA32_CC_FLAGS           =
> DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -
>  DEFINE GCC_X64_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS)
> -mno-red-zone -Wno-address -mno-stack-arg-probe
>  DEFINE GCC_ARM_CC_FLAGS            = DEF(GCC_ALL_CC_FLAGS)
> -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char
> -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address
> -mthumb -mfloat-abi=soft -fno-pic -fno-pie
>  DEFINE GCC_ARM_CC_XIPFLAGS         = -mno-unaligned-access
> -DEFINE GCC_AARCH64_CC_FLAGS        = DEF(GCC_ALL_CC_FLAGS)
> -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char
> -ffunction-sections -fdata-sections -Wno-address
> -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie
> -ffixed-x18
> +DEFINE GCC_AARCH64_CC_FLAGS        = DEF(GCC_ALL_CC_FLAGS)
> -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char
> -ffunction-sections -fdata-sections -Wno-address
> -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie
> -ffixed-x18 -fno-stack-protector
>  DEFINE GCC_AARCH64_CC_XIPFLAGS     = -mstrict-align
> -mgeneral-regs-only
>  DEFINE GCC_DLINK_FLAGS_COMMON      = -nostdlib --pie
>  DEFINE GCC_DLINK2_FLAGS_COMMON     =
> -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
> --
> 2.35.1
> 
> 
> 
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89090): https://edk2.groups.io/g/devel/message/89090
Mute This Topic: https://groups.io/mt/90574237/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to