libtool-patches
[Top][All Lists]
Advanced

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

Re: versioning test on AIX


From: Ralf Wildenhues
Subject: Re: versioning test on AIX
Date: Sat, 21 Aug 2010 10:17:15 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

* Ralf Wildenhues wrote on Sat, Aug 07, 2010 at 12:30:01AM CEST:
> The test tries to ensure that with an incompatible library upgrade,
> programs previously linked against the old library still work.  This
> usually works on systems where different major versions of a library
> have different file names.  Which isn't the case for AIX without
> runtimelinking (liba.a is the same name whether it contains liba.so.2
> or liba.so.0):
[...]

> Now, the part that really surprised me was that this doesn't even work
> with runtimelinking (configure LDFLAGS=-Wl,-brtl), even though the file
> names aren't the issue here:
[...]

> So, while I'm not completely sure yet that there isn't another bug
> lurking in libtool here, it seems that this is another AIX limitation.
> 
> One way out may be to use loader domains; see here for a description:
> <http://stromberg.dnsalias.org/~strombrg/AIX-shared-libs.html>
> 
> I don't really see how to apply this concept in general, i.e., without
> user intervention.  So, for now I propose the patch below to skip this
> part of the part; I will leave time for comments before pushing it.

No comments, so I'm pushing this patch.

Also pushing the trivial cleanup patch below.

Cheers,
Ralf

>     Skip part of versioning test on AIX.
>     
>     * tests/versioning.at (versioning): The AIX linker always
>     records the unversioned library name, even with runtimelinking,
>     so skip the execution test for the incompatibly upgraded
>     library.
>     Report by Rainer Tammer.
> 
> diff --git a/tests/versioning.at b/tests/versioning.at
> index eef7c4a..1d75f62 100644
> --- a/tests/versioning.at
> +++ b/tests/versioning.at

> @@ -227,6 +227,11 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o 
> liba.la liba4.lo ]dnl
>  # available, so test_uninstalled will not necessarily work here any more.
>  AT_CHECK([$LIBTOOL --mode=install cp liba.la $libdir], [], [ignore], 
> [ignore])
>  AT_CHECK([$LIBTOOL --mode=clean rm -f liba.la], [], [ignore], [ignore])
> +
> +# This test does not work on AIX, not even with runtimelinking, because
> +# the linker always records the unversioned name as dependency.
> +AT_CHECK([:; case $host_os in aix*) exit 77;; esac])
> +
>  test_installed


    Remove dead code from versioning test.
    
    * tests/versioning.at (versioning): No need to build unused
    prog3.

diff --git a/tests/versioning.at b/tests/versioning.at
index 69bf731..eef7c4a 100644
--- a/tests/versioning.at
+++ b/tests/versioning.at
@@ -91,14 +91,6 @@ int main (void)
 }
 ]])
 
-AT_DATA([prog3.c], [[
-extern int a (void), internal_detail;
-int main (void)
-{
-  return a () + internal_detail - 42;
-}
-]])
-
 
 inst=`pwd`/inst
 libdir=$inst/lib
@@ -109,7 +101,7 @@ mkdir $inst $libdir $bindir
 for file in liba1.c liba2.c liba3.c liba4.c libb.c; do
   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
 done
-for file in prog1.c prog2.c prog3.c; do
+for file in prog1.c prog2.c; do
   $CC $CPPFLAGS $CFLAGS -c $file
 done
 



reply via email to

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