From 45ec95d4d8d42cd896eb1fb436e1f29c8130b784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 30 Mar 2003 15:37:33 +0000 Subject: [PATCH] Use soname option when building a shared libpython. Fixes #701823. --- Makefile.pre.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index 3257bf9f389..f8bcc92f090 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -344,7 +344,12 @@ $(LIBRARY): $(LIBRARY_OBJS) $(RANLIB) $@ libpython$(VERSION).so: $(LIBRARY_OBJS) - $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) + if test $INSTSONAME != $LDLIBRARY; then \ + $(LDSHARED) -Wl,-soname=$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ + $(LN) -f $(INSTSONAME) $@; \ + else\ + $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ + fi libpython$(VERSION).sl: $(LIBRARY_OBJS) $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(LIBC) $(LIBM)