From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.31523.1595218317883771419 for ; Sun, 19 Jul 2020 21:11:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=U4wLbvqP; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: bob.c.feng@intel.com) IronPort-SDR: l4tCQpffq4ZPTeAsRTO4FYLXWb/Lul+YQoiTXJta3BWhPpb66eu18a9JGOn5gtWvB6OewmGvvh IZ/Dpielr9iw== X-IronPort-AV: E=McAfee;i="6000,8403,9687"; a="149834856" X-IronPort-AV: E=Sophos;i="5.75,373,1589266800"; d="scan'208";a="149834856" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2020 21:11:56 -0700 IronPort-SDR: pVHWVaeUqtpNm0QCt9Sss0HzN2/RqEVKPUJ0Sjdu4I3y1KoEJ5F2Kv3yf4tgyVqdnwt3arCNKr w8M49NgvlG4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,373,1589266800"; d="scan'208";a="271329593" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by fmsmga008.fm.intel.com with ESMTP; 19 Jul 2020 21:11:56 -0700 Received: from orsmsx151.amr.corp.intel.com (10.22.226.38) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 19 Jul 2020 21:11:56 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX151.amr.corp.intel.com (10.22.226.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 19 Jul 2020 21:11:55 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.51) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 19 Jul 2020 21:11:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ARW6j+HG1Q4HAg4FxOfaPf09f6YYNrOWiruLt5Ui9nVx1z7EQtF5ObaRvIqUfaZPuFX8KqswBYBdzkZuyYn79ePXC4Ran+z5ZNT96GU2yDtARIoe7cJyg9xeju5/aEw9mHSGRPCXeeTFs1kpKBxG1tx8OoRsPMbmegb0vUX+JIzVNJaYkM7Psi2L4+LDoKaLSZtDShwbVjN0LI2V0Ik2tqmmXAjXLaMQUo40ezSoQaWdzIRr6/nE69VWLsA49uLSWM9yy8EpKkdFFqxCk6w0Io07VI3xkdr7Q3Hi5Pl4lAnVNgqzVNlDsV1s8OwkedxvxGlkNAk42cM7RlBEnmZldA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i18xXHeFIm5+M4yJNAjONlg58BakZVSpGefMvr9jJZs=; b=I5zUn1RTbh/OnT1+FltSvj4NKMYCJT05M64D4BKdpDQ8eco2XRsLJlteCJl25y8CQOgwY8QL+xXtbjk5RDIf+lngQxrzGLymFawHZXT3Qr6XN13gK0oceXASkngMsdmlbM2JQ6zVwvJZ+HvxbguyIxDAeLkIZQc0a7d/n5H86tY1lf/wUycWld6Vfcd9KftCExUXY8ycqDoqXNS9cACFgR8pNbO0zVVjvgjl9Zfy6ydqqckFOCNzrS/hvD0KmZBHK2OyPSSFAV0nELUBVEB9VWuaMk7M3hemMAL+aLaTsJIVUjMmr2nqwz165kvdBinIN2ggocnJc9bPFH1RaUmlFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i18xXHeFIm5+M4yJNAjONlg58BakZVSpGefMvr9jJZs=; b=U4wLbvqPkTWjBCdc/jWyoknJ/RvnCy/c6gSWa4nYWuyWZCQA8n1xJBjKoNvjHtHuyP4hgI6WLQyOR7vutYuxkf/VMGg4YRS94+etDyhIOvSX09VjWE6tTnYZB2vxtJR/JSitGM3rPen553UDli18nVTCbCUxt/HtMkg76KoIm6g= Received: from BN6PR11MB0068.namprd11.prod.outlook.com (2603:10b6:405:69::17) by BN6PR11MB4051.namprd11.prod.outlook.com (2603:10b6:405:79::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.24; Mon, 20 Jul 2020 04:11:54 +0000 Received: from BN6PR11MB0068.namprd11.prod.outlook.com ([fe80::6870:82d3:5bde:4153]) by BN6PR11MB0068.namprd11.prod.outlook.com ([fe80::6870:82d3:5bde:4153%6]) with mapi id 15.20.3174.029; Mon, 20 Jul 2020 04:11:54 +0000 From: "Bob Feng" To: PierreGondois , "devel@edk2.groups.io" CC: "Gao, Liming" , "tomas.pilar@arm.com" , "nd@arm.com" Subject: Re: [PATCH V2 2/2] BaseTools: Factorize GCC flags Thread-Topic: [PATCH V2 2/2] BaseTools: Factorize GCC flags Thread-Index: AQHWVDmgn45zUVav8k6F0OjXdlNy9akP7zng Date: Mon, 20 Jul 2020 04:11:53 +0000 Message-ID: References: <20200707083522.138944-1-pierre.gondois@arm.com> <20200707083522.138944-3-pierre.gondois@arm.com> In-Reply-To: <20200707083522.138944-3-pierre.gondois@arm.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 383486fe-4e5a-4a44-fe54-08d82c63092b x-ms-traffictypediagnostic: BN6PR11MB4051: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7wkH5Zc/eSEG8lYivBNq4Jd7g3yOGojuaf1TXB30u2izAgD2kLuEq3RX5g2vxCXpqIx+jWRGGQz2yKPjCioTP/nDQ0M93Z60Oui0LFzPVEdC9bPscvMYeG5IIUy5uiTnW2zymiz7VD4mwOXkDHABTd7eZRx+GJGsOMLDI8MQ0Yk3/8BCXlS6kp1LoUqENbxSbEv50kphNfWH1DBGz/sA5BkMi6deFEqtQkjNdrZwOpb5QFXJBcsTNIFLcIPWwZMWYw86/1Pv92iAJDwxfOsPpwmb+IAFycb6EHHgmqFCgf07ERYu6DedV5vVYnOZo4fsjQ690YnFBUBSzLLZm/G8auak2kxrY2HNc3U2l5tWPeNJB4bUhXjEf8pHgZffgp9Mn+gxyshav8x4p2WtZFvcCQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB0068.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(346002)(396003)(366004)(136003)(39860400002)(8936002)(55016002)(7696005)(316002)(9686003)(5660300002)(64756008)(76116006)(66476007)(33656002)(2906002)(54906003)(66446008)(52536014)(110136005)(86362001)(66556008)(66946007)(83380400001)(71200400001)(966005)(26005)(186003)(8676002)(4326008)(53546011)(6506007)(478600001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: jxwbsENd5TLl/YszIitu+dQ7uMxjly9WeDXo/gvDi0kT55ENtxtOmOR6k3Su9Hb987JoSh+YYbdQdzX5IED/DQPtD8MxHNi7K7Km4smgxkGIpQnpPueD2lH6rXsZWuPyoKE/Y145LVhbNU6804FKLfYCXV8WPGTIzM/KJMjiCI3zGdV6uKufuWfIzfclQtg4YzAfrphgd7t5vHaiGZI0ENSAHHX3vg6rM2VQ2grKd0CynH0k1L5xdH9/kRPNXdv1rEaAE/73SbHiPjjgsatGoiTVE1Gmqg7dEqWQFgbwjmzZZKlvcVORQ5UgA784zFY0krO3FyzdlzzRHdrSIB55U7OUGA9aSmUdCcEFHe7zsWMPgPMNBDrTZigRDPpngSU45mTjF6STrZaoniy3H4Z6J0isuHVuaSMFkUbo8vZIbm+ku/4Z/VX0c/l1PoaLjVIDuwGhAcWkCMv4psamBgEGi6xD047f6pdiu0volfhq8tDZpymqEUM8Gr7HEe5vnIg5 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB0068.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 383486fe-4e5a-4a44-fe54-08d82c63092b X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2020 04:11:53.7879 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fgAp2+nN9GNVfai+ZueOSuMoXwAlD2MVLRxuQxoKQcaMKC/ynikVce2qzeaBTR4piRRtnAcVLGlcnswu1VnYxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB4051 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: PierreGondois =20 Sent: Tuesday, July 7, 2020 4:35 PM To: devel@edk2.groups.io Cc: Pierre Gondois ; Feng, Bob C ; Gao, Liming ; tomas.pilar@arm.com; nd@arm.com Subject: [PATCH V2 2/2] BaseTools: Factorize GCC flags From: Pierre Gondois GCC48_ALL_CC_FLAGS has no dependency on GCC_ALL_CC_FLAGS. By definition, there should be such dependency. The outcomes of this patch is that GCC48_ALL_CC_FLAGS and other dependent c= onfigurations will inherit from the additional "-Os" flag. The "-Os" flag optimizes a build in size, not breaking any build. In a gcc = command line, the last optimization flag has precedence. This means that th= is "-Os" flag will be overriden by a more specific optimization configurati= on, provided that this more specific flag is appended at the end of the CC_= FLAGS. Signed-off-by: Pierre Gondois Suggested-by: Tomas Pilar --- The changes can be seen at: https://github.com/PierreARM/edk2/commits/831_A= dd_gcc_flag_warning_v2 Notes: v2: - Make GCC48_ALL_CC_FLAGS dependent on GCC_ALL_CC_FLAGS. [Tomas] BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.t= emplate index 397b011ba38f97f81f314f8641ac8bb95d5a2197..a1fd27b1adba8769949b7d628d7= fbed49fe24267 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -1952,7 +1952,7 @@ DEFINE GCC_RISCV64_RC_FLAGS =3D -I binary -O e= lf64-littleriscv -B riscv # GCC Build Flag for included header file list generation DEFINE GCC_DEPS_FLAGS =3D -MMD -MF $@.deps =20 -DEFINE GCC48_ALL_CC_FLAGS =3D -g -fshort-wchar -fno-builtin -fn= o-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdat= a-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=3D$(BASE_NAME= )Strings +DEFINE GCC48_ALL_CC_FLAGS =3D DEF(GCC_ALL_CC_FLAGS) -ffunction-= sections -fdata-sections -DSTRING_ARRAY_NAME=3D$(BASE_NAME)Strings DEFINE GCC48_IA32_X64_DLINK_COMMON =3D -nostdlib -Wl,-n,-q,--gc-sections= -z common-page-size=3D0x20 DEFINE GCC48_IA32_CC_FLAGS =3D DEF(GCC48_ALL_CC_FLAGS) -m32 -mar= ch=3Di586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-un= wind-tables -Wno-address DEFINE GCC48_X64_CC_FLAGS =3D DEF(GCC48_ALL_CC_FLAGS) -m64 -fno= -stack-protector "-DEFIAPI=3D__attribute__((ms_abi))" -maccumulate-outgoing= -args -mno-red-zone -Wno-address -mcmodel=3Dsmall -fpie -fno-asynchronous-u= nwind-tables -Wno-address -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'