ladybird/Ports/libwebp/patches/0001-libtool-Enable-shared-library-support-for-SerenityOS.patch
Liav A db2701f2e2 Ports: Add libwebp
This library includes webp converter to other formats as well and could
be used as reference implementation for performance improvements.
2023-09-01 23:01:34 +02:00

78 lines
2.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Liav A <liavalb@gmail.com>
Date: Fri, 1 Sep 2023 23:44:19 +0300
Subject: [PATCH] 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.
This patch here is a bit more elaborate for other ports, as libintl's
configure includes the code for detecting dynamic linker characteristics
twice, and it also queries the C++ compiler for shared library support.
Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
---
configure | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/configure b/configure
index d4507aa5761e23c732cc219af4c1c119055cb377..884c76f4da0d8d2640b9fa66cd869816ff35c927 100755
--- a/configure
+++ b/configure
@@ -5635,6 +5635,10 @@ else $as_nop
lt_cv_sys_max_cmd_len=8192
;;
+ serenity*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
osf*)
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -9224,6 +9228,10 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-fPIC -shared'
;;
+ serenity)
+ lt_prog_compiler_can_build_shared=yes
+ ;;
+
sysv4*MP*)
if test -d /usr/nec; then
lt_prog_compiler_pic=-Kconform_pic
@@ -10067,6 +10075,10 @@ _LT_EOF
fi
;;
+ serenity*)
+ ld_shlibs=no
+ ;;
+
solaris*)
if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
@@ -11474,6 +11486,16 @@ beos*)
dynamic_linker="$host_os ld.so"
shlibpath_var=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'
+ ;;
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor