On 23/09/14 09:27, James Greenhalgh wrote:
On Mon, Sep 15, 2014 at 11:56:03AM +0100, Andrew Stubbs wrote:
On 15/09/14 10:46, Richard Earnshaw wrote:
Hmm, I wonder if arm_override_options should reject neon + (arch < 7).
Is this more to your taste?
Is this really such a good idea? It causes carnage throughout the
testsuite if you have configured with support for Neon and the testcase
is written with dg-options for a pre-armv7-a -march value.
For example in:
testsuite/gcc.target/arm/di-longlong64-sync-withhelpers.c
Which forces -march=armv5.
Perhaps you just have to fix the effective-target-ok tests - but then
we lose swathes of test coverage.
This also causes subtle Linux kernel compile failures.
Over there they use make rules where they check if the compiler supports
-march=armv5te and if not use -march=armv4t.
With this patch if the compiler is configured with something like
--with-fpu=neon the test will fail with your error message,
even though the compiler supports -march=armv5te.
Kyrill
Thanks,
James
Andrew
P.S. arm_override_options was renamed in 2010.
2014-09-15 Andrew Stubbs <a...@codesourcery.com>
* gcc/config/arm/arm.c (arm_option_override): Reject -mfpu=neon
when architecture is older than ARMv7.
Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c (revision 215228)
+++ gcc/config/arm/arm.c (working copy)
@@ -2845,6 +2845,9 @@
arm_fpu_desc = &all_fpus[arm_fpu_index];
+ if (TARGET_NEON && !arm_arch7)
+ error ("target CPU does not support NEON");
+
switch (arm_fpu_desc->model)
{
case ARM_FP_MODEL_VFP: