1 https://github.com/libtom/libtommath/commit/93dea3a4162527346cd8856bfda6f17ffe98ab04.patch
3 From 93dea3a4162527346cd8856bfda6f17ffe98ab04 Mon Sep 17 00:00:00 2001
4 From: Steffen Jaeckel <s@jaeckel.eu>
5 Date: Thu, 31 Jan 2019 14:12:03 +0100
6 Subject: [PATCH] makefile.shared: fix compilation and linkage
9 makefile.shared | 15 ++++++++-------
10 1 file changed, 8 insertions(+), 7 deletions(-)
12 diff --git a/makefile.shared b/makefile.shared
13 index 3955f830..870b18d1 100644
16 @@ -18,6 +18,7 @@ ifndef LIBTOOL
19 LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC)
20 +LTLINK = $(LIBTOOL) --mode=link --tag=CC $(CC)
22 LCOV_ARGS=--directory .libs --directory .
24 @@ -59,7 +60,7 @@ objs: $(OBJECTS)
25 LOBJECTS = $(OBJECTS:.o=.lo)
27 $(LIBNAME): $(OBJECTS)
28 - $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO) $(LIBTOOLFLAGS)
29 + $(LTLINK) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO) $(LIBTOOLFLAGS)
32 install -d $(DESTDIR)$(LIBPATH)
33 @@ -76,16 +77,16 @@ uninstall:
34 rm $(DESTDIR)$(LIBPATH)/pkgconfig/libtommath.pc
36 test: $(LIBNAME) demo/demo.o
37 - $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o
38 - $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME)
39 + $(LTCOMPILE) $(CFLAGS) -c demo/demo.c -o demo/demo.o
40 + $(LTLINK) $(LDFLAGS) -o test demo/demo.o $(LIBNAME)
42 test_standalone: $(LIBNAME) demo/demo.o
43 - $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o
44 - $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME)
45 + $(LTCOMPILE) $(CFLAGS) -c demo/demo.c -o demo/demo.o
46 + $(LTLINK) $(LDFLAGS) -o test demo/demo.o $(LIBNAME)
50 - cd mtest ; $(CC) $(CFLAGS) $(LDFLAGS) mtest.c -o mtest
51 + cd mtest ; $(CC) $(CFLAGS) -O0 mtest.c $(LDFLAGS) -o mtest
53 timing: $(LIBNAME) demo/timing.c
54 - $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o timing
55 + $(LTLINK) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o timing