On 10 August 2015 at 10:00, Gao, Liming <liming....@intel.com> wrote:
> Ard:
>   This patch introduces GCC4X_ for common GCC option. It may be common for 
> GCC5, GCC6... So, how about use GCC_ prefix for all GCC common option?
>

OK, I have been looking into this. It is mostly possible to fold all
GCC 4.x options into the GCC_ defines. There are a couple that are
also used for UNIXGCC and CYGGCC with slightly different options:

I.e.,

DEFINE GCC_ALL_CC_FLAGS            = -g -Os -fshort-wchar
-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -c -include
AutoGen.h
DEFINE GCC_IA32_CC_FLAGS           = DEF(GCC_ALL_CC_FLAGS) -m32
-malign-double -freorder-blocks -freorder-blocks-and-partition -O2
-mno-stack-arg-probe

and

DEFINE GCC4X_ALL_CC_FLAGS            = -g -fshort-wchar
-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -Wno-address
-Wno-unused-but-set-variable -ffunction-sections -fdata-sections -c
-include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
DEFINE GCC4X_IA32_CC_FLAGS           = DEF(GCC4X_ALL_CC_FLAGS) -m32
-malign-double -fno-stack-protector -D EFI32

where the former is used by UNIXGCC and CYGGCC, and the latter are
shared between GCC44 - GCC49.

Is there any reason these are kept out of sync? Are UNIXGCC and CYGGCC
known to be widely used in some particular environment? If not, I
think it makes sense to merge them, i.e., retain the UNIXGCC and
CYGGCC toolchain names, but make them use the same options for IA32
and X64 as GCC44 - GCC49 do. (UNIXGCC and CYGGCC are unversioned, so
it is unclear which GCC version they expect anyway)

-- 
Ard.


> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ard 
> Biesheuvel
> Sent: Friday, August 7, 2015 11:05 PM
> To: edk2-devel@lists.01.org; Justen, Jordan L; Liu, Yingke D
> Cc: Ard Biesheuvel
> Subject: [edk2] [RFC PATCH 0/4] unify GCC command line options
>
> This unifies all command line option defines in tools_def.txt, in order to 
> reduce the maintenance burden.
>
> Note that this does not add or remove any GCC4x toolchains, it just folds the 
> common DEFINEs into a single series of GCC4X defines.
>
> Ard Biesheuvel (4):
>   BaseTools GCC: remove 4.9 specific linker alignment override
>   BaseTools GCC: unify warning flags for all GCC versions
>   BaseTools GCC: unify ARM CC flags for all GCC versions
>   BaseTools GCC: unify GCC toolchain command line options
>
>  BaseTools/Conf/tools_def.template | 306 ++++++++------------
>  1 file changed, 117 insertions(+), 189 deletions(-)
>
> --
> 1.9.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to