Build Question: How to Add -Wl, --option Before Objects In

Cyd Haselton chaselton at
Sun Nov 2 14:02:27 CET 2014

On Sat, Nov 1, 2014 at 5:25 PM, Ned Deily <nad at> wrote:
> In article
> <CAHu5Praf_9rkGYw5yzP4Tqs3DZsx0qM70esUNukNoDCqzTmj2g at>,
>  Cyd Haselton <chaselton at> wrote:
>> On Sat, Nov 1, 2014 at 1:47 PM, Cyd Haselton <chaselton at> wrote:
> [...]
>> > Sure enough, nm -D shows that sincos is NOT available in that
>> > library on my Android device. Now to figure out what to do about it.
> [...]
>> UPDATE:  After doing a bit of research it looks like it would be
>> easier to build Python without that possible?
>> If not, I'll need to figure out how to get bionic libm sources with a
>> proper Makefile (instead of Android's build system)
> While sin() and/or cos() are primarily used in the expected places in
> the Python standard library (like the math module), sin() is also used
> in the implementation of type "complex" objects, code that is part of
> the core interpreter.

Just checking: is sincos() the same as sin() and cos()? Nm output for
my toolchain's libm does show sin() and cos() just not sincos()

>  I see that there is an old, undocumented, and
> unsupported macro to disable building of complex number support.  But
> more hacking is needed to even get a somewhat working build with it
> these days and then, without complex support, many tests in the standard
> library fail and what you end up isn't really Python.  So, I think
> rather than hacking up Python, you should try to fix the broken
> platform.  There seem to be a number of project that claim to support
> Python on Android.  Perhaps they could be of help.

Well, I had planned on bootstrapping GCC 4.9.0...I guess I'll be doing
it sooner rather than later.
Interestingly enough, the toolchain sources at only have Python 2.7.5...perhaps the reason
is related to this issue.  If GCC supports building Python in the
source tree, I'll try it with that version and report back.

> FWIW, the macro is "WITHOUT_COMPLEX":
> ./configure [...] CPPFLAGS='-DWITHOUT_COMPLEX'
> and Lib/ would need to be patched to comment out its use of
> "complex".
> Again, good luck!

And thanks again for all your help. I'll report back with results, if
and when I have them.

> --
>  Ned Deily,
>  nad at
> --

More information about the Python-list mailing list