google / benchmark

A microbenchmark support library
Apache License 2.0
8.89k stars 1.61k forks source link

Cross compilation on Windows 10 with arm-none-eabi-g++ (10.3.1) #1375

Open ckak07 opened 2 years ago

ckak07 commented 2 years ago

Describe the bug I am trying to cross compile the latest benchmark version (git hash 808571a) with the following cross compiler on windows 10:

Using built-in specs.
COLLECT_GCC=c:\SysGCC\arm-eabi\bin\arm-none-eabi-g++.exe
COLLECT_LTO_WRAPPER=c:/sysgcc/arm-eabi/bin/../lib/gcc/arm-none-eabi/10.3.1/lto-wrapper.exe
Target: arm-none-eabi
Configured with: /opt/arm/gcc-arm-none-eabi-10.3-2021.07/src/gcc/configure --build=x86_64-linux-gnu --host=i686-w64-mingw32 --target=arm-none-eabi --prefix=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/install-mingw --libexecdir=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/install-mingw/lib --infodir=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/install-mingw/share/doc/gcc-arm-none-eabi/html --pdfdir=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-mingw-wildcard --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/install-mingw/arm-none-eabi --with-libiconv-prefix=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/build-mingw/host-libs/usr --with-gmp=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/build-mingw/host-libs/usr --with-mpfr=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/build-mingw/host-libs/usr --with-mpc=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/build-mingw/host-libs/usr --with-isl=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/build-mingw/host-libs/usr --with-libelf=/opt/arm/gcc-arm-none-eabi-10.3-2021.07/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Arm Embedded Toolchain 10.3-2021.08' --with-multilib-list=rmprofile,aprofile
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.3.1 20210621 (release) (GNU Arm Embedded Toolchain 10.3-2021.08)

I carefully read the documentation and followed the instruction that can be find here: https://github.com/google/benchmark#installation

I could successfully generate the configuration files for the ninja build system with the following line:

cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=DEBUG -DTOOLCHAIN_ROOT=c:/SysGCC/arm-eabi -DCMAKE_MAKE_PROGRAM="C:/Program Files (x86)/Sysprogs/VisualGDB/ninja.exe" -DCMAKE_TOOLCHAIN_FILE=../../../toolchain.cmake -G "Ninja" -DCMAKE_CXX_STANDARD=14 -DHAVE_POSIX_REGEX=1 -DHAVE_STEADY_CLOCK=1 ..

And this was the output:

-- The CXX compiler identification is GNU 10.3.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: c:/SysGCC/arm-eabi/bin/arm-none-eabi-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.33.0.windows.2")
-- git version: v1.6.1-35-g6a894bd5 normalized to 1.6.1.35
-- Version: 1.6.1.35
-- Looking for shm_open in rt
-- Looking for shm_open in rt - not found
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- failed to compile
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - no
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Looking for Google Test sources
-- Looking for Google Test sources in C:/Users/user/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/googletest
CMake Warning at CMakeLists.txt:37 (message):
  Did not find Google Test sources! Fetching from web...

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/user/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/build/third_party/googletest
[1/7] Performing update step for 'googletest'
[2/7] No patch step for 'googletest'
[3/7] No configure step for 'googletest'
[4/7] No build step for 'googletest'
[5/7] No install step for 'googletest'
[6/7] No test step for 'googletest'
[7/7] Completed 'googletest'
-- The C compiler identification is GNU 10.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: c:/SysGCC/arm-eabi/bin/arm-none-eabi-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python: C:/Python3.7.7/python.exe (found version "3.7.7") found components: Interpreter
-- Performing Test BENCHMARK_HAS_O3_FLAG
-- Performing Test BENCHMARK_HAS_O3_FLAG - Success
-- Performing Test BENCHMARK_HAS_WNO_ODR
-- Performing Test BENCHMARK_HAS_WNO_ODR - Success
-- Performing Test BENCHMARK_HAS_WNO_LTO_TYPE_MISMATCH
-- Performing Test BENCHMARK_HAS_WNO_LTO_TYPE_MISMATCH - Success
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/user/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/build

Everything looks good for me until now. When I try to build the source code I get the following error:

C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/sleep.cc:53:10: error: 'nanosleep' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/colorprint.cc:184:22: error: 'fileno' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:69:14: error: 'condition_variable' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:81:8: error: 'mutex' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:84:8: error: 'mutex' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:79:27: error: 'mut_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:80:29: error: 'mut_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:33: error: 'mutex' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:33: error: 'mutex' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:38: error: template argument 1 is invalid
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:91:42: error: 'class benchmark::Mutex' has no member named 'native_handle'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:122:3: error: 'Condition' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:110:22: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:117:24: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:142:7: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:69:14: error: 'condition_variable' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:81:8: error: 'mutex' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:84:8: error: 'mutex' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:79:27: error: 'mut_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:80:29: error: 'mut_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:33: error: 'mutex' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:33: error: 'mutex' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:38: error: template argument 1 is invalid
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:91:42: error: 'class benchmark::Mutex' has no member named 'native_handle'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:122:3: error: 'Condition' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:110:22: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:117:24: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:142:7: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/thread_manager.h:57:3: error: 'Condition' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/thread_manager.h:29:7: error: 'end_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/thread_manager.h:35:5: error: 'end_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.h:77:20: error: 'thread' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.h:77:20: error: 'thread' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.h:77:26: error: template argument 1 is invalid
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.h:77:26: error: template argument 2 is invalid
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:183:38: error: request for member 'size' in '((benchmark::internal::BenchmarkRunner*)this)->benchmark::internal::BenchmarkRunner::pool', which is of non-class type 'int'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:184:9: error: invalid types 'int[std::size_t {aka unsigned int}]' for array subscript
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:184:21: error: 'thread' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:194:13: error: 'thread' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:194:28: error: found ':' in nested-name-specifier, expected '::'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:194:21: error: 'thread' has not been declared
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:196:21: error: expected initializer before ';' token
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:196:21: error: could not convert 'i' from 'benchmark::internal::BenchmarkRunner::IterationResults' to 'bool'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:198:3: error: expected primary-expression before '{' token
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:196:22: error: expected ')' before '{' token
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.cc:207:3: error: 'i' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:69:14: error: 'condition_variable' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:81:8: error: 'mutex' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:84:8: error: 'mutex' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:79:27: error: 'mut_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:80:29: error: 'mut_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:33: error: 'mutex' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:33: error: 'mutex' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:38: error: template argument 1 is invalid
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:91:42: error: 'class benchmark::Mutex' has no member named 'native_handle'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:122:3: error: 'Condition' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:110:22: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:117:24: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:142:7: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:69:14: error: 'condition_variable' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:81:8: error: 'mutex' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:84:8: error: 'mutex' in namespace 'std' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:79:27: error: 'mut_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:80:29: error: 'mut_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:33: error: 'mutex' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:33: error: 'mutex' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:88:38: error: template argument 1 is invalid
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:91:42: error: 'class benchmark::Mutex' has no member named 'native_handle'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:122:3: error: 'Condition' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:110:22: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:117:24: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/mutex.h:142:7: error: 'phase_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/thread_manager.h:57:3: error: 'Condition' does not name a type
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/thread_manager.h:29:7: error: 'end_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/thread_manager.h:35:5: error: 'end_condition_' was not declared in this scope
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.h:77:20: error: 'thread' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.h:77:20: error: 'thread' is not a member of 'std'
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.h:77:26: error: template argument 1 is invalid
C:/Users/userc/source/repos/EmbeddedBenchmark/3rdPartyLibs/benchmark/src/benchmark_runner.h:77:26: error: template argument 2 is invalid

And this is the content of my toolchan file:

set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR arm)

SET(CMAKE_C_COMPILER "${TOOLCHAIN_ROOT}/bin/arm-none-eabi-gcc.exe")
SET(CMAKE_CXX_COMPILER "${TOOLCHAIN_ROOT}/bin/arm-none-eabi-g++.exe")
SET(CMAKE_ASM_COMPILER "${TOOLCHAIN_ROOT}/bin/arm-none-eabi-g++.exe")
SET(CMAKE_LD "${TOOLCHAIN_ROOT}/bin/arm-none-eabi-ld.exe")

set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)
set(THREADS_PREFER_PTHREAD_FLAG ON)

add_compile_options(--specs=nosys.specs --specs=nano.specs)
add_link_options(--specs=nosys.specs --specs=nano.specs)

Do you have any additions informations for me to be able to cross compile your software on my system?

Thanks in advance

Mhubris commented 2 years ago

Hey @ckak07 did you find the solution for your problem? I'm facing the exact same problem.