[Pkg-db-devel] Bug#248131: [PATCH] amd64: Missing mutexes and "$LD" vs. $LD in 'configure.mutexes-disabled'

Andreas Jochens Andreas Jochens <aj@andaco.de>, 248131@bugs.debian.org
Sat, 12 Jun 2004 22:37:10 +0200


tags 248131 + patch
thanks

> It seems there currently isn't any support for fast mutexes on
> amd64.  I currently fixed that by enabeling the x86/gcc-assembly
> by adding || defined(__x86_64__) to it, but a seperate test would
> probably be better.

The attached patch includes the fix for this bug. It also includes 
a fix for a problem with the linker tests in the 
'configure.mutexes-disabled' script which causes the package to FTBFS
on amd64.

The configure script uses "$LD" instead of $LD in its linker tests. This
makes the shell look for the filename "ld -m elf_x86_64" on amd64 which
does not exists because the ' -m elf_86_64' part is not interpreted as
an option but as part of the filename. Therefore 'configure' does not
find the GNU ld and does not set the correct linker options (the option
-nostdlib will be missing).
 
This "$LD" problem was caused by using an old buggy version of
'libtool.m4' when creating the configure script.

Regards
Andreas Jochens

diff -urN ../tmp-orig/db4.2-4.2.52/dist/configure.mutexes-disabled ./dist/configure.mutexes-disabled
--- ../tmp-orig/db4.2-4.2.52/dist/configure.mutexes-disabled	2004-06-12 22:06:38.907012569 +0200
+++ ./dist/configure.mutexes-disabled	2004-06-12 22:06:34.594848320 +0200
@@ -5657,7 +5657,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `"$LD" -v 2>&1 </dev/null` in
+case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
   lt_cv_prog_gnu_ld=yes
   ;;
@@ -11159,7 +11159,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `"$LD" -v 2>&1 </dev/null` in
+case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
   lt_cv_prog_gnu_ld=yes
   ;;
@@ -28621,7 +28621,7 @@
 main ()
 {
 
-#if (defined(i386) || defined(__i386__)) && defined(__GNUC__)
+#if (defined(i386) || defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__)
 	exit(0);
 #else
 	FAIL TO COMPILE/LINK