diff options
Diffstat (limited to 'gcc/config/avr/avr-c.c')
-rw-r--r-- | gcc/config/avr/avr-c.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/gcc/config/avr/avr-c.c b/gcc/config/avr/avr-c.c index 1b75186..35f3e7e 100644 --- a/gcc/config/avr/avr-c.c +++ b/gcc/config/avr/avr-c.c @@ -390,6 +390,20 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile) cpp_define (pfile, "__WITH_AVRLIBC__"); #endif /* WITH_AVRLIBC */ + // From configure --with-libf7={|libgcc|math|math-symbols|yes|no} + +#ifdef WITH_LIBF7_LIBGCC + cpp_define (pfile, "__WITH_LIBF7_LIBGCC__"); +#endif /* WITH_LIBF7_LIBGCC */ + +#ifdef WITH_LIBF7_MATH + cpp_define (pfile, "__WITH_LIBF7_MATH__"); +#endif /* WITH_LIBF7_MATH */ + +#ifdef WITH_LIBF7_MATH_SYMBOLS + cpp_define (pfile, "__WITH_LIBF7_MATH_SYMBOLS__"); +#endif /* WITH_LIBF7_MATH_SYMBOLS */ + // From configure --with-double={|32|32,64|64,32|64} #ifdef HAVE_DOUBLE_MULTILIB @@ -438,7 +452,23 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile) #error "align this with config.gcc" #endif - + // From configure --with-double-comparison={2|3} --with-libf7. + +#if defined (WITH_DOUBLE_COMPARISON) +#if WITH_DOUBLE_COMPARISON == 2 || WITH_DOUBLE_COMPARISON == 3 + /* The number of states a DFmode comparison libcall might take and + reflects what avr.c:FLOAT_LIB_COMPARE_RETURNS_BOOL returns for + DFmode. GCC's default is 3-state, but some libraries like LibF7 + implement true / false (2-state). */ + cpp_define_formatted (pfile, "__WITH_DOUBLE_COMPARISON__=%d", + WITH_DOUBLE_COMPARISON); +#else +#error "align this with config.gcc" +#endif +#else +#error "align this with config.gcc" +#endif + /* Define builtin macros so that the user can easily query whether non-generic address spaces (and which) are supported or not. This is only supported for C. For C++, a language extension is needed |