This is a modified version version of klee-uclibc. Please see README for information about uClibc.
To build uClibc for KLEE:
-
Use
--with-llvm-configto set your llvm-config binary. The LLVM version used byllvm-configshould match the LLVM version used by the C LLVM Bitcode compiler you intend to use in step 2. -
Use
--with-ccto set your C LLVM Bitcode compiler. -
Run the configure script.
$ ./configure --make-llvm-lib --with-cc <PATH_TO_CLANG> --with-llvm-config <PATH_TO_LLVM_CONFIG_BINARY>To see all options run
$ ./configure --help -
By default a uClibc pre built
.configfile will be added to the uClibc root directory by the configure script. This is done to make compilation easier for users. However the --disable-prebuilt-config flag can be used to prevent a.configfile being added. If you wish to create your own.configyou can do so by runningmake menuconfigormake configafter running the configure script. -
Compile
$ make KLEE_CFLAGS="-fno-discard-value-names -mlong-double-64"We use
KLEE_CFLAGShere to add additional flags to disable fp80 and preserve variable name in generated IR.