| 239 | | # *** Coreutils 5.93 *** |
|---|
| 240 | | # The first package that will compile with ICC is Coreutils, and it can be |
|---|
| 241 | | # profiled too. Compile Coreutils like this (apply patches first): |
|---|
| 242 | | |
|---|
| 243 | | env CFLAGS="$ICC_CFLAGS -prof_gen -prof_dir=$(pwd)" LC_ALL="C" \ |
|---|
| 244 | | LANG="en" LANGUAGE="en" CC="icc" ./configure --prefix=/usr && make && |
|---|
| 245 | | make clean && |
|---|
| 246 | | make CFLAGS="$ICC_CFLAGS -prof_use -prof_dir=$(pwd)" |
|---|
| 247 | | |
|---|
| 248 | | # Then run the testsuite, everything should pass, and install Coreutils. |
|---|
| 249 | | |
|---|
| 250 | | # *** Zlib 1.2.3 *** |
|---|
| 251 | | # I suggest you compile Zlib with GCC so that X11 will link to it. Also, Zlib |
|---|
| 252 | | # can't compile with ICC's profiling. If you do not plan to use X11, then: |
|---|
| 253 | | |
|---|
| 254 | | env CFLAGS="$ICC_CFLAGS -fpic -gcc" LC_ALL="C" LANG="en" LANGUAGE="en" \ |
|---|
| 255 | | CC="icc" ./configure --prefix=/usr --shared --libdir=/lib && |
|---|
| 256 | | make && make check |
|---|
| 257 | | |
|---|
| 258 | | # If 'make check' went well.. |
|---|
| 259 | | |
|---|
| 260 | | make install && rm -v /lib/libz.so && |
|---|
| 261 | | ln -sfv ../../lib/libz.so.1.2.3 /usr/lib/libz.so && |
|---|
| 262 | | make clean && env CFLAGS="$ICC_CFLAGS -gcc" LC_ALL="C" \ |
|---|
| 263 | | LANG="en" LANGUAGE="en" CC="icc" ./configure --prefix=/usr && |
|---|
| 264 | | make && make install && chmod -v 644 /usr/lib/libz.a |
|---|
| 265 | | |
|---|
| 266 | | # As you can see, when compiling with profiling we add "-prof_gen" and |
|---|
| 267 | | # "-prof_dir=$(pwd)" to CFLAGS/CXXFLAGS for the first build. Then 'make clean', |
|---|
| 268 | | # and replace "-prof_gen" with "-prof_use", then make check, then install. |
|---|
| | 239 | # To use ICC profiling we need to add "-prof_gen" and "-prof_dir=$(pwd)" to |
|---|
| | 240 | # CFLAGS/CXXFLAGS for the first build. Then run 'make check' in order to run the |
|---|
| | 241 | # programs and generate profiling data. If you are able to run the programs better |
|---|
| | 242 | # than how 'make check' does, then I suggest you do that. Then 'make clean', and |
|---|
| | 243 | # finally make again with "-prof_use". You can run 'make check' again if you like, |
|---|
| | 244 | # and 'make install'. |
|---|