libtool-patches
[Top][All Lists]
Advanced

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

(HEAD) libtool support for Interix 3, 3.1, 3.5


From: Todd Vierling
Subject: (HEAD) libtool support for Interix 3, 3.1, 3.5
Date: Thu, 15 Apr 2004 10:47:17 -0400 (EDT)

Interix 3 ships with gcc3, and has support for shared objects very similarly
(but not quite the same as) ELF.  The following diff, which will become part
of NetBSD's pkgsrc-packaged libtool, provides full libtool support for
Interix and shlibs on gcc3.

There is also have a version of this diff that applies to 1.5.x stable
release branch.  If these are being accepted, please let me know, and I'll
submit that separately.

I hereby release this diff in the public domain, to be relicensed as you see
fit.  (I do have GPL assignments on file for gcc and binutils, and will
submit one for libtool if it is needed.)

Since it's possible there are unforeseen problems in this support diff, and
because I may try to add "native-CC" support (it is a wrapper around MS
VC++) in the future, I am willing to maintain this port.  Libtool
maintainers, please contact me offlist if you wish to arrange this.

=====

Note:  Yes, I chose "version_type=sunos" deliberately.  Interix prefers this
version numbering scheme, as it is a BSD descendant, so please honor this
part of the diff.

Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.61
diff -u -r1.61 libtool.m4
--- m4/libtool.m4       31 Mar 2004 14:11:08 -0000      1.61
+++ m4/libtool.m4       15 Apr 2004 14:35:46 -0000
@@ -1853,6 +1853,18 @@
   postinstall_cmds='chmod 555 $lib'
   ;;

+interix*)
+  version_type=sunos
+  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'
+  dynamic_linker='Interix ld.so.1 (ELF-like)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
@@ -2432,6 +2444,10 @@
   esac
   ;;

+interix*)
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  ;;
+
 irix5* | irix6* | nonstopux*)
   case $LD in
   *-32|*"-32 ") libmagic=32-bit;;
@@ -3021,6 +3037,8 @@
            ;;
        esac
        ;;
+      interix*)
+       ;;
       irix5* | irix6* | nonstopux*)
        case $cc_basename in
          CC)
@@ -3543,6 +3561,11 @@
       fi
       ;;

+    interix*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs 
$compiler_flags ${wl}-h,$soname'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -o $lib $libobjs 
$deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file 
$wl$export_symbols'
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs 
$linker_flags -o $lib'
@@ -3946,6 +3969,15 @@
       fi
       ;;

+    interix*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs 
$compiler_flags'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs 
$compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo 
${wl}-set_version ${wl}$verstring` ${wl}-update_registry 
${wl}${output_objdir}/so_locations -o $lib'
@@ -4897,6 +4929,8 @@
        fi
        ;;
       esac
+      ;;
+    interix*)
       ;;
     irix5* | irix6*)
       case $cc_basename in
Index: m4/ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltdl.m4,v
retrieving revision 1.10
diff -u -r1.10 ltdl.m4
--- m4/ltdl.m4  13 Apr 2004 22:13:16 -0000      1.10
+++ m4/ltdl.m4  15 Apr 2004 14:35:47 -0000
@@ -156,6 +156,9 @@
   hpux10*|hpux11*)
     libltdl_cv_sys_dlopen_deplibs=yes
     ;;
+  interix*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
   irix[[12345]]*|irix6.[[01]]*)
     # Catch all versions of IRIX before 6.2, and indicate that we don't
     # know how it worked for any of those versions.

-- 
-- Todd Vierling <address@hidden> <address@hidden>




reply via email to

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