Attached is an updated patch that reflects a difference in the way pic/pie options are handled in gcc for fuchsia. With this new patch, -fPIC is no longer treated as the default (since we now use -fPIE as the default).

Please let me know if there's anything else I can provide.

Thanks!

- Josh

On 12/8/16 4:28 PM, Josh Conner wrote:
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


diff --git a/m4/libtool.m4 b/m4/libtool.m4
index ee292af..e1d623a 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
   ;;
@@ -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

Reply via email to