0

I'm trying to compile VxWorks 7 SR660 on Wind River Workbench using clang version 10.0.1.1. When compiling without debugging (-g flag) the compilation succeeds, when adding -g flag I get an error "error: unknown argument: '-g'". The flags I use are:

  clang -cc1 -triple=i386 -emit-obj -mrelocation-model static  -fgnuc-version=4.2.1
     -D __VXWORKS__  -D CPU=_VX_CORE -D TOOL_FAMILY=llvm -D TOOL=llvm -D _WRS_KERNEL -D _WRS_VX
    _SMP -D _WRS_CONFIG_SMP -O0 -g -Wall -Wno-deprecated-declarations

Does anyone encounter this problem before?

Thank you.

Eig
  • 31
  • 2

1 Answers1

0

Run clang -v, with and without the -g and compare the flags it uses for the -cc1 command. I find that without -g, it adds two flags: -debug-info-kind=limited and -dwarf-version=4. In other words, -g is a command for the compiler driver, not for the C compiler itself.

TallChuck
  • 1,725
  • 11
  • 28