1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:17:35 +00:00

Ports: Replace manually linking libiconv with a libtool patch

This commit is contained in:
Tim Schumacher 2022-06-03 16:41:48 +02:00 committed by Linus Groh
parent 9e1de61613
commit a97899c088
4 changed files with 92 additions and 8 deletions

View file

@ -7,9 +7,3 @@ files="https://ftpmirror.gnu.org/gnu/libiconv/libiconv-${version}.tar.gz libicon
auth_type="sha256" auth_type="sha256"
use_fresh_config_sub=true use_fresh_config_sub=true
config_sub_paths=("build-aux/config.sub" "libcharset/build-aux/config.sub") config_sub_paths=("build-aux/config.sub" "libcharset/build-aux/config.sub")
install() {
run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" install
run ${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libiconv.so -Wl,-soname,libiconv.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libiconv.a -Wl,--no-whole-archive
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libiconv.la
}

View file

@ -1,7 +1,7 @@
From 9b61ddd52828042b106d7d4c3fef582be9c933e7 Mon Sep 17 00:00:00 2001 From 74f7065ed6f9cf338f53657ea08e980328dd27c6 Mon Sep 17 00:00:00 2001
From: Vincent Sanders <vince@kyllikki.org> From: Vincent Sanders <vince@kyllikki.org>
Date: Sun, 6 Oct 2019 11:11:16 +0100 Date: Sun, 6 Oct 2019 11:11:16 +0100
Subject: [PATCH 1/1] Stub out getprogname() for serenity Subject: [PATCH 1/2] Stub out getprogname() for serenity
--- ---
srclib/getprogname.c | 2 ++ srclib/getprogname.c | 2 ++

View file

@ -0,0 +1,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 3488d1d..33b4956 100755
--- a/configure
+++ b/configure
@@ -7376,6 +7376,10 @@ tpf*)
os2*)
lt_cv_deplibs_check_method=pass_all
;;
+
+serenity*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
fi
@@ -10688,6 +10692,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
;;
@@ -12206,6 +12214,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
hardcode_shlibpath_var=no
;;
+ serenity*)
+ ld_shlibs=yes
+ ;;
+
*)
ld_shlibs=no
;;
@@ -13274,6 +13286,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

View file

@ -5,3 +5,17 @@
Stub out getprogname() for serenity Stub out getprogname() for serenity
## `0002-libtool-Enable-shared-library-support-for-SerenityOS.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.