libtool-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Ileana Dumitrescu
Date: Tue, 19 Nov 2024 14:34:51 -0500 (EST)

branch: development
commit 2c4bb57a88da4ac0347485fd6997ca70ca6520a2
Author: Khalid Masum <khalid.masum.92@gmail.com>
AuthorDate: Wed May 15 17:03:30 2024 +0600

    libtool: add support for wasm32-emscripten
    
    This patch adds support for emscripten compiler for shared compilation.
    
    * build-aux/ltmain.in: clone link-mode handling for emscripten from
    unixware7.
    * m4/libtool.m4: translate emscripten specific flags for shared module
    building.
---
 build-aux/ltmain.in |  1 +
 m4/libtool.m4       | 15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index a4fa6280..fa157775 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -6571,6 +6571,7 @@ func_mode_link ()
                case $host in
                  *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
                  *-*-sysv4*uw2*) add_dir=-L$dir ;;
+                 *-*-emscripten*) add_dir=-L$dir ;;
                  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
                    *-*-unixware7*) add_dir=-L$dir ;;
                  *-*-darwin* )
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 8c7d4cbb..04a02d80 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -3195,6 +3195,21 @@ uts4*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
+emscripten*)
+  version_type=none
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  dynamic_linker="Emscripten linker"
+  _LT_COMPILER_PIC($1)='-fPIC'
+  _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs 
$compiler_flags -o $lib'
+  _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols 
>$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs 
$compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(no_undefined_flag, $1)=
+  ;;
+
 *)
   dynamic_linker=no
   ;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]