![]() |
| | OpenIMPACT | Documentation | Current Status | Software Releases | Recompiled Software | FAQ | |
Modifying OpenIMPACT's build system requires
The source directory (containing this file) will be referred to as <sourcedir> in these instructions.
To build in the source tree:
cd <sourcedir>
./configure
make
To build outside the source tree:
mkdir <builddir>
cd <builddir>
<sourcedir>/configure
make
When running make, you may see errors toward the end when processing lib.c. These are typically not fatal, even if they are repeated several times. lib.c consists of stubs that emulate library functions for pointer analysis. Some stubs depend on headers for libraries that may not be installed on your system. You may see errors when these files are not generated, but these are non-fatal. They will only cause problems if you run pointer analysis on a program that uses the non-existant library.
Make creates an init-impact script in the build directory that you can source to set some necessary environment variables and alter your path so you can find the OpenIMPACT tools. Source this file using 'source' in csh or '.' in sh.
After building, you can install the tools in a system directory for multiple users to use. Executing
make install
installs OpenIMPACT under the prefix specified by the --prefix option to configure (/usr/local by default). After running 'make install', the init-impact script will be available from <prefix>/bin/init-impact.
After sourcing init-impact, the OpenIMPACT driver, oicc, will be in your path. oicc works much like a standard C compiler. Some common options are:
| -c | Compile to a .o file; do not link. |
| -O0, -O, -O1, -O2, -O3 | Set the optimization level. |
| -o | Specify the output file name. |
| -D | Define a preprocessor symbol. |
| -I | Specify a path to search for include files. |
| -L | Specify a path to search for libraries. |
| -l | Specify a library to link into the final binary. |
| --verbose | Print the output of each compilation stage to standard output. |
oicc has many other options. See 'oicc --help' for the complete list.
For best performance, it is necessary to collect profile information on your program. Profiling with oicc has five steps.
If you have previously used compile_bench to drive IMPACT, there are some notable differences between compile_bench and oicc. Many optimizations are turned off by default in oicc that are performed by default by the old drivers.
The following oicc invocation (plus the profiling runs) is
equivalent to the old driver scripts:
oicc -O --do-pointer-analysis --do-inlining
See the oicc manual for more information on oicc.
See the OpenIMPACT automake manual for more information on the build system.
| OpenIMPACT is sponsored by | |||
![]() | ![]() | ||
| Please contact us with any questions or comments. | |||