|
From: <sv...@va...> - 2006-01-28 18:39:14
|
Author: sewardj
Date: 2006-01-28 18:39:09 +0000 (Sat, 28 Jan 2006)
New Revision: 5600
Log:
Add configure flags --enable-only64bit and --enable-only32bit with
subvert the biarch build system, something that is sometimes
convenient to do.
Modified:
trunk/configure.in
trunk/docs/xml/manual-core.xml
Modified: trunk/configure.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/configure.in 2006-01-28 17:08:23 UTC (rev 5599)
+++ trunk/configure.in 2006-01-28 18:39:09 UTC (rev 5600)
@@ -159,10 +159,11 @@
=20
# 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-ho=
sting],
- [vg_cv_inner=3D$enableval],
- [vg_cv_inner=3Dno])])
+AC_CACHE_CHECK([for use as an inner Valgrind], vg_cv_inner,
+ [AC_ARG_ENABLE(inner,=20
+ [ --enable-inner enables self-hosting],
+ [vg_cv_inner=3D$enableval],
+ [vg_cv_inner=3Dno])])
if test "$vg_cv_inner" =3D yes; then
AC_DEFINE([ENABLE_INNER], 1, [configured to run as an inner Valgrind=
])
VALT_LOAD_ADDRESS=3D$valt_load_address_inner
@@ -170,6 +171,33 @@
VALT_LOAD_ADDRESS=3D$valt_load_address_normal
fi
=20
+# 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,=20
+ [ --enable-only64bit do a 64-bit only build],
+ [vg_cv_only64bit=3D$enableval],
+ [vg_cv_only64bit=3Dno])])
+
+# 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,=20
+ [ --enable-only32bit do a 32-bit only build],
+ [vg_cv_only32bit=3D$enableval],
+ [vg_cv_only32bit=3Dno])])
+
+# Stay sane
+if test x$vg_cv_only64bit =3D xyes -a x$vg_cv_only32bit =3D xyes; then
+ AC_MSG_ERROR(
+ [Nonsensical: both --enable-only64bit and --enable-only32bit.])
+fi
+
+
+
AC_MSG_CHECKING([for a supported OS])
AC_SUBST(VG_OS)
=20
@@ -234,8 +262,16 @@
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
amd64-linux)
- VG_PLATFORM_PRI=3D"AMD64_LINUX"
- VG_PLATFORM_SEC=3D"X86_LINUX"
+ if test x$vg_cv_only64bit =3D xyes; then
+ VG_PLATFORM_PRI=3D"AMD64_LINUX"
+ VG_PLATFORM_SEC=3D""
+ elif test x$vg_cv_only32bit =3D xyes; then
+ VG_PLATFORM_PRI=3D"X86_LINUX"
+ VG_PLATFORM_SEC=3D""
+ else
+ VG_PLATFORM_PRI=3D"AMD64_LINUX"
+ VG_PLATFORM_SEC=3D"X86_LINUX"
+ fi
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc32-linux)
@@ -244,8 +280,16 @@
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
ppc64-linux)
- VG_PLATFORM_PRI=3D"PPC64_LINUX"
- VG_PLATFORM_SEC=3D"PPC32_LINUX"
+ if test x$vg_cv_only64bit =3D xyes; then
+ VG_PLATFORM_PRI=3D"PPC64_LINUX"
+ VG_PLATFORM_SEC=3D""
+ elif test x$vg_cv_only32bit =3D xyes; then
+ VG_PLATFORM_PRI=3D"PPC32_LINUX"
+ VG_PLATFORM_SEC=3D""
+ else
+ VG_PLATFORM_PRI=3D"PPC64_LINUX"
+ VG_PLATFORM_SEC=3D"PPC32_LINUX"
+ fi
AC_MSG_RESULT([ok (${host_cpu}-${host_os})])
;;
*)
Modified: trunk/docs/xml/manual-core.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/xml/manual-core.xml 2006-01-28 17:08:23 UTC (rev 5599)
+++ trunk/docs/xml/manual-core.xml 2006-01-28 18:39:09 UTC (rev 5600)
@@ -1569,7 +1569,7 @@
with <computeroutput>make regtest</computeroutput>.
</para>
=20
-<para>There are three options (in addition to the usual
+<para>There are five options (in addition to the usual
<option>--prefix=3D</option> which affect how Valgrind is built:
<itemizedlist>
=20
@@ -1585,8 +1585,8 @@
<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>
@@ -1598,6 +1598,20 @@
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>
=20
|