summaryrefslogtreecommitdiff
path: root/cpukit/score/cpu/sparc/rtems/score/sparc.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/cpu/sparc/rtems/score/sparc.h')
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/sparc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/cpukit/score/cpu/sparc/rtems/score/sparc.h b/cpukit/score/cpu/sparc/rtems/score/sparc.h
index abd0f8b987..e3251d8473 100644
--- a/cpukit/score/cpu/sparc/rtems/score/sparc.h
+++ b/cpukit/score/cpu/sparc/rtems/score/sparc.h
@@ -63,11 +63,19 @@ extern "C" {
#define SPARC_NUMBER_OF_REGISTER_WINDOWS 8
/**
+ * Compile the SPARC kernel with runtime FPU detection. This is used
+ * by RTEMS kernels built without FPU but still need to be able to
+ * run tasks with FPU enabled. This way the kernel is SPARC (v7/v8)
+ * with or without FPU compatible.
+ */
+#define SPARC_DYNAMIC_FPU_DETECTION 1
+
+/**
* This macro indicates whether this multilib variation has hardware
* floating point or not. We use the gcc cpp predefine _SOFT_FLOAT
* to determine that.
*/
-#if defined(_SOFT_FLOAT)
+#if !defined(SPARC_DYNAMIC_FPU_DETECTION) && defined(_SOFT_FLOAT)
#define SPARC_HAS_FPU 0
#else
#define SPARC_HAS_FPU 1