From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.5617.1570632292936399327 for ; Wed, 09 Oct 2019 07:44:53 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 07:44:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,276,1566889200"; d="scan'208";a="187640307" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 09 Oct 2019 07:44:52 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 9 Oct 2019 07:44:51 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 9 Oct 2019 07:44:51 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.166]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.119]) with mapi id 14.03.0439.000; Wed, 9 Oct 2019 22:44:49 +0800 From: "Liming Gao" To: Laszlo Ersek , Andrew Fish , "devel@edk2.groups.io" Subject: Re: [edk2-devel] [Patch 11/12] OvmfPkg: Enable CLANG9 tool chain Thread-Topic: [edk2-devel] [Patch 11/12] OvmfPkg: Enable CLANG9 tool chain Thread-Index: AQHVd8+agAu4BasunEC2e5FoXBCBJqdQ3/Wg///57QCAAArngIAA9I8AgACSBVA= Date: Wed, 9 Oct 2019 14:44:48 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E514EAB@SHSMSX104.ccr.corp.intel.com> References: <1569570395-11240-1-git-send-email-liming.gao@intel.com> <1569570395-11240-12-git-send-email-liming.gao@intel.com> <4c27bdc4-60b4-26bf-c416-c02b69ef8051@redhat.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E5124FA@SHSMSX104.ccr.corp.intel.com> <7fc791fe-9d08-9763-ecc9-529e88b621c6@redhat.com> <767711D5-7C33-4703-8E97-F4F5B5A6BD5F@apple.com> <6f49899d-b5e4-70ad-82e5-08c5a8649ac8@redhat.com> In-Reply-To: <6f49899d-b5e4-70ad-82e5-08c5a8649ac8@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODljY2NmMDQtZTAxZS00ZTNkLWJiNjQtMmEyYjU0NGRkOGRhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNWR2Nkt2ZFRWRHlnS2FmS2JVa3BLWXRXandseDJTUWRNd25wRGlTbXp4UDMzY2YyOWdKVk5ieWdPZnVWQkdnTiJ9 dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Laszlo: > -----Original Message----- > From: Laszlo Ersek > Sent: Wednesday, October 9, 2019 9:44 PM > To: Andrew Fish ; devel@edk2.groups.io > Cc: Gao, Liming > Subject: Re: [edk2-devel] [Patch 11/12] OvmfPkg: Enable CLANG9 tool chain >=20 > On 10/09/19 01:08, Andrew Fish wrote: >=20 > > So I guess the way to describe it is XCODE inherits GCC and only needs = to override when it is different. >=20 > Thank you for the explanation! >=20 > I've been trying to figure out why this inheritance bothers me so much. > I guess the reason is the following: >=20 > I'm a user of the actual GCCxx toolchains (such as GCC48, GCC49, GCC5). > Assume that I realize that a gcc-specific change is needed to some part > of the code. (It could be build options, or gcc specific source code, > etc.) Then, I go to the gcc documentation, and verify whether the change > is indeed supported by all the relevant gcc versions. >=20 > If the change is possible with only some gcc versions, then I likely > write the change for a specific toolchain only, such as GCC5. Fine. >=20 > Now assume that my documentation review proves that *all* GCCxx > toolchains, supported by edk2, should receive the update. This could be > a #pragma, a command line flag, some __attribute__, etc. I'd very likely > express the change for the whole GCC toolchain *family*, and not > enumerate it for GCC48, GCC49, GCC5 individually. >=20 > And now I learn that said approach would be wrong, because such a change > would be inherited by XCODExx and CLANGxx too (via FAMILY), fully > against my intent, unless XCODExx and CLANGxx overrode the particular > aspect (via BUILDRULEFAMILY). The difference between XCODE/CLANG and GCCXX is the linker. Current patches= are introduced for the different linker. Clang supports most usage of GCC compi= ler. So, CLANG and XCODE uses GCC family. When I enable XCODE or CLANG tool chai= n in the platform, I don't find other incompatible behavior with GCC compiler= . So, I think it is safe to let CLANG inherit GCC option except for these two= cases. When you make new changes, and verify them with GCC compiler, that's enough= . You don't need to specially verify them with XCODE or CLANG. In most case, = GCC=20 compiler pass, XCODE or CLANG can also pass. Thanks Liming >=20 > This means that, after checking the gcc documentation meticulously > (multiple releases), and possibly even testing multiple gcc > installations, I could still regress edk2 (CLANGxx and/or XCODExx > specific parts), because they could inherit my GCC-oriented changes that > I never meant for CLANGxx and/or XCODExx. >=20 > I don't use XCODE or CLANG, I don't test on them, and now it seems I can > restrict changes to the *actual* gcc compilers only if I keep spelling > out the individual toolchain names, such as GCC48, GCC49, GCC5. >=20 > This makes the toolchain family concept totally useless to me (and to > other users that only care about actual gcc compilers). There is no > *family* facility available that allows people to restrict settings to > actual gcc compilers. In other words, we can't express "all GCCxx > toolchains, regardless of toolchain version, but not XCODE, and also not > CLANG". >=20 > Thanks > Laszlo