arm: fix build with gcc 4.7.x
PATCH 1/1 arm: fix build with gcc 4.7.x
As was already pointed out months ago (see
http://lists.xen.org/archives/html/xen-devel/2012-02/msg00826.html),
gcc 4.7.x (imo validly) refuses to take both -mcpu=cortex-a15 and -march=armv7-a due to conflicting feature sets causing amibiguity in instruction selection. Since the former implies the latter, just use the former (and drop the -march=).
xen/arch/arm/Rules.mk +1 -1
@@ -24,7 +24,7 @@ ifneq ($(call cc-option,$(CC),-fvisibili CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE endif -CFLAGS += -march=armv7-a -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp +CFLAGS += -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers) check-$(gcc) = $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")
arm: fix build with gcc 4.7.x
As was already pointed out months ago (see
http://lists.xen.org/archives/html/xen-devel/2012-02/msg00826.html),
gcc 4.7.x (imo validly) refuses to take both -mcpu=cortex-a15 and -march=armv7-a due to conflicting feature sets causing amibiguity in instruction selection. Since the former implies the latter, just use the former (and drop the -march=).
xen/arch/arm/Rules.mk +1 -1
@@ -24,7 +24,7 @@ ifneq ($(call cc-option,$(CC),-fvisibili CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE endif -CFLAGS += -march=armv7-a -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp +CFLAGS += -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers) check-$(gcc) = $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 8 lines · Jan Beulich
As was already pointed out months ago (see
http://lists.xen.org/archives/html/xen-devel/2012-02/msg00826.html),
gcc 4.7.x (imo validly) refuses to take both -mcpu=cortex-a15 and -march=armv7-a due to conflicting feature sets causing amibiguity in instruction selection. Since the former implies the latter, just use the former (and drop the -march=).Signed-off-by Jan Beulich <[email protected]>
Quoted 15 lines
xen/arch/arm/Rules.mk +1
-1@@ -24,7 +24,7 @@ ifneq ($(call cc-option,$(CC),-fvisibili CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE endif -CFLAGS += -march=armv7-a -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp +CFLAGS += -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers) check-$(gcc) = $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")
Quoted 6 lines · Jan Beulich
As was already pointed out months ago (see
http://lists.xen.org/archives/html/xen-devel/2012-02/msg00826.html),
gcc 4.7.x (imo validly) refuses to take both -mcpu=cortex-a15 and -march=armv7-a due to conflicting feature sets causing amibiguity in instruction selection. Since the former implies the latter, just use the former (and drop the -march=).
Given that we currently use the v7-A envelope model rather than a Cortex-A15 I think -march=armv7-a is the correct option.
David
Quoted 14 lines
Signed-off-by Jan Beulich <[email protected]>xen/arch/arm/Rules.mk +1
-1@@ -24,7 +24,7 @@ ifneq ($(call cc-option,$(CC),-fvisibili CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE endif -CFLAGS += -march=armv7-a -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp +CFLAGS += -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers) check-$(gcc) = $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")
Quoted 11 lines
Quoted 1 line
Quoted 1 line
David Vrabel <[email protected]> 07/03/12 7:09 PM >>>
Quoted 6 lines · Jan Beulich
As was already pointed out months ago (see
http://lists.xen.org/archives/html/xen-devel/2012-02/msg00826.html),
gcc 4.7.x (imo validly) refuses to take both -mcpu=cortex-a15 and -march=armv7-a due to conflicting feature sets causing amibiguity in instruction selection. Since the former implies the latter, just use the former (and drop the -march=).Given that we currently use the v7-A envelope model rather than a Cortex-A15 I think -march=armv7-a is the correct option.
Which would mean passing the -mcpu= was wrong from the start. I'll leave this to the ARM maintainers in any case, the purpose of the change was merely to get the thing to build again.
Jan