openblas/openblas-0.1-soname.patch

26 lines
818 B
Diff

diff -ruN xianyi-OpenBLAS-92ba8a7-orig/exports/Makefile xianyi-OpenBLAS-92ba8a7/exports/Makefile
--- xianyi-OpenBLAS-92ba8a7-orig/exports/Makefile 2011-09-18 10:57:28.000000000 +0200
+++ xianyi-OpenBLAS-92ba8a7/exports/Makefile 2011-11-01 00:37:52.193277838 +0100
@@ -97,8 +97,21 @@
so : ../$(LIBSONAME)
+
+ifeq ($(USE_OPENMP), 1)
+SONAME = libopenblaso.so.0
+else
+ifeq ($(USE_THREAD), 1)
+SONAME = libopenblasp.so.0
+else
+SONAME = libopenblas.so.0
+endif
+endif
+
../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
$(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
+ -Wl,-z,noexecstack \
+ -Wl,-soname,$(SONAME) \
-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
-Wl,--retain-symbols-file=linux.def $(EXTRALIB)
$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.