Funda Wang <fundaw...@gmail.com> added the comment:

Regarding python binary target, the actual command when linking is:
gcc -pthread -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -lstdc++ -
Xlinker -export-dynamic -o python \
Modules/python.o \
-LL. -lpython2.6 -lpthread -ldl  -lutil   -lm

The linking order is wrong. "-lstdc++" is LIBADD, it should appear 
after OBJECTS such as Modules/python.o. The same applies to -pthread.

The command should looks like:
gcc -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Xlinker -export-
dynamic -o python \
Modules/python.o \
-LL. -lpython2.6 -lpthread -ldl  -lutil   -lm  -lstdc++

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to