libtool-patches
[Top][All Lists]
Advanced

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

Re: Small patch for the QNX platform


From: Ralf Wildenhues
Subject: Re: Small patch for the QNX platform
Date: Sun, 1 Feb 2009 16:24:30 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello again Mike,

* Mike Gorchak wrote on Fri, Jan 23, 2009 at 07:09:18AM CET:
> This patch adds qnx as platform which supports library version information.
>
> diff -u -r ./libtool-2.2.6/libltdl/config/ltmain.m4sh  
> ./libtool-2.2.6-qnx/libltdl/config/ltmain.m4sh
> --- ./libtool-2.2.6/libltdl/config/ltmain.m4sh 2008-09-07 
> 20:54:53.000000000 +0300
> +++ ./libtool-2.2.6-qnx/libltdl/config/ltmain.m4sh 2009-01-23  
> 08:01:41.000000000 +0200
> @@ -5746,7 +5746,7 @@
>    # which has an extra 1 added just for fun
>    #
>    case $version_type in
> -   darwin|linux|osf|windows|none)
> +   darwin|linux|osf|windows|qnx|none)
>      func_arith $number_major + $number_minor
>      current=$func_arith_result
>      age="$number_minor"

Thinking about this a bit more, and working on versioning.at, I gather
the above change is wrong.  Well, at least it is inconsistent with the
rest of the qnx version_type:
        qnx)
          major=".$current"
          versuffix=".$current"

This means that your major is not CURRENT - AGE, so we should not try to
compute current as MAJOR + MINOR.  At least that's what the comment
before your change indicates:

        # convert absolute version numbers to libtool ages
        # this retains compatibility with .la files and attempts
        # to make the code below a bit more comprehensible

        case $vinfo_number in
        yes)
          number_major="$1"
          number_minor="$2"
          number_revision="$3"
          #
          # There are really only two kinds -- those that
          # use the current revision as the major version
          # and those that subtract age and use age as
          # a minor version.  But, then there is irix
          # which has an extra 1 added just for fun
          #

So, a few questions:
- is it the right thing that QNX has CURRENT as major, and not
  CURRENT - AGE?
- if yes, then the patch below (instead of yours) should do the right
  thing.

Can you try it, in conjunction with libdrm?

I'm still working on finishing versioning.at, but it proves more
difficult than expected to make it portable but still effective.

Thanks,
Ralf

--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -5915,7 +5923,7 @@ func_mode_link ()
            age="$number_minor"
            revision="$number_revision"
            ;;
-         freebsd-aout|freebsd-elf|sunos)
+         freebsd-aout|freebsd-elf|qnx|sunos)
            current="$number_major"
            revision="$number_minor"
            age="0"




reply via email to

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