[edk2-devel] GCC49 DEBUG AARCH64 and ARM builds use -O0

Rebecca Cran rebecca at nuviainc.com
Tue Apr 13 12:12:44 UTC 2021


+Ard (with the correct email address)

On 4/13/21 4:32 AM, Laszlo Ersek wrote:
> +Liming
> 
> On 04/12/21 17:10, Rebecca Cran wrote:
>> I noticed the GCC49 (and GCC48) AARCH64 and ARM DEBUG builds use -O0,
>> unlike IA32 and X64 platforms which build with -Os.
>>
>> e.g. from
>> https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/tools_def.template
>> :
>>
>> DEBUG_GCC49_AARCH64_CC_FLAGS     = DEF(GCC49_AARCH64_CC_FLAGS) -O0
>>
>> Is that deliberate, or should it be like X64 where DEBUG builds are
>> optimized and NOOPT is used when unoptimized binaries are needed?
>>
> 
> Seems to go back to commit dafe0fedc508 ("BaseTools: Add GCC49
> toolchain; align data sections to 0x40", 2014-07-28). My guess is that
> in 2014, gcc (4.9) may have had issues with arm64 code generation with -Os.
> 
> You hint at DEBUG_GCC48_AARCH64_CC_FLAGS too, which seems like a
> promising clue at first -- because, perhaps the GCC49 flags in the
> above-mentioned commit had simply been modeled on the then-existent
> GCC48 ones.
> 
> Unfortunately however, the GCC48 entry appeared in the
> less-than-helpfully-explained commit 2bc3256ca6d4 ("Sync BaseTool trunk
> (version r2640) into EDKII BaseTools.", 2014-01-10).
> 
> Thanks
> Laszlo
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#74036): https://edk2.groups.io/g/devel/message/74036
Mute This Topic: https://groups.io/mt/82040511/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list