summaryrefslogtreecommitdiff
path: root/Ports/libiconv/patches/0001-libtool-Enable-shared-library-support-for-SerenityOS.patch
blob: de144fd65bfcc3ba3dc60d320890fc3600e70065 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From bdcb52aa7f451346423c3468ab124c57464b1b5a Mon Sep 17 00:00:00 2001
From: Tim Schumacher <timschumi@gmx.de>
Date: Sun, 29 May 2022 15:01:28 +0200
Subject: [PATCH 2/2] libtool: Enable shared library support for SerenityOS

For some odd reason, libtool handles the configuration for shared
libraries entirely statically and in its configure script. If no
shared library support is "present", building shared libraries is
disabled entirely.

Fix that by just adding the appropriate configuration options for
`serenity`. This allows us to finally create dynamic libraries
automatically using libtool, without having to manually link the
static library into a shared library.
---
 configure | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/configure b/configure
index 668c3dd..a2857fc 100755
--- a/configure
+++ b/configure
@@ -8649,6 +8649,10 @@ tpf*)
 os2*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+
+serenity*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 
 fi
@@ -12125,6 +12129,10 @@ lt_prog_compiler_static=
       lt_prog_compiler_static='-Bstatic'
       ;;
 
+    serenity*)
+      lt_prog_compiler_can_build_shared=yes
+      ;;
+
     *)
       lt_prog_compiler_can_build_shared=no
       ;;
@@ -13657,6 +13665,10 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
       hardcode_shlibpath_var=no
       ;;
 
+    serenity*)
+      ld_shlibs=yes
+      ;;
+
     *)
       ld_shlibs=no
       ;;
@@ -14729,6 +14741,17 @@ uts4*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
+serenity*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}${versuffix} ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}${major}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  dynamic_linker='SerenityOS LibELF'
+  ;;
+
 *)
   dynamic_linker=no
   ;;
-- 
2.36.1