I am trying to use Coverity Scan with an embedded application written in C ++ 17 (ARM GCC Embedded v7.2). The application itself works well and does not contain errors / warnings; however, the Self-Build Coverty Scan tool ( cov-analysis-linux64-2017.07 , the latter) cannot compile certain C ++ files with the following error (abbreviated):
[19888] EXECUTING: /home/pavel/opt/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/as -I . -I src -I src/os_config -I eigen -I senoval -I legilimens -I popcop/c++ -I build/current_build_info -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -meabi=5 -alms=build/lst/ch.lst -o build/obj/ch.o /tmp/ccK73Qaa.s "/home/pavel/opt/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/include/c++/7.2.1/bits/c++17_warning.h", line 32: error #35: #error directive: This file requires compiler and library support for the ISO C++ 2017 standard. This support must be enabled with the -std=c++17 or -std=gnu++17 compiler options. #error This file requires compiler and library support \ ^
As you can see, the build tool did not pass the -std=c++17 option to the assembler. By the way, the native build system of the application does not make direct calls to the assembler; The Self-Build tool does this on its own. Here's how the Self-Build Coverity process is configured:
cov-configure --comptype gcc --compiler arm-none-eabi-gcc --template make clean cov-build --dir build/cov-int make -j8 cd build tar czvf coverity.tgz cov-int
How to configure the Self-Build tool for the correct assembly of C ++ 17 code?
source share