summaryrefslogtreecommitdiff
blob: 89a3a920c1752bd1507998bbf7d100d01f7bf42c (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 58d3e56f59e0e8d48d913c217929b35e9366e829 Mon Sep 17 00:00:00 2001
From: Alon Bar-Lev <alon.barlev@gmail.com>
Date: Sat, 11 Jun 2016 15:07:12 +0300
Subject: [PATCH] build: so: support LDFLAGS and SONAME

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
 tools/buildsharedlib.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/buildsharedlib.sh b/tools/buildsharedlib.sh
index f1277a7..59c4713 100644
--- a/tools/buildsharedlib.sh
+++ b/tools/buildsharedlib.sh
@@ -131,9 +131,9 @@ case $OSNAME in
 	*)
 		if [ `$LD -v 2>&1 | grep -c gcc` -gt 0 -a \
 			`gcc -Wl,-Bsymbolic 2>&1 | grep -c unrecognized` = 0 ] ; then
-			$LD -shared -Wl,-Bsymbolic -o $LIBNAME `cat $LINKFILE` `./tools/getlibs.sh autodetect` ;
+			$LD -shared $LDFLAGS -Wl,-soname,$LIBNAME -Wl,-Bsymbolic -o $LIBNAME `cat $LINKFILE` `./tools/getlibs.sh autodetect` ;
 		else
-			$LD -shared -o $LIBNAME `cat $LINKFILE` `./tools/getlibs.sh autodetect` ;
+			$LD -shared -shared $LDFLAGS -Wl,-soname,$LIBNAME -o $LIBNAME `cat $LINKFILE` `./tools/getlibs.sh autodetect` ;
 		fi
 		if [ `which objdump` -a `objdump -p $LIBNAME | grep -c TEXTREL` -gt '0' ] ; then
 			echo "Warning: Shared library still contains TEXTREL records." ;
-- 
2.7.3

From b11541f4beaf8395dd90de53b57933661e120b0a Mon Sep 17 00:00:00 2001
From: Dennis Schridde <devurandom@gmx.net>
Date: Sat, 11 Jun 2016 15:34:57 +0300
Subject: [PATCH] build: ignore DL_EXPORT on non windows

Signed-off-by: Dennis Schridde <devurandom@gmx.net>
---
 cryptlib.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cryptlib.h b/cryptlib.h
index 61cf338..4738852 100644
--- a/cryptlib.h
+++ b/cryptlib.h
@@ -122,6 +122,7 @@
   #define C_CHR char
   #define C_STR C_CHR *
   #define C_RET	int
+  #define DL_EXPORT(type) type
 #endif /* Windows vs.everything else function types */
 
 /* Symbolic defines to make it clearer how the function parameters behave */
-- 
2.7.3