libtool-patches
[Top][All Lists]
Advanced

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

Re: QNX6 related fixes for the libtool


From: Gary V. Vaughan
Subject: Re: QNX6 related fixes for the libtool
Date: Fri, 14 May 2004 13:55:49 +0100
User-agent: Mozilla Thunderbird 0.6 (X11/20040502)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Mike!

Mike Gorchak wrote:
|  > I've added fixes to the libtool.m4, ltmain.in and ltdl.m4, which concerning
|  > libtool functionality under QNX6 platform.
|
|  GVV> Thanks for the patches.  Could you please resubmit with a ChangeLog
|  GVV> entry,
|
| libtool.m4: Added support for the shared library building under QNX6
| platform.
| ltmain.in: Added QNX6 support (was unsupported).
| ltdl.m4: Added QNX6 support (was unsupported).

Actually, I meant something in the style of the libtool ChangeLog that I could
paste in, but I've written one for you (see attached).

|  GVV>  and stating which version of libtool your patch is made against?
|
| It was made against the current CVS version (head branch).

Excellent.  I've moved things around a little to preserve alphabetical order
in the case statements, and removed the deplibs_check_method="pass_all" line
from ltmain.in (which is not the right place to set it).  Please confirm that
the attached patch works for you, and I will commit it to the repository.

Thanks again!

Cheers,
        Gary.

- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFApMHVFRMICSmD1gYRAhfQAJ9MjKrRcuNwkYwpQquVjZfNYOc6XwCgmYYd
6xaYh+x2Hej3eLUNVFjd5FM=
=Bl9S
-----END PGP SIGNATURE-----
Index: ChangeLog
from  Mike Gorchak  <address@hidden>

        * ltmain.in: Add new qnx version type support.
        * m4/libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Use it.  Set
        ldqnx.so linker type.
        (AC_DEPLIBS_CHECK_METHOD): QNX6 uses GNU C++, with deplib
        checking, so use pass_all.
        (AC_LIBTOOL_PROG_COMPILER_PIC): Use -shared for QNX.
        (_LT_LANG_CXX_CONFIG): QNX can make shared libraries.
        * m4/ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): QNX opens deplibs on
        dlopen.
        * NEWS: Updated.

Index: NEWS
===================================================================
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.147
diff -u -p -r1.147 NEWS
--- NEWS 22 Apr 2004 22:08:18 -0000 1.147
+++ NEWS 14 May 2004 12:49:01 -0000
@@ -54,6 +54,7 @@ New in 1.5b: 2004-??-??; CVS version 1.5
 * Initial support for amigaos-ppc.
 * Support for Intel C++ version 8.0.
 * New support for IBM's xlc and xlc++ on Mac OS X.
+* Finished support for QNX RTOS.
 * Bug fixes.
 
 New in 1.5.2: 2004-01-25; CVS version 1.5.0a, Libtool team:
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.395
diff -u -p -r1.395 ltmain.in
--- ltmain.in 1 Apr 2004 04:38:11 -0000 1.395
+++ ltmain.in 14 May 2004 12:49:11 -0000
@@ -3100,7 +3100,7 @@ EOF
 
        freebsd-elf)
          major=".$current"
-         versuffix=".$current";
+         versuffix=".$current"
          ;;
 
        irix | nonstopux)
@@ -3147,6 +3147,11 @@ EOF
          verstring="$verstring:${current}.0"
          ;;
 
+       qnx)
+         major=".$current"
+         versuffix=".$current"
+         ;;
+
        sunos)
          major=".$current"
          versuffix=".$current.$revision"
@@ -4033,7 +4038,7 @@ EOF
            fi
          fi
 
-         exit $EXIT_SUCCESS 
+         exit $EXIT_SUCCESS
        fi
 
        # Create links to the real library.
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.70
diff -u -p -r1.70 libtool.m4
--- m4/libtool.m4 5 May 2004 13:16:52 -0000 1.70
+++ m4/libtool.m4 14 May 2004 12:49:11 -0000
@@ -1967,14 +1967,16 @@ newsos6)
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx*)
-  version_type=linux
+*nto* | *qnx*)
+  version_type=qnx
   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
-  shlibpath_overrides_runpath=yes
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
   ;;
 
 openbsd*)
@@ -2475,8 +2477,8 @@ newos6*)
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
   ;;
 
 openbsd*)
@@ -2952,6 +2954,11 @@ m4_if([$1], [CXX], [
        ;;
       esac
       ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
     *)
       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
@@ -3076,6 +3083,11 @@ m4_if([$1], [CXX], [
        ;;
       netbsd*)
        ;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
       osf3* | osf4* | osf5*)
        case $cc_basename in
          KCC)
@@ -3198,19 +3210,6 @@ m4_if([$1], [CXX], [
       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
       ;;
 
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
     hpux*)
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
@@ -3224,6 +3223,25 @@ m4_if([$1], [CXX], [
       esac
       ;;
 
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
     *)
       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
@@ -3279,11 +3297,6 @@ m4_if([$1], [CXX], [
       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    newsos6)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
     linux*)
       case $CC in
       icc* | ecc*)
@@ -3299,6 +3312,17 @@ m4_if([$1], [CXX], [
       esac
       ;;
 
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
     osf3* | osf4* | osf5*)
       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
       # All OSF/1 code is PIC.
@@ -4002,6 +4026,9 @@ _LT_EOF
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
+    *nto* | *qnx*)
+      ;;
+
     openbsd*)
       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -5056,6 +5083,9 @@ if test -n "$compiler"; then
       fi
       # Workaround some broken pre-1.5 toolchains
       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | 
$GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+      ;;
+    *nto* | *qnx*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=yes
       ;;
     osf3*)
       case $cc_basename in
Index: m4/ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltdl.m4,v
retrieving revision 1.11
diff -u -p -r1.11 ltdl.m4
--- m4/ltdl.m4 22 Apr 2004 22:47:20 -0000 1.11
+++ m4/ltdl.m4 14 May 2004 12:49:11 -0000
@@ -194,6 +194,9 @@ AC_CACHE_CHECK([whether deplibs are load
     # is used to find them so we can finally say `yes'.
     libltdl_cv_sys_dlopen_deplibs=yes
     ;;
+  qnx*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
   solaris*)
     libltdl_cv_sys_dlopen_deplibs=yes
     ;;

reply via email to

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