[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] make freebsd-elf version type similar to linux version type
From: |
Gary V. Vaughan |
Subject: |
Re: [PATCH] make freebsd-elf version type similar to linux version type |
Date: |
Thu, 27 Nov 2014 18:35:00 +0000 |
Hi Tijl,
Thanks for the patches.
> On 27 Nov 2014, at 17:59, Tijl Coosemans <address@hidden> wrote:
>
> On FreeBSD we have switched from using .so.$current as library extension
> to .so.$major.$age.$revision where $major is $current-$age. Our package
> of libtool has been patched similar to the patch below which you can see
> here: https://svnweb.freebsd.org/ports/head/devel/libtool/files/
What about people who want to build packages for an old BSD a with the
earlier versioning scheme? Is it possible to redo your patch so that the change
only takes effect for *-freebsdx.y* (or similar) where x.y denotes the earliest
release that fully supports the new versioning scheme?
> The "freebsd-elf" version type was also used for SCO UnixWare. This
> patch creates a separate version type "sco" for that system.
Ack.
> ---
> build-aux/ltmain.in | 14 ++++++++++----
> m4/libtool.m4 | 5 +++--
> 2 files changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
> index 65b5a2d..6cea0f8 100644
> --- a/build-aux/ltmain.in
> +++ b/build-aux/ltmain.in
> @@ -6795,13 +6795,13 @@ func_mode_link ()
> #
> case $version_type in
> # correct linux to gnu/linux during the next big refactor
> - darwin|linux|osf|windows|none)
> + darwin|freebsd-elf|linux|osf|windows|none)
> func_arith $number_major + $number_minor
> current=$func_arith_result
> age=$number_minor
> revision=$number_revision
> ;;
> - freebsd-aout|freebsd-elf|qnx|sunos)
> + freebsd-aout|qnx|sco|sunos)
> current=$number_major
> revision=$number_minor
> age=0
> @@ -6887,8 +6887,9 @@ func_mode_link ()
> ;;
>
> freebsd-elf)
> - major=.$current
> - versuffix=.$current
> + func_arith $current - $age
> + major=.$func_arith_result
> + versuffix=$major.$age.$revision
> ;;
>
> irix | nonstopux)
> @@ -6951,6 +6952,11 @@ func_mode_link ()
> versuffix=.$current
> ;;
>
> + sco)
> + major=.$current
> + versuffix=.$current
> + ;;
> +
> sunos)
> major=.$current
> versuffix=.$current.$revision
> diff --git a/m4/libtool.m4 b/m4/libtool.m4
> index 320d8b3..acbda77 100644
> --- a/m4/libtool.m4
> +++ b/m4/libtool.m4
> @@ -2543,7 +2543,8 @@ freebsd* | dragonfly*)
> version_type=freebsd-$objformat
> case $version_type in
> freebsd-elf*)
> - library_names_spec='$libname$release$shared_ext$versuffix
> $libname$release$shared_ext $libname$shared_ext'
> + library_names_spec='$libname$release$shared_ext$versuffix
> $libname$release$shared_ext$major $libname$shared_ext'
> + soname_spec='$libname$release$shared_ext$major'
> need_version=no
> need_lib_prefix=no
> ;;
> @@ -2888,7 +2889,7 @@ sysv4*MP*)
> ;;
>
> sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
> - version_type=freebsd-elf
> + version_type=sco
> need_lib_prefix=no
> need_version=no
> library_names_spec='$libname$release$shared_ext$versuffix
> $libname$release$shared_ext $libname$shared_ext'
Cheers,
--
Gary V. Vaughan (gary AT gnu DOT org)