[PATCH] Add support for fuchsia (OS)

Josh Conner <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
Please find attached a patch that adds support for the Fuchsia OS (https://fuchsia.googlesource.com/).
Let me know if there are any questions.

Thanks!

- Josh
libtool-fuchsia-support.patch (text/plain, 1.9 KB)
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index ee292af..a463ae7 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1968,6 +1968,11 @@ else
     ])
     ;;
 
+  fuchsia*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
   tpf*)
     # Don't try to run any link tests for TPF.  We know it's impossible
     # because TPF is a cross-compiler, and we know how we open DSOs.
@@ -2722,6 +2727,15 @@ freebsd* | dragonfly*)
   esac
   ;;
 
+fuchsia*)
+  need_lib_prefix=no
+  need_version=no
+  dynamic_linker="$host_os ld.so.1"
+  library_names_spec='$libname$shared_ext'
+  soname_spec='$libname$shared_ext'
+  sys_lib_dlsearch_path_spec='/system/lib /boot/lib'
+  ;;
+
 haiku*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
@@ -3526,6 +3540,10 @@ freebsd* | dragonfly*)
   fi
   ;;
 
+fuchsia*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -4241,7 +4259,7 @@ m4_if([$1], [CXX], [
       esac
       ;;
 
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+    beos* | fuchsia* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
     mingw* | cygwin* | os2* | pw32* | cegcc*)
@@ -4342,6 +4360,11 @@ m4_if([$1], [CXX], [
       freebsd* | dragonfly*)
 	# FreeBSD uses GNU C++
 	;;
+      fuchsia* )
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	;;
       hpux9* | hpux10* | hpux11*)
 	case $cc_basename in
 	  CC*)
@@ -6791,6 +6814,10 @@ if test yes != "$_lt_caught_CXX_error"; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
         ;;
 
+      fuchsia*)
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+	;;
+
       haiku*)
         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.