leducp commented on PR #11269:
URL: https://github.com/apache/nuttx/pull/11269#issuecomment-1829319990

   The porting is not completly finished, mainly because I didn't try with 
older version of the lib and I was focused on the missing symbols bug.
   
   Hereafter a patch with the modifications:
   
   ```
   diff --git a/libs/libxx/__config_site b/libs/libxx/__config_site
   index 8662a132f0..9131580ad5 100644
   --- a/libs/libxx/__config_site
   +++ b/libs/libxx/__config_site
   @@ -9,10 +9,6 @@
    #ifndef _LIBCPP___CONFIG_SITE
    #define _LIBCPP___CONFIG_SITE
    
   -/* The following is generated from include/__config_site.in
   - * in Ubunutu 22.0.4 with g++ 11.3.0.
   - */
   -
    #define _LIBCPP_ABI_VERSION 1
    #define _LIBCPP_ABI_NAMESPACE __1
    /* #undef _LIBCPP_ABI_FORCE_ITANIUM */
   @@ -23,18 +19,24 @@
    /* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
    /* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
    /* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
   -/* #undef _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL */
    /* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */
    #define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
    /* #undef _LIBCPP_NO_VCRUNTIME */
    /* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */
   -/* #undef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY */
   -/* #undef _LIBCPP_HAS_PARALLEL_ALGORITHMS */
   +/* #undef _LIBCPP_HAS_NO_FILESYSTEM */
    /* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */
    /* #undef _LIBCPP_HAS_NO_LOCALIZATION */
    /* #undef _LIBCPP_HAS_NO_WIDE_CHARACTERS */
   -#define _LIBCPP_ENABLE_ASSERTIONS_DEFAULT 0
   -/* #undef _LIBCPP_ENABLE_DEBUG_MODE */
   +#define _LIBCPP_HAS_NO_STD_MODULES
   +/* #undef _LIBCPP_HAS_NO_TIME_ZONE_DATABASE */
   +
   +// PSTL backends
   +#define _LIBCPP_PSTL_CPU_BACKEND_SERIAL
   +/* #undef _LIBCPP_PSTL_CPU_BACKEND_THREAD */
   +/* #undef _LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH */
   +
   +// Hardening.
   +#define _LIBCPP_HARDENING_MODE_DEFAULT 2
    
    // __USE_MINGW_ANSI_STDIO gets redefined on MinGW
    #ifdef __clang__
   diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs
   index 9d5922ff93..937c1969fa 100644
   --- a/libs/libxx/libcxx.defs
   +++ b/libs/libxx/libcxx.defs
   @@ -46,6 +46,11 @@ ifeq ($(wildcard libcxx/.git),)
    endif
    
    CXXFLAGS += ${DEFINE_PREFIX}_LIBCPP_BUILDING_LIBRARY
   +
   +CXXFLAGS += ${DEFINE_PREFIX}__STDC_CONSTANT_MACROS
   +CXXFLAGS += ${DEFINE_PREFIX}__STDC_FORMAT_MACROS
   +CXXFLAGS += ${DEFINE_PREFIX}__STDC_LIMIT_MACROS
   +
    CXXFLAGS += ${INCDIR_PREFIX}$(CURDIR)/libcxx/src
    
    ifeq ($(CONFIG_LIBSUPCXX), y)
   @@ -139,3 +144,5 @@ endif
    CPPSRCS += $(wildcard libcxx/src/*.cpp)
    CPPSRCS += $(wildcard libcxx/src/experimental/*.cpp)
    CPPSRCS += $(wildcard libcxx/src/filesystem/*.cpp)
   +CPPSRCS += $(wildcard libcxx/src/ryu/*.cpp)
   +
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to