11 March 2008

This is an approved src.alt for 447.dealII in CPU2006 v1.0 and v1.0.1.
It fixes a problem seen when building the benchmark using GCC 4.3 and
other compilers that use its header files.

To apply the src.alt, unpack the tar file in the top level of the CPU2006
directory.  The following sequence of commands should accomplish this:

$ /bin/sh
$ cd <cpu2006 dir>
$ . ./shrc
$ go top
$ specbzip2 -dc <src.alt tarball> | spectar -xvf -

Please replace the items in angle brackets ( <> ) as appropriate.

To have the src.alt applied during compilation, please add the following
stanza to your config file:

# Explicitly include header files <cstring> and <cstdlib>
447.dealII:
srcalt = explicit_inclusion_of_cstring

This src.alt adds explicit inclusion of <cstring> to one file and <cstdlib>
to another to avoid compilation errors.

Please address any questions about this src.alt to cpu2006support@spec.org.

DETAILS OF CHANGE:

With GCC 4.3, many of the standard C++ library include files have been edited
to include the smallest possible number of additional files. As such, many
C++ programs that used std::memcpy without including <cstring>, or used
std::atof without including <cstdlib> will no longer compile.

This src.alt just adds the following three lines:

#if defined(SPEC_CPU)
#include <cstring>
#endif /* SPEC_CPU */

to vector.template.h and the following three lines:

#if defined(SPEC_CPU)
#include <cstdlib>
#endif

to quadrature.cc to avoid the compilation errors.
