From: "Leif Lindholm" <leif@nuviainc.com>
To: devel@edk2.groups.io, bob.c.feng@intel.com
Cc: PierreGondois <pierre.gondois@arm.com>,
"Gao, Liming" <liming.gao@intel.com>,
tomas@nuviainc.com, Ard Biesheuvel <ard.biesheuvel@arm.com>
Subject: Re: [edk2-devel] [PATCH V2 2/2] BaseTools: Factorize GCC flags
Date: Thu, 30 Jul 2020 13:08:18 +0100 [thread overview]
Message-ID: <20200730120818.GO31778@vanye> (raw)
In-Reply-To: <BN6PR11MB0068A7F6D73D6DC7852F9B3CC97B0@BN6PR11MB0068.namprd11.prod.outlook.com>
And now I spotted this one.
Why are we going back and changing build flags for toolchain profiles
that are kept around for legacy use only? GCC 4.8 was released in
2013.
While I agree it *semantically* makes sense for GCC*_CC_FLAGS to
inherit GCC_ALL_CC_FLAGS, I am pretty sure the discrepancy was put
there for a reason - to keep the legacy profile working as it had done
even if we decided to enable new features for all modern profiles.
(That we then stopped having to create new profiles for each new GCC
release and hence haven't gone beyond GCC5 is beside the point - GCC5
encompasses all gcc toolchains since.)
I'll let Ard comment (when he's back), but I'm thinking this one ought
to be reverted as well.
/
Leif
On Mon, Jul 20, 2020 at 04:11:53 +0000, Bob Feng wrote:
> Reviewed-by: Bob Feng<bob.c.feng@intel.com>
>
> -----Original Message-----
> From: PierreGondois <pierre.gondois@arm.com>
> Sent: Tuesday, July 7, 2020 4:35 PM
> To: devel@edk2.groups.io
> Cc: Pierre Gondois <Pierre.Gondois@arm.com>; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; tomas.pilar@arm.com; nd@arm.com
> Subject: [PATCH V2 2/2] BaseTools: Factorize GCC flags
>
> From: Pierre Gondois <pierre.gondois@arm.com>
>
> 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 configurations 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 this "-Os" flag will be overriden by a more specific optimization configuration, provided that this more specific flag is appended at the end of the CC_FLAGS.
>
> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
> Suggested-by: Tomas Pilar <Tomas.Pilar@arm.com>
> ---
>
> The changes can be seen at: https://github.com/PierreARM/edk2/commits/831_Add_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.template
> index 397b011ba38f97f81f314f8641ac8bb95d5a2197..a1fd27b1adba8769949b7d628d7fbed49fe24267 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -1952,7 +1952,7 @@ DEFINE GCC_RISCV64_RC_FLAGS = -I binary -O elf64-littleriscv -B riscv
> # GCC Build Flag for included header file list generation
> DEFINE GCC_DEPS_FLAGS = -MMD -MF $@.deps
>
> -DEFINE GCC48_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
> +DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
> DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
> DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address
> DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>
>
>
>
next prev parent reply other threads:[~2020-07-30 12:08 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 8:35 [PATCH V2 0/2] Add gcc flag for void* pointer arithmetics PierreGondois
2020-07-07 8:35 ` [PATCH V2 1/2] BaseTools: Add gcc flag to warn on void* pointer arithmetic PierreGondois
2020-07-16 9:07 ` [edk2-devel] " Yuwei Chen
2020-07-20 4:10 ` Bob Feng
2020-07-22 18:05 ` [edk2-devel] " Leif Lindholm
2020-07-22 21:13 ` Andrew Fish
2020-07-23 1:56 ` Bob Feng
2020-07-23 2:49 ` Andrew Fish
2020-07-23 9:33 ` Leif Lindholm
2020-07-24 3:56 ` Bob Feng
2020-07-24 9:01 ` PierreGondois
2020-07-24 11:05 ` Leif Lindholm
2020-07-24 11:03 ` Leif Lindholm
2020-07-07 8:35 ` [PATCH V2 2/2] BaseTools: Factorize GCC flags PierreGondois
2020-07-20 4:11 ` Bob Feng
2020-07-30 12:08 ` Leif Lindholm [this message]
2020-07-22 11:03 ` [edk2-devel] " Laszlo Ersek
2020-07-22 11:24 ` Laszlo Ersek
2020-08-26 16:42 ` Laszlo Ersek
2020-08-27 8:32 ` PierreGondois
2020-08-27 14:55 ` Laszlo Ersek
2020-08-27 15:25 ` Leif Lindholm
2020-08-28 16:56 ` Laszlo Ersek
2020-08-28 19:15 ` Leif Lindholm
2020-08-31 13:22 ` Ard Biesheuvel
2020-08-31 13:43 ` 回复: " gaoliming
2020-08-31 14:03 ` Laszlo Ersek
2020-08-31 14:37 ` Ard Biesheuvel
2020-08-31 16:18 ` Laszlo Ersek
2020-08-31 16:27 ` Laszlo Ersek
2020-08-31 17:14 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200730120818.GO31778@vanye \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox