Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuttx/sim: Remove math.h in sim. #68

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions arch/sim/include/math.h

This file was deleted.

1 change: 0 additions & 1 deletion boards/sim/sim/sim/configs/libcxxtest/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ CONFIG_ARCH="sim"
CONFIG_ARCH_BOARD="sim"
CONFIG_ARCH_BOARD_SIM=y
CONFIG_ARCH_CHIP="sim"
CONFIG_ARCH_MATH_H=y
CONFIG_ARCH_SIM=y
CONFIG_BOARDCTL_APP_SYMTAB=y
CONFIG_BOARDCTL_POWEROFF=y
Expand Down
17 changes: 17 additions & 0 deletions libs/libxx/0001-Fix-build-error-about-__GLIBC__.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git libcxx/src/locale.cpp libcxx/src/locale.cpp
--- libcxx/src/locale.cpp
+++ libcxx/src/locale.cpp
@@ -41,6 +41,10 @@
#include "include/atomic_support.h"
#include "include/sso_allocator.h"

+#if defined(__NuttX__) && defined(__GLIBC__)
+# undef __GLIBC__
+#endif
+
// On Linux, wint_t and wchar_t have different signed-ness, and this causes
// lots of noise in the build log, but no bugs that I know of.
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wsign-conversion")
--
2.34.1

4 changes: 3 additions & 1 deletion libs/libxx/libcxx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/libcxx)
${CMAKE_CURRENT_LIST_DIR}/libcxx <
${CMAKE_CURRENT_LIST_DIR}/0001-libcxx-remove-mach-time-h.patch && patch
-p1 -d ${CMAKE_CURRENT_LIST_DIR}/libcxx <
${CMAKE_CURRENT_LIST_DIR}/0001-libcxx-fix-ld-errors.patch
${CMAKE_CURRENT_LIST_DIR}/0001-libcxx-fix-ld-errors.patch && patch -p1 -d
${CMAKE_CURRENT_LIST_DIR}/libcxx <
${CMAKE_CURRENT_LIST_DIR}/0001-Fix-build-error-about-__GLIBC__.patch
DOWNLOAD_NO_PROGRESS true
TIMEOUT 30)

Expand Down
1 change: 1 addition & 0 deletions libs/libxx/libcxx.defs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ libcxx: libcxx-$(LIBCXX_VERSION).src.tar.xz
$(Q) patch -p2 < mbstate_t.patch
$(Q) patch -p0 < 0001-libcxx-remove-mach-time-h.patch
$(Q) patch -p0 < 0001-libcxx-fix-ld-errors.patch
$(Q) patch -p0 < 0001-Fix-build-error-about-__GLIBC__.patch
$(Q) touch $@
endif

Expand Down
Loading