|
From: Dirk M. <mu...@kd...> - 2005-07-27 16:43:42
|
SVN commit 439276 by mueller:
- compile against glibc 2.4
- compile against gcc 4.0.x
M +1 -0 NEWS =20
M +2 -2 README =20
M +65 -1 configure.in =20
A glibc-2.4.supp glibc-2.3.supp#439275
M +1 -1 memcheck/tests/scalar.c =20
M +1 -1 none/tests/x86/Makefile.am =20
--- trunk/valgrind/NEWS #439275:439276
@@ -27,6 +27,7 @@
- fix stabs debug info reading for FreePascal binaries
- update syscall table to include new syscalls included in
Linux 2.6.13.
+- updates to compile properly with gcc 4.x and glibc 2.4
=20
New features:
=20
--- trunk/valgrind/README #439275:439276
@@ -47,8 +47,8 @@
=20
Valgrind is closely tied to details of the CPU, operating system and
to a less extent, compiler and basic C libraries. This makes it
-difficult to make it portable, so I have chosen at the outset to
-concentrate on what I believe to be a widely used platform: x86/Linux.
+difficult to make it portable. Nonetheless, it is available for
+the following platforms: x86/Linux, AMD64/Linux and PPC32/Linux.
=20
Valgrind is licensed under the GNU General Public License, version 2.=20
Read the file COPYING in the source distribution for details.
--- trunk/valgrind/configure.in #439275:439276
@@ -193,6 +193,16 @@
],
glibc=3D"2.3")
=20
+AC_EGREP_CPP([GLIBC_24], [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ =3D=3D 2 && __GLIBC_MINOR__ =3D=3D 4)
+ GLIBC_24
+ #endif
+#endif
+],
+glibc=3D"2.4")
+
AC_MSG_CHECKING([the glibc version])
=20
case "${glibc}" in
@@ -214,9 +224,15 @@
DEFAULT_SUPP=3D"${DEFAULT_SUPP} glibc-2.3.supp"
;;
=20
+ 2.4)
+ AC_MSG_RESULT(2.4 family)
+ AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x])
+ DEFAULT_SUPP=3D"${DEFAULT_SUPP} glibc-2.4.supp"
+ ;;
+
*)
AC_MSG_RESULT(unsupported version)
- AC_MSG_ERROR([Valgrind requires the glibc version 2.1, 2.2 or 2.3])
+ AC_MSG_ERROR([Valgrind requires the glibc version 2.1, 2.2, 2.3 or 2.4]=
)
;;
esac
=20
@@ -269,6 +285,54 @@
])
CFLAGS=3D$safe_CFLAGS
=20
+USE_MMX_REGISTER=3D""
+AC_MSG_CHECKING([if gcc accepts -mmmx ])
+
+safe_CFLAGS=3D$CFLAGS
+CFLAGS=3D"-mmmx"
+
+AC_TRY_COMPILE(, [
+int main () { return 0 ; }
+],
+[
+handles_mmmx=3Dyes
+AC_MSG_RESULT([yes])
+], [
+handles_mmmx=3Dno
+AC_MSG_RESULT([no])
+])
+
+if test "$handles_mmmx" =3D "yes"; then
+ USE_MMX_REGISTER=3D"-mmmx"
+fi
+
+AC_SUBST([USE_MMX_REGISTER])
+
+USE_SSE_REGISTER=3D""
+AC_MSG_CHECKING([if gcc accepts -msse ])
+
+safe_CFLAGS=3D$CFLAGS
+CFLAGS=3D"-msse"
+
+AC_TRY_COMPILE(, [
+int main () { return 0 ; }
+],
+[
+handles_msse=3Dyes
+AC_MSG_RESULT([yes])
+], [
+handles_msse=3Dno
+AC_MSG_RESULT([no])
+])
+
+if test "$handles_msse" =3D "yes"; then
+ USE_SSE_REGISTER=3D"-msse"
+fi
+
+AC_SUBST([USE_SSE_REGISTER])
+
+
+
if test x$no_pointer_sign =3D xyes; then
CFLAGS=3D"$CFLAGS -Wno-pointer-sign"
fi
--- trunk/valgrind/memcheck/tests/scalar.c #439275:439276
@@ -14,7 +14,7 @@
// PRE_MEM_READ/PRE_MEM_WRITE calls. (Note that Memcheck and Addrcheck =
will
// always issue an error message immediately before these seg faults occ=
ur).
=20
-#include <asm/ipc.h>
+//#include <asm/ipc.h>
#include <sched.h>
#include <signal.h>
=20
--- trunk/valgrind/none/tests/x86/Makefile.am #439275:439276
@@ -24,7 +24,7 @@
$(INSN_TESTS) \
int pushpopseg rcl_assert seg_override
=20
-AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude
+AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude $(USE_MMX_REGISTER) $(USE_SSE_REGISTER)
AM_CXXFLAGS =3D $(AM_CFLAGS)
=20
# generic C ones
|