Message-ID: <email address hidden>
Date: Sat, 21 Aug 2004 18:10:31 +0200
From: Andreas Barth <email address hidden>
To: <email address hidden>
Subject: db4.2: problems for mips(el) fixed
Hi,
I fixed this bug for unstable. I did only minimal changes, so that
this fix would also be ok for testing. I (or more correct: Frank)
tested this package on a mips-machine, and installation of slapd works
now. Thanks for Thiemo for the fix.
diff -Nur db4.2-4.2.52-prev/dist/README db4.2-4.2.52/dist/README
--- db4.2-4.2.52-prev/dist/README 1970-01-01 01:00:00.000000000 +0100
+++ db4.2-4.2.52/dist/README 2004-08-21 05:58:00.000000000 +0200
@@ -0,0 +1,2 @@
+If you want to update any of the files here, please see s_* (these are
+scripts).
diff -Nur db4.2-4.2.52-prev/dist/aclocal/mutex.ac db4.2-4.2.52/dist/aclocal/mutex.ac
--- db4.2-4.2.52-prev/dist/aclocal/mutex.ac 2003-06-16 16:54:39.000000000 +0200
+++ db4.2-4.2.52/dist/aclocal/mutex.ac 2004-08-20 16:08:45.000000000 +0200
@@ -373,6 +373,17 @@
], [db_cv_mutex="ARM/gcc-assembly"])
fi
+# MIPS/gcc: Linux
+if test "$db_cv_mutex" = no; then
+AC_TRY_COMPILE(,[
+#if defined(__mips__) && defined(__GNUC__)
+ exit(0);
+#else
+ FAIL TO COMPILE/LINK
+#endif
+], [db_cv_mutex="MIPS/gcc-assembly"])
+fi
+
# PaRisc/gcc: HP/UX
if test "$db_cv_mutex" = no; then
AC_TRY_COMPILE(,[
@@ -499,6 +510,10 @@
AC_DEFINE(HAVE_MUTEX_ARM_GCC_ASSEMBLY)
AH_TEMPLATE(HAVE_MUTEX_ARM_GCC_ASSEMBLY,
[Define to 1 to use the GCC compiler and ARM assembly language mutexes.]);;
+MIPS/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_MIPS_GCC_ASSEMBLY)
+ AH_TEMPLATE(HAVE_MUTEX_MIPS_GCC_ASSEMBLY,
+ [Define to 1 to use the GCC compiler and MIPS assembly language mutexes.]);;
HP/msem_init) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_HPPA_MSEM_INIT)
AH_TEMPLATE(HAVE_MUTEX_HPPA_MSEM_INIT,
diff -Nur db4.2-4.2.52-prev/dist/config.hin db4.2-4.2.52/dist/config.hin
--- db4.2-4.2.52-prev/dist/config.hin 2003-12-03 22:10:00.000000000 +0100
+++ db4.2-4.2.52/dist/config.hin 2004-08-21 07:05:03.000000000 +0200
@@ -106,6 +106,9 @@
/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */
#undef HAVE_MUTEX_ARM_GCC_ASSEMBLY
+/* Define to 1 to use the GCC compiler and MIPS assembly language mutexes. */
+#undef HAVE_MUTEX_MIPS_GCC_ASSEMBLY
+
/* Define to 1 to use the Apple/Darwin _spin_lock_try mutexes. */
#undef HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY
Message-ID: <email address hidden>
Date: Sat, 21 Aug 2004 18:10:31 +0200
From: Andreas Barth <email address hidden>
To: <email address hidden>
Subject: db4.2: problems for mips(el) fixed
Hi,
I fixed this bug for unstable. I did only minimal changes, so that
this fix would also be ok for testing. I (or more correct: Frank)
tested this package on a mips-machine, and installation of slapd works
now. Thanks for Thiemo for the fix.
Cheers,
Andi
diff -Nur db4.2-4. 2.52-prev/ dbinc/mutex. h db4.2-4. 2.52/dbinc/ mutex.h 2.52-prev/ dbinc/mutex. h 2003-09-20 23:40:49.000000000 +0200 2.52/dbinc/ mutex.h 2004-08-20 16:08:45.000000000 +0200
--- db4.2-4.
+++ db4.2-4.
@@ -487,6 +487,48 @@
#endif
/***** ******* ******* ******* ******* ******* ******* ******* ******* ******* * ******* ******* ******* ******* ******* ******* ******* ******* ******/ MIPS_GCC_ ASSEMBLY MUTEX_CODE ******* ******* ******* ******* ******* ******* ******* ******* ******* * ******* ******* ******* ******* ******* ******* ******* ******* ******* */ HPPA_GCC_ ASSEMBLY 2.52-prev/ debian/ changelog db4.2-4. 2.52/debian/ changelog 2.52-prev/ debian/ changelog 2004-08-20 15:00:15.000000000 +0200 2.52/debian/ changelog 2004-08-21 05:57:19.000000000 +0200
+ * MIPS/gcc assembly.
+ *******
+#ifdef HAVE_MUTEX_
+typedef u_int32_t tsl_t;
+
+#ifndef MUTEX_ALIGN
+#define MUTEX_ALIGN 4
+#endif
+
+#ifdef LOAD_ACTUAL_
+/*
+ * For gcc/mips. Should return 0 if could not acquire the lock, 1 if
+ * lock was acquired properly.
+ */
+static inline int
+MUTEX_SET(tsl_t *tsl) {
+ register tsl_t *__l = tsl;
+ register tsl_t __r;
+ asm volatile(
+ " .set push \n"
+ " .set mips2 \n"
+ " .set noreorder \n"
+ "1: ll %0, %1 \n"
+ " bnez %0, 1f \n"
+ " nop \n"
+ " addu %0, 1 \n"
+ " sc %0, %1 \n"
+ " beqz %0, 1b \n"
+ " move %0, $0 \n"
+ " sync \n"
+ "1: .set pop \n"
+ : "=&r" (__r), "+m" (*__l)
+ : : "memory");
+ return __r ^ 1;
+}
+
+#define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
+#define MUTEX_INIT(tsl) MUTEX_UNSET(tsl)
+#endif
+#endif
+
+/*****
* HPPA/gcc assembly.
*****
#ifdef HAVE_MUTEX_
diff -Nur db4.2-4.
--- db4.2-4.
+++ db4.2-4.
@@ -1,3 +1,11 @@
+db4.2 (4.2.52-17) unstable; urgency=medium
+
+ * add mutex support for mips/mipsel. Closes: #257513
+ * added myself to the uploaders.
+ * add warning about configure
+
+ -- Andreas Barth <email address hidden> Fri, 20 Aug 2004 16:10:43 +0200
+
db4.2 (4.2.52-16) unstable; urgency=medium
* Change maintainer address to Alioth mailing list, and add 2.52-prev/ debian/ control db4.2-4. 2.52/debian/ control 2.52-prev/ debian/ control 2004-08-20 15:00:15.000000000 +0200 2.52/debian/ control 2004-08-20 16:09:57.000000000 +0200
diff -Nur db4.2-4.
--- db4.2-4.
+++ db4.2-4.
@@ -2,7 +2,7 @@
Section: libs
Priority: standard
Maintainer: Debian Berkeley DB Maintainers <email address hidden>
-Uploaders: Clint Adams <email address hidden>, Matthew Wilcox <email address hidden>
+Uploaders: Clint Adams <email address hidden>, Matthew Wilcox <email address hidden>, Andreas Barth <email address hidden>
Standards-Version: 3.6.1
Build-Depends: tcl8.4-dev, procps [!hurd-i386], gcj (>= 3:3.2.2-0) [!hppa !mips !mipsel !hurd-i386], fastjar [!hppa !mips !mipsel !hurd-i386], sablevm [!hppa !mips !mipsel !hurd-i386], libgcj4-dev [!hppa !mips !mipsel !hurd-i386]
diff -Nur db4.2-4. 2.52-prev/ dist/README db4.2-4. 2.52/dist/ README 2.52-prev/ dist/README 1970-01-01 01:00:00.000000000 +0100 2.52/dist/ README 2004-08-21 05:58:00.000000000 +0200 2.52-prev/ dist/aclocal/ mutex.ac db4.2-4. 2.52/dist/ aclocal/ mutex.ac 2.52-prev/ dist/aclocal/ mutex.ac 2003-06-16 16:54:39.000000000 +0200 2.52/dist/ aclocal/ mutex.ac 2004-08-20 16:08:45.000000000 +0200 mutex=" ARM/gcc- assembly" ])
--- db4.2-4.
+++ db4.2-4.
@@ -0,0 +1,2 @@
+If you want to update any of the files here, please see s_* (these are
+scripts).
diff -Nur db4.2-4.
--- db4.2-4.
+++ db4.2-4.
@@ -373,6 +373,17 @@
], [db_cv_
fi
+# MIPS/gcc: Linux mutex=" MIPS/gcc- assembly" ]) DEFINE( HAVE_MUTEX_ ARM_GCC_ ASSEMBLY) TEMPLATE( HAVE_MUTEX_ ARM_GCC_ ASSEMBLY, OBJS="mut_ tas${o} $ADDITIONAL_OBJS" HAVE_MUTEX_ MIPS_GCC_ ASSEMBLY) HAVE_MUTEX_ MIPS_GCC_ ASSEMBLY, OBJS="mut_ tas${o} $ADDITIONAL_OBJS" DEFINE( HAVE_MUTEX_ HPPA_MSEM_ INIT) TEMPLATE( HAVE_MUTEX_ HPPA_MSEM_ INIT, 2.52-prev/ dist/config. hin db4.2-4. 2.52/dist/ config. hin 2.52-prev/ dist/config. hin 2003-12-03 22:10:00.000000000 +0100 2.52/dist/ config. hin 2004-08-21 07:05:03.000000000 +0200 ARM_GCC_ ASSEMBLY
+if test "$db_cv_mutex" = no; then
+AC_TRY_COMPILE(,[
+#if defined(__mips__) && defined(__GNUC__)
+ exit(0);
+#else
+ FAIL TO COMPILE/LINK
+#endif
+], [db_cv_
+fi
+
# PaRisc/gcc: HP/UX
if test "$db_cv_mutex" = no; then
AC_TRY_COMPILE(,[
@@ -499,6 +510,10 @@
AC_
AH_
[Define to 1 to use the GCC compiler and ARM assembly language mutexes.]);;
+MIPS/gcc-assembly) ADDITIONAL_
+ AC_DEFINE(
+ AH_TEMPLATE(
+ [Define to 1 to use the GCC compiler and MIPS assembly language mutexes.]);;
HP/msem_init) ADDITIONAL_
AC_
AH_
diff -Nur db4.2-4.
--- db4.2-4.
+++ db4.2-4.
@@ -106,6 +106,9 @@
/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */
#undef HAVE_MUTEX_
+/* Define to 1 to use the GCC compiler and MIPS assembly language mutexes. */ MIPS_GCC_ ASSEMBLY DARWIN_ SPIN_LOCK_ TRY
+#undef HAVE_MUTEX_
+
/* Define to 1 to use the Apple/Darwin _spin_lock_try mutexes. */
#undef HAVE_MUTEX_
diff -Nur db4.2-4. 2.52-prev/ dist/configure. mutexes- disabled db4.2-4. 2.52/dist/ configure. mutexes- disabled 2.52-prev/ dist/configure. mutexes- disabled 2004-08-20 15:00:15.000000000 +0200 2.52/dist/ configure. mutexes- disabled 2004-08-21 06:03:24.000000000 +0200
--- db4.2-4.
+++ db4.2-4.
@@ -28427,6 +28427,51 @@
rm -f conftest.$ac_objext conftest.$ac_ext
fi
+# MIPS/gcc: Linux $ac_objext' "MIPS/gcc- assembly"
+if test "$db_cv_mutex" = no; then
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if defined(__mips__) && defined(__GNUC__)
+ exit(0);
+#else
+ FAIL TO COMPILE/LINK
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ db_cv_mutex=
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
# PaRisc/gcc: HP/UX
if test "$db_cv_mutex" = no; then
cat >conftest.$ac_ext <<_ACEOF
@@ -28870,6 +28915,12 @@
;; OBJS="mut_ tas${o} $ADDITIONAL_OBJS" MIPS_GCC_ ASSEMBLY 1 OBJS="mut_ tas${o} $ADDITIONAL_OBJS" ARM_GCC_ ASSEMBLY 1 home.arcor. de/andreas- barth/
+MIPS/gcc-assembly) ADDITIONAL_
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MUTEX_
+_ACEOF
+
+;;
ARM/gcc-assembly) ADDITIONAL_
cat >>confdefs.h <<\_ACEOF
#define HAVE_MUTEX_
--
http://
PGP 1024/89FB5CE5 DC F1 85 6D A6 45 9C 0F 3B BE F1 D0 C5 D1 D9 0C