This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 0bd9c8d7ae Kconfig:Add an option to disable compilation of floating 
point related files
0bd9c8d7ae is described below

commit 0bd9c8d7aed3bc52daeb0dce576dbcfeaff07f74
Author: anjiahao <anjia...@xiaomi.com>
AuthorDate: Mon Jun 3 20:06:23 2024 +0800

    Kconfig:Add an option to disable compilation of floating point related files
    
    Signed-off-by: anjiahao <anjia...@xiaomi.com>
---
 Kconfig                  | 8 ++++++++
 include/nuttx/compiler.h | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/Kconfig b/Kconfig
index 3fc3d8ecd2..090ae6c0e6 100644
--- a/Kconfig
+++ b/Kconfig
@@ -567,6 +567,14 @@ config ARCH_FLOAT_H
                there is no assurance that the settings in this float.h are 
actually
                correct for your platform!
 
+config DISABLE_FLOAT
+       bool "Disable floating point"
+       default n
+       ---help---
+               Disable floating point support in the compiler. This will reduce
+               code size and increase performance. This option is only 
available
+               on some architectures.
+
 config ARCH_HAVE_STDARG_H
        bool
        default n
diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h
index f0374298cc..293775f193 100644
--- a/include/nuttx/compiler.h
+++ b/include/nuttx/compiler.h
@@ -1207,6 +1207,12 @@
 #  undef CONFIG_FS_LARGEFILE
 #endif
 
+#ifdef CONFIG_DISABLE_FLOAT
+#  undef CONFIG_HAVE_FLOAT
+#  undef CONFIG_HAVE_DOUBLE
+#  undef CONFIG_HAVE_LONG_DOUBLE
+#endif
+
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/

Reply via email to