Re: [Monetdb-developers] [Monetdb-checkins] buildtools/conf MonetDB.m4, MonetDB_1-20, 1.37.2.14, 1.37.2.15
On 21-11-2007 15:07:04 +0000, Stefan Manegold wrote:
+case "$host-$GCC-$CC-$enableval" in +ia64*-*-*-32) + AC_MSG_ERROR([we do not support 32 bits on $host]);;
So HPUX's 32-bits support on ia64 is not supported :(
+i?86*-*-*-64) + AC_MSG_ERROR([$host does not support 64 bits]);;
So Darwin's multilib compiler (i386-apple-darwin[89]) is assumed not to handle 64-bits code here :(
+*--icc*-32|*--icc*-64) + AC_MSG_ERROR([icc does not support a command line option to switch between 32- & 64-bit compilation; use CC & PATH (instead of --enable-bits=$enableval) to point to the $enableval-bit version of icc]);; +*-*-*-32|*-*-*-64) ;; -*) AC_MSG_ERROR(--enable-bits argument must be either 32 or 64);; +*) + AC_MSG_ERROR(--enable-bits argument must be either 32 or 64);;
Clever one ;)
On Wed, Nov 21, 2007 at 05:18:25PM +0100, Fabian Groffen wrote:
On 21-11-2007 15:07:04 +0000, Stefan Manegold wrote:
+case "$host-$GCC-$CC-$enableval" in +ia64*-*-*-32) + AC_MSG_ERROR([we do not support 32 bits on $host]);;
So HPUX's 32-bits support on ia64 is not supported :(
Indeed. AFAIK, we never supported HPUX, basically, because we never had access to any HPUX machine. So far, I have not received either any request for supporting HPUX, or any complaint about us not doing so. Of course, after years without change, we could consider making this test more specific, refering to Linux, only ...
+i?86*-*-*-64) + AC_MSG_ERROR([$host does not support 64 bits]);;
So Darwin's multilib compiler (i386-apple-darwin[89]) is assumed not to handle 64-bits code here :(
64-bit (only) code on/for a 32-bit architecture? I don't think, we do support "multilib" compilation at all --- at least I actually don't know how that works, but of course, I'm always open and curious to learn more...
+*--icc*-32|*--icc*-64) + AC_MSG_ERROR([icc does not support a command line option to switch between 32- & 64-bit compilation; use CC & PATH (instead of --enable-bits=$enableval) to point to the $enableval-bit version of icc]);; +*-*-*-32|*-*-*-64) ;; -*) AC_MSG_ERROR(--enable-bits argument must be either 32 or 64);; +*) + AC_MSG_ERROR(--enable-bits argument must be either 32 or 64);;
Clever one ;)
The same reason that triggered this check also triggered the above ones: allow only what has been tested and confirmed to work. Prevent any unknown situations. Otherwise, (some) users complain about "I (accidently?) used this-and-that flag, compilation did not complain, but then nothing worked". Of course, the strict approach raises questions as the ones given above --- I would be glad to hear the "ultimate" solution that suits "everybody", "innocent users" that what a "completely fool-proof" system, and "dare-devils" that want to discover new worlds. For now, the best "compromise" I could find is to tend towards the strictness as default, assuming that the dare-devils are willing to get their fingers dirty and know how to disable the strict checks where-/whenever desired/necessary. Stefan -- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
On 21-11-2007 17:38:46 +0100, Stefan Manegold wrote:
On Wed, Nov 21, 2007 at 05:18:25PM +0100, Fabian Groffen wrote:
On 21-11-2007 15:07:04 +0000, Stefan Manegold wrote:
+case "$host-$GCC-$CC-$enableval" in +ia64*-*-*-32) + AC_MSG_ERROR([we do not support 32 bits on $host]);;
So HPUX's 32-bits support on ia64 is not supported :(
Indeed. AFAIK, we never supported HPUX, basically, because we never had access to any HPUX machine. So far, I have not received either any request for supporting HPUX, or any complaint about us not doing so. Of course, after years without change, we could consider making this test more specific, refering to Linux, only ...
Ok.
+i?86*-*-*-64) + AC_MSG_ERROR([$host does not support 64 bits]);;
So Darwin's multilib compiler (i386-apple-darwin[89]) is assumed not to handle 64-bits code here :(
64-bit (only) code on/for a 32-bit architecture?
I don't think, we do support "multilib" compilation at all --- at least I actually don't know how that works, but of course, I'm always open and curious to learn more...
I actually got a few things mixed up. I thought you were doing comparisons on the CHOST/CTARGET, but you use something else. But for the record: [tefnut:/var/tmp] % powerpc-apple-darwin8-gcc -m64 -o test.ppc64 -c test.c [tefnut:/var/tmp] % powerpc-apple-darwin8-gcc -o test.ppc -c test.c [tefnut:/var/tmp] % file test.ppc{,64} test.ppc: Mach-O object ppc test.ppc64: Mach-O 64-bit object ppc64 [tefnut:/var/tmp] % uname -a Darwin tefnut 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc PowerMac8,2 Darwin [tefnut:/var/tmp] % lipo -create test.ppc{,64} -output test [tefnut:/var/tmp] % /usr/bin/file test test: Mach-O fat file with 2 architectures test (for architecture ppc): Mach-O object ppc test (for architecture ppc64): Mach-O 64-bit object ppc64 This actually also works on a non-64-bits machine, as code generation is not the problem. Running it is, of course. [ra:/var/tmp] % i386-pc-solaris2.10-gcc -m64 -o test.64 -c test.c [ra:/var/tmp] % i386-pc-solaris2.10-gcc -o test.32 -c test.c [ra:/var/tmp] % file test.{64,32} test.64: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped test.32: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped % uname -a SunOS ra 5.10 Generic_125101-10 i86pc i386 i86pc Solaris This is multilib ;) you know it also from your 64-bits desktop, that has a compiler and libs that are 32-bits capable, however unlike Darwin and Solaris defaults to 64-bits compilation.
On 21-11-2007 18:15:57 +0100, Fabian Groffen wrote:
[tefnut:/var/tmp] % powerpc-apple-darwin8-gcc -m64 -o test.ppc64 -c test.c [tefnut:/var/tmp] % powerpc-apple-darwin8-gcc -o test.ppc -c test.c [tefnut:/var/tmp] % file test.ppc{,64} test.ppc: Mach-O object ppc test.ppc64: Mach-O 64-bit object ppc64 [tefnut:/var/tmp] % uname -a Darwin tefnut 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc PowerMac8,2 Darwin [tefnut:/var/tmp] % lipo -create test.ppc{,64} -output test [tefnut:/var/tmp] % /usr/bin/file test test: Mach-O fat file with 2 architectures test (for architecture ppc): Mach-O object ppc test (for architecture ppc64): Mach-O 64-bit object ppc64
This actually also works on a non-64-bits machine, as code generation is not the problem. Running it is, of course.
The proof of the pudding is in the eating of course: [build-macosx:/var/tmp] % powerpc-apple-darwin8-gcc-4.0.1 -m64 -o test test.c [build-macosx:/var/tmp] % file test test: Mach-O 64-bit executable ppc64 [build-macosx:/var/tmp] % ./test tcsh: ./test: Bad CPU type in executable.
participants (2)
-
Fabian Groffen
-
Stefan Manegold