]> granicus.if.org Git - python/commitdiff
Use soname option when building a shared libpython. Fixes #701823.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 30 Mar 2003 15:37:33 +0000 (15:37 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 30 Mar 2003 15:37:33 +0000 (15:37 +0000)
Makefile.pre.in

index 3257bf9f3894b18fa064dfd413e33c098c0a0ee8..f8bcc92f0907b9183c2412e373f7be9f53caa248 100644 (file)
@@ -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)