Hi all,

I tried bootstrapping on Thumb1 recently and hit an error while building libgcc 
and in particular config/arm/crtfastmath.c.
This file generates vmrs instructions which are not allowed in Thumb1, causing 
an assembler error.

The fix for that is to gate the file not only on !__SOFTFP__ but also no 
__ARM_32BIT_STATE.
This allows Thumb1 bootstrap to proceed past that point (it fails later on for 
an unrelated reason).

Bootstrapped on ARM state and Thumb2 as well.
Ok for trunk?

Thanks,
Kyrill

2015-07-30  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

    * config/arm/crtfastmath.c: Gate contents on __ARM_32BIT_STATE.
commit c3bad17af21b040c4ff0507ffca8d5fbe35b3136
Author: Kyrylo Tkachov <kyrylo.tkac...@arm.com>
Date:   Wed Jul 29 17:56:46 2015 +0100

    [ARM][libgcc] Gate crtfastmath.c contents on __ARM_32BIT_STATE

diff --git a/libgcc/config/arm/crtfastmath.c b/libgcc/config/arm/crtfastmath.c
index 9573514..11b6208 100644
--- a/libgcc/config/arm/crtfastmath.c
+++ b/libgcc/config/arm/crtfastmath.c
@@ -22,7 +22,8 @@
  */
 
 /* Enable flush-to-zero support for -ffast-math on VFP targets.  */
-#ifndef __SOFTFP__
+
+#if defined (__ARM_32BIT_STATE) && !defined ( __SOFTFP__)
 
 #define FPSCR_FZ		(1 << 24)
 

Reply via email to