]> www.ginac.de Git - cln.git/commitdiff
* m4/general.m4 (CL_CANONICAL_HOST_CPU): Force host_cpu=i386 for x86_64
authorRichard Kreckel <kreckel@ginac.de>
Tue, 13 Jun 2006 18:31:18 +0000 (18:31 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Tue, 13 Jun 2006 18:31:18 +0000 (18:31 +0000)
        if userland is 32 bit.
        * include/cln/config.h.in: Simplify __x86_64__ selection.
        * src/base/digitseq/cl_asm_x86_64_.cc: Remove.

ChangeLog
include/cln/config.h.in
m4/general.m4
src/base/digitseq/cl_asm_x86_64_.cc [deleted file]

index f20490902737f08f6c4dba5f77b4bdf536ff832d..234fb264f999bf0524bc4cbdf1016746a5a46155 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-06-13  Richard B. Kreckel  <kreckel@ginac.de>
+
+       * m4/general.m4 (CL_CANONICAL_HOST_CPU): Force host_cpu=i386 for x86_64
+       if userland is 32 bit.
+       * include/cln/config.h.in: Simplify __x86_64__ selection.
+       * src/base/digitseq/cl_asm_x86_64_.cc: Remove.
+
 2006-06-09  Richard B. Kreckel  <kreckel@ginac.de>
 
        * src/base/digitseq/cl_DS.h (struct DS): Change len type to uintC.
index e31357e76dbf1c9a0013e73097a53a85603eeeb1..3ef1e761f65a087d39b2a1ec757fefcc62d1ba05 100644 (file)
 #undef __i386__
 #endif
 
-// Take care not to define both __i386__ and __x86_64__ on those systems with
-// 64 bit kernel and 32 bit userland:
 #ifndef __x86_64__
-#ifndef __i386__
 #undef __x86_64__
 #endif
-#endif
 
 #ifndef __m68k__
 #undef __m68k__
index b9fa4ba7d9cb9b20df64e5da6be63a4d27b79c3d..bb2f4366870d2741222ce8fa7f2270686ae1490d 100644 (file)
@@ -184,6 +184,23 @@ else
   host_cpu=sparc
 fi
     ;;
+dnl AMD64 running Linux have 'uname -m' = "x86_64" even if userland is purely
+dnl 32-bit.
+  x86_64 )
+    AC_CACHE_CHECK([for 64-bit userland on x86-64], cl_cv_host_x86_64, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#if !defined __x86_64__
+# error __x86_64__ not defined
+#endif
+]])
+], [cl_cv_host_x86_64=yes], [cl_cv_host_x86_64=no])
+])
+if test $cl_cv_host_x86_64 = yes; then
+  host_cpu=x86_64
+else
+  host_cpu=i386
+fi
+  ;;
 esac
 dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
 cat >> confdefs.h <<EOF
diff --git a/src/base/digitseq/cl_asm_x86_64_.cc b/src/base/digitseq/cl_asm_x86_64_.cc
deleted file mode 100644 (file)
index 665eacf..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifdef __i386__
-// This is most probably a x86_64 system with 32 bit userland.
-#include "cl_asm_i386_.cc"
-#else
-// Nothing here yet.
-#endif