libtool-patches
[Top][All Lists]
Advanced

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

Re: HEAD: static tests


From: Gary V. Vaughan
Subject: Re: HEAD: static tests
Date: Tue, 21 Feb 2006 22:03:17 +0000
User-agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)

Hallo Ralf,

In principle, this seems like a good thing to go in, except that I still
have one nagging doubt:  If 1.5.22 is the only release with the
regressed semantics for -static, then for bugwards compatibility, I'd be
inclined to revert to it's former meaning with years old pedigree, and
come up with a new flag name for the (better) semantics we introduced in
1.5.22...

Hmmm (thinking out loud), might it be better to come up with two
entirely new flag names, one for non-1.5.22 semantics and another for
1.5.22 semantics to recommend from here on in.  If we get a '-static'
flag, we should then issue a big fat warning that for compatibility
we will interpret this flag as for pre-1.5.22, but it would be better
for the developer to pass one of the new flag names instead to avoid
ambiguity in the future.

What say you?

Cheers,
        Gary.

Ralf Wildenhues wrote:
>>* Ralf Wildenhues wrote on Mon, Jan 30, 2006 at 02:01:53PM CET:
>>
>>>I will followup to this mail (to libtool-patches only for size) with a
>>>patch to implement per-deplib flags for programs (for CVS HEAD) and add
>>>comprehensive tests for the static flags.
>>
>>Here goes the test.  Note that the tests uncovered that hardcoding
>>was not done in all cases where necessary with the `-static' flag
>>since we changed its behavior; a fix will be proposed in a followup.
> 
> 
> Small update to the proposed patch: if link_static_flag is empty, don't
> expect `-all-static' to do wonders magically.  Add keyword, remove some
> cruft leftover from testing.
> 
> I intend to apply as one patch.  If ok..
> 
> Cheers,
> Ralf
> 
> 
>>      * tests/static.at: New tests for comprehensive test exposure of
>>      all current and proposed static linking flags for programs.
>>      * Makefile.am, tests/testsuite.at: Updated.
> 
> 
> 
> --- tests/static.at   2006-02-21 08:29:17.000000000 +0100
> +++ tests/static.at   2006-02-03 10:14:52.000000000 +0100
> @@ -63,6 +63,7 @@
>  #   (most likely the Sun compiler suite will be the only problem child).
>  
>  AT_SETUP([static linking flags for programs])
> +AT_KEYWORDS([libtool])
>  
>  LDFLAGS="$LDFLAGS -no-undefined"
>  prefix=`pwd`/inst
> @@ -207,7 +227,7 @@
>    # global static flags.
>    for st in -static -static-libtool-libs -all-static; do
>      AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o m$st 
> m.$OBJEXT \
> -           -L${libdir}1 $R -la1 a2/liba2.la -L${libdir}3 -R${libdir}3 -la3],
> +           -L${libdir}1 -la1 a2/liba2.la -L${libdir}3 -R${libdir}3 -la3],
>            [0], [ignore], [ignore])
>    done
>  
> @@ -270,21 +292,26 @@
>    # - remove the library images to catch failure to link 
> statically/dynamically,
>    # - add false other deplibs in the paths to catch (some) wrongly added run 
> paths.
>  
> +  # if -all-static does not work, do not exercise it any more.
> +  all_static=-all-static
> +  eval `$LIBTOOL --config | grep '^link_static_flag='`
> +  test -z "$link_static_flag" && all_static=
> +
>    echo "### test whether installed libtool library liba2 was linked 
> statically"
>    func_move_libs a2 ${libdir}2
> -  func_test_exec -static -static-libtool-libs -all-static `$per_deplib && 
> echo 2 12 23 123 123a`
> +  func_test_exec -static -static-libtool-libs $all_static `$per_deplib && 
> echo 2 12 23 123 123a`
>    $per_deplib && func_test_exec_fail 1 3 13 31
>    func_restore_libs a2 ${libdir}2
>  
>    echo "### test whether uninstalled libtool library liba1 was linked 
> statically"
>    func_move_libs a1 ${libdir}1
> -  func_test_exec -static-libtool-libs -all-static `$per_deplib && echo 1 12 
> 13 31 123 123a`
> +  func_test_exec -static-libtool-libs $all_static `$per_deplib && echo 1 12 
> 13 31 123 123a`
>    $per_deplib && func_test_exec_fail -static 2 3 23
>    func_restore_libs a1 ${libdir}1
>  
>    echo "### test whether non-libtool library liba3 was linked statically"
>    func_move_libs a3 ${libdir}3
> -  func_test_exec -all-static `$per_deplib && echo 3 13 23 31 123 123a`
> +  func_test_exec $all_static `$per_deplib && echo 3 13 23 31 123 123a`
>    func_test_exec_fail -static -static-libtool-libs `$per_deplib && echo 1 2 
> 12`
>    func_restore_libs a3 ${libdir}3
>  
> 
> 

-- 
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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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