From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web09.6694.1618362594001383391 for ; Tue, 13 Apr 2021 18:09:55 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 14 Apr 2021 09:09:43 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Rebecca Cran'" Cc: "'Laszlo Ersek'" , "'Leif Lindholm'" , "'Ard Biesheuvel'" References: <4a1d8554-a01f-4fc4-298f-efe73369547e@nuviainc.com> <13e8c66f-2282-7fcd-b9ea-07bb063bc635@redhat.com> <8d7b63bb-a143-c836-5689-b265e4c0a92b@nuviainc.com> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gR0NDNDkgREVCVUcgQUFSQ0g2NCBhbmQgQVJNIGJ1aWxkcyB1c2UgLU8w?= Date: Wed, 14 Apr 2021 09:09:51 +0800 Message-ID: <015801d730ca$df7e1c70$9e7a5550$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJ3tMpf0N9tFcdxVbt1IEbxZHXTXwMCw7w6AcxVFVIBxoF6P6k9fpJg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Ard: > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Ard > Biesheuvel > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B44=E6=9C=8814=E6=97=A5= 0:37 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Rebecca Cran > =E6=8A=84=E9=80=81: Laszlo Ersek ; edk2-devel-groups-= io > ; Leif Lindholm ; Liming Gao > (Byosoft address) ; Ard Biesheuvel > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] GCC49 DEBUG AARCH64 and ARM builds = use -O0 >=20 > On Tue, 13 Apr 2021 at 14:12, Rebecca Cran 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.t= e > mplate > > >> : > > >> > > >> DEBUG_GCC49_AARCH64_CC_FLAGS =3D > 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 th= at > > > in 2014, gcc (4.9) may have had issues with arm64 code generation wi= th > -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 tr= unk > > > (version r2640) into EDKII BaseTools.", 2014-01-10). > > > > > > Thanks > > > Laszlo > > > > > >=20 > IIRC we only added NOOPT for ARM much later, and at that time, we > decided to leave GCC49 alone. >=20 If no special reason, DEBUG_GCC49_AARCH64 can be updated from -O0 to -Os l= ike GCC49_IA32 and GCC49_X64.=20 Thanks Liming >=20 >=20 >=20