Hi Ard,
On Mon, Aug 17, 2015 at 10:53:59AM +0200, Ard Biesheuvel wrote:
FYI I am adding the below patch to my GCC consolidation series.
Whilst I agree with the spirit of this patch, I have some concerns (basically I think it's too soon).
-------------8<--------------- In GCC 4.7, a feature was added to the ARM backend that allows unaligned loads and stores to be emitted. Since it is enabled by default on ARMv6 and later CPUs, and since such code is not suitable in our case (i.e., bare metal code), we must disable it by passing the -mno-unaligned-access option if we are using GCC 4.7 or later.
However, this particular feature and its enabling by default have been backported to version 4.6 by Linaro. Since the Linaro toolchains are widely used for ARM development, and also shipped by distros such as Ubuntu, we should disable the feature on version 4.6 as well.
I don't think it's that simple. I know some of the Ubuntu ones did _not_ support this flag (I'm thinking it was 12.04 I was using for GRUB development, and hitting this one.) And that's an LTS which will be supported until 2017.
And I've also seen people using codesourcery for edk2 development.
Unfortunately, since the upstream version does not support the feature, it also does not understand the -mno-unaligned-access option.
Considering the above, and the fact that the oldest supported toolchain for AARCH64 is 4.7 as well, let's just drop support for 4.6 altogether.
My request would be to hold back on this one for a while. Certainly give it a few months between dropping pre-v7 support and dropping gcc4.6.
/ Leif
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheuvel@linaro.org
BaseTools/Conf/tools_def.template | 30 -------------------- 1 file changed, 30 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index fabfe7436167..5707aafec8cd 100644 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4160,36 +4160,6 @@ DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 *_GCC46_X64_OBJCOPY_FLAGS = *_GCC46_X64_NASM_FLAGS = -f elf64 -################## -# GCC46 ARM definitions -################## -*_GCC46_ARM_OBJCOPY_PATH = echo -*_GCC46_ARM_CC_PATH = ENV(GCC46_ARM_PREFIX)gcc -*_GCC46_ARM_SLINK_PATH = ENV(GCC46_ARM_PREFIX)ar -*_GCC46_ARM_DLINK_PATH = ENV(GCC46_ARM_PREFIX)ld -*_GCC46_ARM_ASLDLINK_PATH = ENV(GCC46_ARM_PREFIX)ld -*_GCC46_ARM_ASM_PATH = ENV(GCC46_ARM_PREFIX)gcc -*_GCC46_ARM_PP_PATH = ENV(GCC46_ARM_PREFIX)gcc -*_GCC46_ARM_VFRPP_PATH = ENV(GCC46_ARM_PREFIX)gcc -*_GCC46_ARM_ASLCC_PATH = ENV(GCC46_ARM_PREFIX)gcc -*_GCC46_ARM_ASLPP_PATH = ENV(GCC46_ARM_PREFIX)gcc -*_GCC46_ARM_RC_PATH = ENV(GCC46_ARM_PREFIX)objcopy
-*_GCC46_ARM_ARCHCC_FLAGS = -*_GCC46_ARM_PLATFORM_FLAGS = -march=armv7-a
-*_GCC46_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -*_GCC46_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_ASLDLINK_FLAGS) -*_GCC46_ARM_ASM_FLAGS = DEF(GCC_ARM_ASM_FLAGS) -*_GCC46_ARM_DLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -*_GCC46_ARM_PLATFORM_FLAGS = -march=armv7-a -*_GCC46_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS) -*_GCC46_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS) -*_GCC46_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
- DEBUG_GCC46_ARM_CC_FLAGS = DEF(GCC_ARM_CC_FLAGS) -O0
-RELEASE_GCC46_ARM_CC_FLAGS = DEF(GCC_ARM_CC_FLAGS)
#################################################################################### #
# GCC 4.7 - This configuration is used to compile under Linux to produce
1.9.1