> The reason is that "python-config.py --ldflags" is returning: > > -L/local/home/sellcey/gcc/mt/src/install-python/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic > > and if I link with this I get undefined references because libpython2.7 is > listed *after* libutil, libm, and libdl and is an archive library. If I > move it before (by hand) the link works. > > Has anyone else run into this? I don't remember which issues we ran into when building GDB against a static version of libpython, but we've had to make a number of changes to python-config.py. I do see in your output the one I remember making for GNU/Linux, though (-export-dynamic). The only difference in outupt with the script we use is an extra -static-libgcc at the end. JIC, here is our python-config.py, in case it helps in your case. -- Joel