ports/math/openblas/files/patch-exports+Makefile
Baptiste Daroussin 34d4baa56c Create a proper library with a SONAME
PR:		208472
Submitted by:	phd_kimberlite@yahoo.co.jp (maintainer)
MFH:		2016Q2
2016-04-04 20:46:22 +00:00

18 lines
642 B
Text

--- exports/Makefile.orig 2015-10-27 20:44:50 UTC
+++ exports/Makefile
@@ -140,6 +140,7 @@ endif
#http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or
ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD NetBSD))
+EXTRALIB += -lgfortran
so : ../$(LIBSONAME)
ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
@@ -151,6 +152,7 @@ else
endif
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
-Wl,--whole-archive $< -Wl,--no-whole-archive \
+ -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) \
$(FEXTRALIB) $(EXTRALIB)
$(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
rm -f linktest