forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
R-3.0.0-rmath-shared.patch
28 lines (23 loc) · 1.11 KB
/
R-3.0.0-rmath-shared.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Link with libm to fix unresolved symbols when linked with as-needed
and add a soname to the standalone math library
R bug: https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14953
Patch by Sebastien Fabbro
Adapted to R-3.0.0 by Denis Dupeyron
--- src/nmath/standalone/Makefile.in.orig 2013-04-04 14:39:15.777544946 -0600
+++ src/nmath/standalone/Makefile.in 2013-04-04 14:40:51.256153179 -0600
@@ -64,7 +64,8 @@
Rexeclibdir_LTLIBRARIES = $(libRmath_la)
libRmath_la_SOURCES = $(SOURCES)
libRmath_la_OBJECTS = $(OBJECTS:.o=.lo)
-libRmath_la_LDFLAGS =
+libRmath_la_LDFLAGS = -Wl,-soname=libRmath.so
+libRmath_la_LIBADD = $(LIBM)
CLEANFILES = Makedeps *.d *.o *.lo test $(SOURCES)
DISTCLEANFILES = Makefile $(Rexeclibdir_LIBRARIES) $(Rexeclibdir_LTLIBRARIES)
@@ -117,7 +118,7 @@
## under peculiar circumstances, $(LIBM) here helps.
$(libRmath_la): $(libRmath_la_OBJECTS)
- $(DYLIB_LINK) -o $@ $(libRmath_la_LDFLAGS) $(libRmath_la_OBJECTS) $(LIBM)
+ $(DYLIB_LINK) $(libRmath_la_LDFLAGS) $(libRmath_la_OBJECTS) $(libRmath_la_LIBADD) -o $@
test: $(srcdir)/test.c
$(CC) -o $@ $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(srcdir)/test.c \