Message94734
| Author |
lemburg |
| Recipients |
bobatkins, jackjansen, jprante, lemburg, loewis, pitrou, rpetrov, sergiodj, spacey |
| Date |
2009年10月30日.22:45:12 |
| SpamBayes Score |
1.1787864e-09 |
| Marked as misclassified |
No |
| Message-id |
<4AEB6C76.9040407@egenix.com> |
| In-reply-to |
<1256940735.19.0.0584004423161.issue1628484@psf.upfronthosting.co.za> |
| Content |
Antoine Pitrou wrote:
> Second, the patch allows me to do a 32-bit build (under 64-bit Linux) by
> doing:
> CFLAGS=-m32 LDFLAGS=-m32 ./configure
> rather than:
> CC="gcc -m32" ./configure
> However, if I omit LDFLAGS it doesn't work, I don't know if it's intended.
Without the patch,
BASECFLAGS=-m32 LDFLAGS=-m32 ./configure
should work the same way.
LDFLAGS defines the linker options, CFLAGS the compiler options,
and since both tools have to know that you're generating 32-bit code,
you have to pass the option to both env vars.
> Third, while the 32-bit build does work, the shared objects are still
> placed in a directory called "lib.linux-x86_64-2.7", which I suppose is
> wrong:
That's a side-effect of distutils using os.uname() for determining
the platform. It doesn't know that you're actually telling the
compiler to build a 32-bit binary.
On some platforms you can use these commands to emulate 32- or
64-bit environments:
$ linux32 python -c 'import os; print os.uname()'
('Linux', 'newton', '2.6.22.19-0.4-default', '#1 SMP 2009年08月14日 02:09:16 +0200', 'i686')
$ linux64 python -c 'import os; print os.uname()'
('Linux', 'newton', '2.6.22.19-0.4-default', '#1 SMP 2009年08月14日 02:09:16 +0200', 'x86_64') |
|