From: "Oliver Steffen" <osteffen@redhat.com>
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn
Cc: bob.c.feng@intel.com, yuwei.chen@intel.com
Subject: Re: 回复: [edk2-devel] [PATCH 1/1] BaseTools: disable stack protector (gcc, AARCH64)
Date: Wed, 20 Apr 2022 09:39:24 +0200 [thread overview]
Message-ID: <20220420073924.ptjydsda23dpgvwb@osteffen-laptop> (raw)
In-Reply-To: <015701d85446$500701b0$f0150510$@byosoft.com.cn>
On 20.04.2022 07:36, gaoliming wrote:
>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.
A valid point.
GCC 4.8 accepts -fno-stack-protector.
For IA32 and X64 this option is set in GCC48_$ARCH_CC_FLAGS.
Setting it for AARCH64 starting with GCC4.8 would be more consistent
than setting it for all versions by default.
Cheers,
Oliver
>
>Thanks
>Liming
>
>> -----邮件原件-----
>> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Oliver Steffen
>> 发送时间: 2022年4月19日 22:47
>> 收件人: devel@edk2.groups.io
>> 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn;
>> yuwei.chen@intel.com; Oliver Steffen <osteffen@redhat.com>
>> 主题: [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 <osteffen@redhat.com>
>> ---
>> 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
>>
>>
>>
>>
>>
>
>
>
>
>
>
>
>
prev parent reply other threads:[~2022-04-20 7:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 14:46 [PATCH 0/1] BaseTools: disable stack protector (gcc, AARCH64) Oliver Steffen
2022-04-19 14:46 ` [PATCH 1/1] " Oliver Steffen
2022-04-19 23:36 ` 回复: [edk2-devel] " gaoliming
2022-04-20 7:39 ` Oliver Steffen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220420073924.ptjydsda23dpgvwb@osteffen-laptop \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox