Hi,

Olli Savia wrote:
Hi,

Could somebody please add LynxOS support to libtool.

Since this did not receive great interest I tried to hack
this myself. I think I'm pretty far now. Most of the
tests pass:

====================================
10 of 101 tests failed
(5 tests were not run)
Please report to [email protected]
====================================

What I didn't figure out is how to pass -mshared flag
to compiler when checking if dlopen is in libdl. Could
somebody give me instructions how to do that?

I have attached a patch against current CVS HEAD. Could
somebody review changes I have made?

Thanks,
Olli

Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /sources/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.90
diff -c -r1.90 libtool.m4
*** libltdl/m4/libtool.m4	5 Feb 2007 19:40:18 -0000	1.90
--- libltdl/m4/libtool.m4	6 Feb 2007 09:58:34 -0000
***************
*** 2345,2350 ****
--- 2345,2360 ----
    dynamic_linker='GNU/Linux ld.so'
    ;;
  
+ lynxos*)
+   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
+   hardcode_into_libs=yes
+   ;;
+ 
  netbsd*)
    version_type=sunos
    need_lib_prefix=no
***************
*** 2922,2927 ****
--- 2932,2941 ----
    lt_cv_deplibs_check_method=pass_all
    ;;
  
+ lynxos*)
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
  netbsd*)
    if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
      lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
***************
*** 3427,3432 ****
--- 3441,3450 ----
        # Interix 3.x gcc -fpic/-fPIC options generate broken code.
        # Instead, we relocate shared libraries at runtime.
        ;;
+     lynxos*)
+       # LynxOS uses GNU C++, but need to define -mshared option too
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -mshared'
+       ;;
      sysv4*MP*)
        if test -d /usr/nec; then
  	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
***************
*** 3576,3581 ****
--- 3594,3600 ----
  	esac
  	;;
        lynxos*)
+ 	# LynxOS uses GNU C++
  	;;
        m88k*)
  	;;
***************
*** 3735,3740 ****
--- 3754,3764 ----
        # Instead, we relocate shared libraries at runtime.
        ;;
  
+     lynxos*)
+       # LynxOS uses GNU C++, but need to define -mshared option too.
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -mshared'
+       ;;
+ 
      msdosdjgpp*)
        # Just because we use GCC doesn't mean we suddenly get shared libraries
        # on systems that don't support them.
***************
*** 5870,5877 ****
  	;;
  
        lynxos*)
!         # FIXME: insert proper C++ library support
! 	_LT_TAGVAR(ld_shlibs, $1)=no
  	;;
  
        m88k*)
--- 5894,5901 ----
  	;;
  
        lynxos*)
!         # LynxOS uses GNU C++ and GNU ld with standard ELF conventions
!         _LT_TAGVAR(ld_shlibs, $1)=yes
  	;;
  
        m88k*)
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to