Message57924
| Author |
gregcouch |
| Recipients |
gregcouch |
| Date |
2007年11月29日.00:52:58 |
| SpamBayes Score |
0.0008416243 |
| Marked as misclassified |
No |
| Message-id |
<1196297579.57.0.775741892495.issue1516@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
To get _ctypes to sucessfully compile with native UNIX compilers (i.e.,
not gcc), several modifications need to be made: (1) use the equivalent
of the Py_GCC_ATTRIBUTE macro for __attribute__ (in ffi.h), (2) include
<ffi_common.h> in callproc.c to conditionally include <alloca.h>, and
(3) modify distutils to know something about assembly language files.
The attached patch is a starting point for the proper patch. It fixes
bugs (1) and (2), but I was unable to figure out the last tweek to get
distutils to work with gcc and native compilers.
The problem with _ctypes comes from the use of gcc's libffi. And libffi
uses assembly language source files for the various supported platforms
and distutils blindly compiles the .S files. Native UNIX compilers want
a .s suffix and if the files are renamed, distutils skips the file. I
tried modifying distutils to compile .s files and give the '-x
assembler-with-cpp' flag to gcc so gcc would still work, but the right
tweek evaded me. So I'm hoping someone can take this and turn it into
something better or make helpful suggestions (other than switching to gcc!). |
| Files |
| File name |
Uploaded |
|
_ctypes.diffs
|
gregcouch,
2007年11月29日.00:52:58
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年11月29日 00:53:00 | gregcouch | set | spambayes_score: 0.000841624 -> 0.0008416243 recipients:
+ gregcouch |
| 2007年11月29日 00:52:59 | gregcouch | set | spambayes_score: 0.000841624 -> 0.000841624 messageid: <1196297579.57.0.775741892495.issue1516@psf.upfronthosting.co.za> |
| 2007年11月29日 00:52:59 | gregcouch | link | issue1516 messages |
| 2007年11月29日 00:52:58 | gregcouch | create |
|