]> www.ginac.de Git - cln.git/commitdiff
Make out of the box build on x86_64 system with complete 32 bit
authorRichard Kreckel <kreckel@ginac.de>
Sun, 24 Jul 2005 21:20:46 +0000 (21:20 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Sun, 24 Jul 2005 21:20:46 +0000 (21:20 +0000)
        userland possible
        * include/cln/config.h.in: Don't #define __x86_64__ when
        __i386__ is defined.
        * src/base/digitseq/cl_asm_x86_64_.cc: New file.
        * doc/cln.tex: Revert workaround description introduced 2005-05-02.

ChangeLog
doc/cln.tex
include/cln/config.h.in
src/base/digitseq/cl_asm_x86_64_.cc [new file with mode: 0644]

index f1902487853b4464a21b586b61d88889fe854057..c1344da7d0f52240a1789360c03c63b16f1b21f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-08-24  Richard B. Kreckel  <kreckel@ginac.de>
+
+       Make out of the box build on x86_64 system with complete 32 bit
+       userland possible
+       * include/cln/config.h.in: Don't #define __x86_64__ when
+       __i386__ is defined.
+       * src/base/digitseq/cl_asm_x86_64_.cc: New file.
+       * doc/cln.tex: Revert workaround description introduced 2005-05-02.
+
 2005-06-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * Makefile.in: Don't enter nonexisting directories.
index 019eeee1da3e3144adec1065e4ec8166cdd26929..146f81b52d23b3922fda2437da965a1e1468b0f1 100644 (file)
@@ -438,18 +438,6 @@ on all architectures.  Try disabling them if you run into linker
 problems.  Also, they are generally somewhat slower than static
 libraries so runtime-critical applications should be linked statically.
 
-If you are compiling on a 64-bit machine with 32-bit userland, you
-might have to specify that explicitly while configuring the library.
-For instance, the popular x86_64 architecture can host a 32-bit x86
-operating system and toolchain on top of a 64-bit kernel.  In such a
-situation, you must explicitly tell configure @emph{not} to assume a
-64-bit OS:
-@example
-$ ./configure --build=i686-pc-linux-gnu
-@end example
-If you forget about this, the build will fail because @code{uname -m}
-will set x86_64 which conflicts with what the compiler knows.
-
 If you use @code{g++} from gcc-3.1 with option @samp{-g}, you will need
 some disk space: 335 MB for building as both a shared and a static library,
 or 130 MB when building as a shared library only.
index cc06b50db7f7c08cce705eb2210de9a72bd9d2c9..f59133616e4d211c243a669e1fa9e89d3d194d48 100644 (file)
 #ifndef __i386__
 #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__
 #endif
+
 // NB: GCC def's __mips__ both on big-endian and little-endian systems.
 #ifndef __mips__
 #undef __mips__
 #endif
+
 #ifndef __mipsel__
 #undef __mipsel__
 #endif
+
 #ifndef __mips64__
 #undef __mips64__
 #endif
+
 #ifndef __sparc__
 #undef __sparc__
 #endif
+
 #ifndef __sparc64__
 #undef __sparc64__
 #endif
+
 #ifndef __alpha__
 #undef __alpha__
 #endif
+
 #ifndef __hppa__
 #undef __hppa__
 #endif
+
 #ifndef __arm__
 #undef __arm__
 #endif
+
 #ifndef __rs6000__
 #undef __rs6000__
 #endif
+
 #ifndef __m88k__
 #undef __m88k__
 #endif
+
 #ifndef __convex__
 #undef __convex__
 #endif
+
 #ifndef __ia64__
 #undef __ia64__
 #endif
-#ifndef __x86_64__
-#undef __x86_64__
-#endif
+
 #ifndef __s390__
 #undef __s390__
 #endif
diff --git a/src/base/digitseq/cl_asm_x86_64_.cc b/src/base/digitseq/cl_asm_x86_64_.cc
new file mode 100644 (file)
index 0000000..665eacf
--- /dev/null
@@ -0,0 +1,6 @@
+#ifdef __i386__
+// This is most probably a x86_64 system with 32 bit userland.
+#include "cl_asm_i386_.cc"
+#else
+// Nothing here yet.
+#endif