From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 103591A1DEF for ; Sat, 8 Oct 2016 00:20:05 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 08 Oct 2016 00:20:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,311,1473145200"; d="scan'208";a="887961358" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 08 Oct 2016 00:20:05 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 8 Oct 2016 00:20:04 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 8 Oct 2016 00:20:03 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.15]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.95]) with mapi id 14.03.0248.002; Sat, 8 Oct 2016 15:20:02 +0800 From: "Gao, Liming" To: Ard Biesheuvel , Laszlo Ersek CC: Bruce Cran , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch V2] BaseTools: support the NOOPT target with the GCC tool chains Thread-Index: AQHSHqgU6Qth64wV6EKnuBVbi8Do6KCZ70KAgACh54CAAAB3gIADmQWw Date: Sat, 8 Oct 2016 07:20:02 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B481D87@shsmsx102.ccr.corp.intel.com> References: <1475631026-23928-1-git-send-email-yonghong.zhu@intel.com> <9a33de86-b2f0-bd43-8c05-0a091cde0599@cran.org.uk> <896ca32b-3f51-6815-5c1b-1846b2cffd1c@redhat.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch V2] BaseTools: support the NOOPT target with the GCC tool chains X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 07:20:05 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I agree to disable LTO and Os in NOOPT target. ARM tool chain setting has d= isabled them in GCC5. We can refer to ARM setting, then update GCC5 IA32 an= d X86 arch.=20 Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Ard Biesheuvel > Sent: Thursday, October 06, 2016 4:21 PM > To: Laszlo Ersek > Cc: Bruce Cran ; edk2-devel@lists.01.org devel@ml01.01.org>; Gao, Liming > Subject: Re: [edk2] [Patch V2] BaseTools: support the NOOPT target with t= he > GCC tool chains >=20 > On 6 October 2016 at 09:19, Laszlo Ersek wrote: > > On 10/06/16 00:39, Bruce Cran wrote: > >> On 10/04/2016 07:30 PM, Yonghong Zhu wrote: > >> > >>> Update the tools_def.template to add NOOPT support with GCC tool > chains. > >>> > >>> Cc: Liming Gao > >>> Cc: Laszlo Ersek > >>> Contributed-under: TianoCore Contribution Agreement 1.0 > >>> Signed-off-by: Yonghong Zhu > >> > >> Reviewed-by: Bruce Cran > >> Tested-by: Bruce Cran > >> > >> Tested with both GCC49 and GCC5 toolchain settings (using gcc 6.2.1 fo= r > >> both) and verified that both have functional debugging, though gdb ski= ps > >> around with GCC5 as expected due to LTCG. > >> > > > > Right; as I mentioned up-thread, I wonder if we should disable -flto an= d -Os > in NOOPT_GCC5_IA32_DLINK_FLAGS and NOOPT_GCC5_X64_DLINK_FLAGS. > > > > How about we add the following to Yonghong's v2? > > - first, move "-flto" from GCC5_IA32_X64_DLINK_FLAGS and > GCC5_X64_DLINK_FLAGS to the users of those macros (both GCC5- and > CLANG38-related users exist), > > - second, for the GCC5 users of these macros: split them into > DEBUG/RELEASE/NOOPT, and remove -Os from NOOPT. > > > > The end result is that none of the earlier macro values change, except = for > NOOPT_GCC5_(IA32|X64)_DLINK_FLAGS; those two lose both -flto and -Os, > which is our purpose. This would eliminate the skipping around that you > mention. > > > > What do you guys think? See the patch below (again, to be applied on to= p > of Yonghong's v2, or to be squashed into it). > > >=20 > I agree. If we are going through the trouble of having a separate > NOOPT flavor, it should at least do what it says on the tin. If it > skips around, using it has no advantage over using DEBUG > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel