re PR target/65837 ([arm-linux-gnueabihf] lto1 target specific builtin not available)
authorChristian Bruel <christian.bruel@st.com>
Mon, 16 Nov 2015 11:20:02 +0000 (12:20 +0100)
committerChristian Bruel <chrbr@gcc.gnu.org>
Mon, 16 Nov 2015 11:20:02 +0000 (12:20 +0100)
2015-11-16  Christian Bruel  <christian.bruel@st.com>

PR target/65837
* config/arm/arm-c.c (arm_cpu_builtins): Conditionally set and reset
__ARM_FEATURE_FMA and __ARM_NEON_FP, __ARM_FP.

From-SVN: r230410

gcc/ChangeLog
gcc/config/arm/arm-c.c

index 5bfb202226b748fcba13f43dc93cd7e4fdc91230..72f0e9e2a0cde6af372d01577514b08b19dd2ed0 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-16  Christian Bruel  <christian.bruel@st.com>
+
+       PR target/65837
+       * config/arm/arm-c.c (arm_cpu_builtins): Conditionally set and reset
+       __ARM_FEATURE_FMA and __ARM_NEON_FP, __ARM_FP.
+
 2015-11-16  James Greenhalgh  <james.greenhalgh@arm.com>
 
        * config/aarch64/aarch64.c (cortexa57_branch_costs): New.
index e94fa107537922d038536dddc9ab32d37c2dae73..c336a167086d46e60a90bda47690b1abc5adb671 100644 (file)
@@ -129,18 +129,22 @@ arm_cpu_builtins (struct cpp_reader* pfile)
 
   if (TARGET_ARM_FP)
     builtin_define_with_int_value ("__ARM_FP", TARGET_ARM_FP);
+  else
+    cpp_undef (pfile, "__ARM_FP");
+
   if (arm_fp16_format == ARM_FP16_FORMAT_IEEE)
     builtin_define ("__ARM_FP16_FORMAT_IEEE");
   if (arm_fp16_format == ARM_FP16_FORMAT_ALTERNATIVE)
     builtin_define ("__ARM_FP16_FORMAT_ALTERNATIVE");
-  if (TARGET_FMA)
-    builtin_define ("__ARM_FEATURE_FMA");
 
+  def_or_undef_macro (pfile, "__ARM_FEATURE_FMA", TARGET_FMA);
   def_or_undef_macro (pfile, "__ARM_NEON__", TARGET_NEON);
   def_or_undef_macro (pfile, "__ARM_NEON", TARGET_NEON);
 
   if (TARGET_NEON_FP)
     builtin_define_with_int_value ("__ARM_NEON_FP", TARGET_NEON_FP);
+  else
+    cpp_undef (pfile, "__ARM_NEON_FP");
 
   /* Add a define for interworking. Needed when building libgcc.a.  */
   if (arm_cpp_interwork)