Browse Source

sh_fpu: Do not allow inclusion of fpu_control on not SH4 core

Instead of emitting a warning even when compiling for SH4, stop
compilation with an #error directive when not on SH4 core.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Carmelo Amoroso 14 years ago
parent
commit
6c6720bb83
1 changed files with 3 additions and 1 deletions
  1. 3 1
      libc/sysdeps/linux/sh/fpu_control.h

+ 3 - 1
libc/sysdeps/linux/sh/fpu_control.h

@@ -20,7 +20,9 @@
 #ifndef _FPU_CONTROL_H
 #ifndef _FPU_CONTROL_H
 #define _FPU_CONTROL_H
 #define _FPU_CONTROL_H
 
 
-#warning This file is only correct for sh4
+#ifndef __SH4__
+#error This file is only correct for sh4
+#endif
 
 
 /* masking of interrupts */
 /* masking of interrupts */
 #define _FPU_MASK_VM	0x0800	/* Invalid operation */
 #define _FPU_MASK_VM	0x0800	/* Invalid operation */