* GCC49 DEBUG AARCH64 and ARM builds use -O0
@ 2021-04-12 15:10 Rebecca Cran
2021-04-13 10:32 ` [edk2-devel] " Laszlo Ersek
0 siblings, 1 reply; 5+ messages in thread
From: Rebecca Cran @ 2021-04-12 15:10 UTC (permalink / raw)
To: devel@edk2.groups.io Calendar, Leif Lindholm, Ard Biesheuvel
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?
--
Rebecca Cran
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] GCC49 DEBUG AARCH64 and ARM builds use -O0
2021-04-12 15:10 GCC49 DEBUG AARCH64 and ARM builds use -O0 Rebecca Cran
@ 2021-04-13 10:32 ` Laszlo Ersek
2021-04-13 12:12 ` Rebecca Cran
0 siblings, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2021-04-13 10:32 UTC (permalink / raw)
To: rebecca; +Cc: devel, Leif Lindholm, Ard Biesheuvel,
Liming Gao (Byosoft address)
+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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] GCC49 DEBUG AARCH64 and ARM builds use -O0
2021-04-13 10:32 ` [edk2-devel] " Laszlo Ersek
@ 2021-04-13 12:12 ` Rebecca Cran
2021-04-13 16:36 ` Ard Biesheuvel
0 siblings, 1 reply; 5+ messages in thread
From: Rebecca Cran @ 2021-04-13 12:12 UTC (permalink / raw)
To: Laszlo Ersek
Cc: devel, Leif Lindholm, Liming Gao (Byosoft address),
Ard Biesheuvel
+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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] GCC49 DEBUG AARCH64 and ARM builds use -O0
2021-04-13 12:12 ` Rebecca Cran
@ 2021-04-13 16:36 ` Ard Biesheuvel
2021-04-14 1:09 ` 回复: " gaoliming
0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2021-04-13 16:36 UTC (permalink / raw)
To: Rebecca Cran
Cc: Laszlo Ersek, edk2-devel-groups-io, Leif Lindholm,
Liming Gao (Byosoft address), Ard Biesheuvel
On Tue, 13 Apr 2021 at 14:12, Rebecca Cran <rebecca@nuviainc.com> wrote:
>
> +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
> >
>
IIRC we only added NOOPT for ARM much later, and at that time, we
decided to leave GCC49 alone.
^ permalink raw reply [flat|nested] 5+ messages in thread
* 回复: [edk2-devel] GCC49 DEBUG AARCH64 and ARM builds use -O0
2021-04-13 16:36 ` Ard Biesheuvel
@ 2021-04-14 1:09 ` gaoliming
0 siblings, 0 replies; 5+ messages in thread
From: gaoliming @ 2021-04-14 1:09 UTC (permalink / raw)
To: devel, ardb, 'Rebecca Cran'
Cc: 'Laszlo Ersek', 'Leif Lindholm',
'Ard Biesheuvel'
Ard:
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Ard
> Biesheuvel
> 发送时间: 2021年4月14日 0:37
> 收件人: Rebecca Cran <rebecca@nuviainc.com>
> 抄送: Laszlo Ersek <lersek@redhat.com>; edk2-devel-groups-io
> <devel@edk2.groups.io>; Leif Lindholm <leif@nuviainc.com>; Liming Gao
> (Byosoft address) <gaoliming@byosoft.com.cn>; Ard Biesheuvel
> <ardb+tianocore@kernel.org>
> 主题: Re: [edk2-devel] GCC49 DEBUG AARCH64 and ARM builds use -O0
>
> On Tue, 13 Apr 2021 at 14:12, Rebecca Cran <rebecca@nuviainc.com> wrote:
> >
> > +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.te
> mplate
> > >> :
> > >>
> > >> 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
> > >
> >
>
> IIRC we only added NOOPT for ARM much later, and at that time, we
> decided to leave GCC49 alone.
>
If no special reason, DEBUG_GCC49_AARCH64 can be updated from -O0 to -Os like GCC49_IA32 and GCC49_X64.
Thanks
Liming
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-14 1:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-12 15:10 GCC49 DEBUG AARCH64 and ARM builds use -O0 Rebecca Cran
2021-04-13 10:32 ` [edk2-devel] " Laszlo Ersek
2021-04-13 12:12 ` Rebecca Cran
2021-04-13 16:36 ` Ard Biesheuvel
2021-04-14 1:09 ` 回复: " gaoliming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox