I want to do some program analysis project on C program. So far, I want to get one C program as the input for clang, and then I use LLVM to make some analysis.
I want to do some experiment on gnu unix utility. For example: diff (https://www.gnu.org/software/diffutils/).
For example, when I want to do analysis on src/diff.c
:
My command is: clang -emit-llvm -O0 -c diff.c -o test.bc
However I will get the below error:
./system.h:21:10: fatal error: 'config.h' file not found
which seems that clang cannot find config.h
.
So my question is how to parse single program in a GNU utility? Do I need to write a Makefile or where can I find something like config.h?