Hello! Attached patch defines _SOFT_FLOAT internal define for !TARGET_80387 for all x86 targets, similar to what RTEMS has been doing. This define can be used to disable various parts af hardware FPU support in libgcc, when -mno-80387 a.k.a. -soft-float is in effect. Please also see the thread, starting at [1].
2013-11-03 Uros Bizjak <ubiz...@gmail.com> * config/i386/i386-c.c (ix86_target_macros): Define _SOFT_FLOAT for !TARGET_80387. * config/i386/rtemself.h (TARGET_OS_CPP_BUILTINS): Do not define _SOFT_FLOAT here. Patch was bootstrapped and regression tested on x96_64-pc-linux-gnu {,-m32}. I will wait a couple of days for possible comments. [1] http://gcc.gnu.org/ml/gcc-help/2013-10/msg00002.html Uros.
Index: config/i386/i386-c.c =================================================================== --- config/i386/i386-c.c (revision 204324) +++ config/i386/i386-c.c (working copy) @@ -467,6 +467,9 @@ ix86_target_macros (void) builtin_define_std ("i386"); } + if (!TARGET_80387) + cpp_define (parse_in, "_SOFT_FLOAT"); + if (TARGET_LONG_DOUBLE_64) cpp_define (parse_in, "__LONG_DOUBLE_64__"); Index: config/i386/rtemself.h =================================================================== --- config/i386/rtemself.h (revision 204324) +++ config/i386/rtemself.h (working copy) @@ -26,7 +26,5 @@ along with GCC; see the file COPYING3. If not see builtin_define ("__rtems__"); \ builtin_define ("__USE_INIT_FINI__"); \ builtin_assert ("system=rtems"); \ - if (!TARGET_80387) \ - builtin_define ("_SOFT_FLOAT"); \ } \ while (0)