confdefs.h fails to compile when included in C++20 source
Summary
When trying to compile RTEMS samples with C++20 (cxxflags: -std=c++20), iostream fails to build with the following errors: iostream_build_log.txt
This config uses gcc 13.3.0 for riscv but I have noticed it on gcc 12.1.0 for sparc also.
Steps to reproduce
- This can be reproduced with current HEADs of rtems/rsb:
https://gitlab.rtems.org/rtems/rtos/rtems c4625d8d86be1497c62ceca26a96fba2bc32c03a
https://gitlab.rtems.org/rtems/tools/rtems-source-builder d82e3f433ba1441dc97e9d3c78eb0eb93212ed16
- Build tools
../source-builder/sb-set-builder --prefix=/home/user/work/rtems-source-builder/build 6/rtems-riscv
- then clone rtems, create this basic config.ini and build:
[riscv/rv64imafdc]
RTEMS_SMP = True
RTEMS_POSIX_API = True
BSP_RESET_BOARD_AT_EXIT = 0
./waf configure --prefix=/home/user/work/rtems-source-builder/build/
./waf
-
Modify testsuites/samples/iostream with the following patch: iostream.yml.patch
-
Rebuild.
Expected behaviour
Sample compiles with no errors.
Edited by Chris Johns