# Check if this should be built as an inner Valgrind, to be run within
# another Valgrind. Choose the load address accordingly.
-AC_CACHE_CHECK([enable use as an inner Valgrind], vg_cv_inner,
- [AC_ARG_ENABLE(inner, [ --enable-inner enables self-hosting],
- [vg_cv_inner=$enableval],
- [vg_cv_inner=no])])
+AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner,
+ [AC_ARG_ENABLE(inner,
+ [ --enable-inner enables self-hosting],
+ [vg_cv_inner=$enableval],
+ [vg_cv_inner=no])])
if test "$vg_cv_inner" = yes; then
AC_DEFINE([ENABLE_INNER], 1, [configured to run as an inner Valgrind])
VALT_LOAD_ADDRESS=$valt_load_address_inner
VALT_LOAD_ADDRESS=$valt_load_address_normal
fi
+# Sometimes it's convenient to subvert the bi-arch build system and
+# just have a single build even though the underlying platform is
+# capable of both. Hence handle --enable-only64bit and
+# --enable-only32bit. Complain if both are issued :-)
+
+# Check if a 64-bit only build has been requested
+AC_CACHE_CHECK([for a 64-bit only build], vg_cv_only64bit,
+ [AC_ARG_ENABLE(only64bit,
+ [ --enable-only64bit do a 64-bit only build],
+ [vg_cv_only64bit=$enableval],
+ [vg_cv_only64bit=no])])
+
+# Check if a 32-bit only build has been requested
+AC_CACHE_CHECK([for a 32-bit only build], vg_cv_only32bit,
+ [AC_ARG_ENABLE(only32bit,
+ [ --enable-only32bit do a 32-bit only build],
+ [vg_cv_only32bit=$enableval],
+ [vg_cv_only32bit=no])])
+
+# Stay sane
+if test x$vg_cv_only64bit = xyes -a x$vg_cv_only32bit = xyes; then
+ AC_MSG_ERROR(
+ [Nonsensical: both --enable-only64bit and --enable-only32bit.])
+fi
+
+
+
AC_MSG_CHECKING([for a supported OS])
AC_SUBST(VG_OS)
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
amd64-linux)
- VG_PLATFORM_PRI="AMD64_LINUX"
- VG_PLATFORM_SEC="X86_LINUX"
+ if test x$vg_cv_only64bit = xyes; then
+ VG_PLATFORM_PRI="AMD64_LINUX"
+ VG_PLATFORM_SEC=""
+ elif test x$vg_cv_only32bit = xyes; then
+ VG_PLATFORM_PRI="X86_LINUX"
+ VG_PLATFORM_SEC=""
+ else
+ VG_PLATFORM_PRI="AMD64_LINUX"
+ VG_PLATFORM_SEC="X86_LINUX"
+ fi
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc32-linux)
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc64-linux)
- VG_PLATFORM_PRI="PPC64_LINUX"
- VG_PLATFORM_SEC="PPC32_LINUX"
+ if test x$vg_cv_only64bit = xyes; then
+ VG_PLATFORM_PRI="PPC64_LINUX"
+ VG_PLATFORM_SEC=""
+ elif test x$vg_cv_only32bit = xyes; then
+ VG_PLATFORM_PRI="PPC32_LINUX"
+ VG_PLATFORM_SEC=""
+ else
+ VG_PLATFORM_PRI="PPC64_LINUX"
+ VG_PLATFORM_SEC="PPC32_LINUX"
+ fi
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
*)
with <computeroutput>make regtest</computeroutput>.
</para>
-<para>There are three options (in addition to the usual
+<para>There are five options (in addition to the usual
<option>--prefix=</option> which affect how Valgrind is built:
<itemizedlist>
<listitem>
<para><option>--enable-tls</option></para>
<para>TLS (Thread Local Storage) is a relatively new mechanism which
- requires compiler, linker and kernel support. Valgrind
- automatically test if TLS is supported and enable this option.
+ requires compiler, linker and kernel support. Valgrind tries to
+ automatically test if TLS is supported and if so enables this option.
Sometimes it cannot test for TLS, so this option allows you to
override the automatic test.</para>
</listitem>
the root of the source tree.
</para>
</listitem>
+
+ <listitem>
+ <para><option>--enable-only64bit</option></para>
+ <para><option>--enable-only32bit</option></para>
+ <para>On 64-bit
+ platforms (amd64-linux, ppc64-linux), Valgrind is by default built
+ in such a way that both 32-bit and 64-bit executables can be run.
+ Sometimes this cleverness is a problem for a variety of reasons.
+ These two flags allow for single-target builds in this situation.
+ If you issue both, the configure script will complain. Note they
+ are ignored on 32-bit-only platforms (x86-linux, ppc32-linux).
+ </para>
+ </listitem>
+
</itemizedlist>
</para>