@@ -27,10 +27,10 @@ index d2ff741..ec6339d 100644
27
27
28
28
include $(TOPDIR)/Makefile.$(ARCH)
29
29
diff --git a/exports/Makefile b/exports/Makefile
30
- index c798bc7..9ed5a0f 100644
30
+ index c798bc7..f68da88 100644
31
31
--- a/exports/Makefile
32
32
+++ b/exports/Makefile
33
- @@ -88,12 +88,17 @@ dll : ../$(LIBDLLNAME)
33
+ @@ -88,12 +88,18 @@ dll : ../$(LIBDLLNAME)
34
34
-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(FEXTRALIB) $(EXTRALIB)
35
35
36
36
libopenblas.def : gensymbol
@@ -44,26 +44,39 @@ index c798bc7..9ed5a0f 100644
44
44
+ ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
45
45
$(LIBDYNNAME) : ../$(LIBNAME) osx.def
46
46
+ else
47
- + $(LIBDYNNAME) : ../$(LIBNAME) osx.def objconv.def
48
- + $(OBJCONV) @objconv.def ../$(LIBNAME)
47
+ + ../$(LIBNAME).renamed : ../$(LIBNAME) objconv.def
48
+ + $(OBJCONV) @objconv.def ../$(LIBNAME) ../$(LIBNAME).renamed
49
+ + $(LIBDYNNAME) : ../$(LIBNAME).renamed osx.def
49
50
+ endif
50
51
$(FC) $(FFLAGS) -all_load -headerpad_max_install_names -install_name $(CURDIR)/../$(LIBDYNNAME) -dynamiclib -o ../$(LIBDYNNAME) $< -Wl,-exported_symbols_list,osx.def $(FEXTRALIB)
51
52
52
53
dllinit.$(SUFFIX) : dllinit.c
53
- @@ -103,7 +108,12 @@ ifeq ($(OSNAME), Linux)
54
+ @@ -103,16 +109,22 @@ ifeq ($(OSNAME), Linux)
54
55
55
56
so : ../$(LIBSONAME)
56
57
57
58
+ ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
58
59
../$(LIBSONAME) : ../$(LIBNAME) linktest.c
59
60
+ else
60
- + ../$(LIBSONAME) : ../$(LIBNAME) linktest.c objcopy.def
61
- + $(OBJCOPY) --redefine-syms objcopy.def ../$(LIBNAME)
61
+ + ../$(LIBNAME).renamed : ../$(LIBNAME) objcopy.def
62
+ + $(OBJCOPY) --redefine-syms objcopy.def ../$(LIBNAME) ../$(LIBNAME).renamed
63
+ + ../$(LIBSONAME) : ../$(LIBNAME).renamed linktest.c
62
64
+ endif
63
65
ifneq ($(C_COMPILER), LSB)
64
66
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
65
- -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
66
- @@ -125,7 +135,12 @@ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD NetBSD))
67
+ - -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
68
+ + -Wl,--whole-archive $< -Wl,--no-whole-archive \
69
+ -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB)
70
+ $(CC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
71
+ else
72
+ #for LSB
73
+ env LSBCC_SHAREDLIBS=gfortran $(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
74
+ - -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
75
+ + -Wl,--whole-archive $< -Wl,--no-whole-archive \
76
+ -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB)
77
+ $(FC) $(CFLAGS) $(LDFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
78
+ endif
79
+ @@ -125,7 +137,12 @@ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD NetBSD))
67
80
68
81
so : ../$(LIBSONAME)
69
82
@@ -76,7 +89,7 @@ index c798bc7..9ed5a0f 100644
76
89
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
77
90
-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
78
91
$(FEXTRALIB) $(EXTRALIB)
79
- @@ -178,17 +193 ,23 @@ static : ../$(LIBNAME)
92
+ @@ -178,17 +195 ,23 @@ static : ../$(LIBNAME)
80
93
rm -f goto.$(SUFFIX)
81
94
82
95
osx.def : gensymbol ../Makefile.system ../getarch.c
0 commit comments