Skip to content

Commit 0bd9c8d

Browse files
anjiahao1xiaoxiang781216
authored andcommitted
Kconfig:Add an option to disable compilation of floating point related files
Signed-off-by: anjiahao <[email protected]>
1 parent 16c90ad commit 0bd9c8d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,14 @@ config ARCH_FLOAT_H
567567
there is no assurance that the settings in this float.h are actually
568568
correct for your platform!
569569

570+
config DISABLE_FLOAT
571+
bool "Disable floating point"
572+
default n
573+
---help---
574+
Disable floating point support in the compiler. This will reduce
575+
code size and increase performance. This option is only available
576+
on some architectures.
577+
570578
config ARCH_HAVE_STDARG_H
571579
bool
572580
default n

include/nuttx/compiler.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,12 @@
12071207
# undef CONFIG_FS_LARGEFILE
12081208
#endif
12091209

1210+
#ifdef CONFIG_DISABLE_FLOAT
1211+
# undef CONFIG_HAVE_FLOAT
1212+
# undef CONFIG_HAVE_DOUBLE
1213+
# undef CONFIG_HAVE_LONG_DOUBLE
1214+
#endif
1215+
12101216
/****************************************************************************
12111217
* Public Function Prototypes
12121218
****************************************************************************/

0 commit comments

Comments
 (0)