summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-03-30 15:37:33 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-03-30 15:37:33 (GMT)
commit45ec95d4d8d42cd896eb1fb436e1f29c8130b784 (patch)
treec29eefd14576ce0c7eab3f9738eb825a18ef5532
parent3163a3b4b2a820ef38e6c7282033fe2db9d43ebe (diff)
downloadcpython-45ec95d4d8d42cd896eb1fb436e1f29c8130b784.zip
cpython-45ec95d4d8d42cd896eb1fb436e1f29c8130b784.tar.gz
cpython-45ec95d4d8d42cd896eb1fb436e1f29c8130b784.tar.bz2
Use soname option when building a shared libpython. Fixes #701823.
-rw-r--r--Makefile.pre.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 3257bf9..f8bcc92 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)