libtool-patches
[Top][All Lists]
Advanced

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

[PATCH] Skip need_lib_prefix.at on systems without lib prefix on librari


From: Peter Rosin
Subject: [PATCH] Skip need_lib_prefix.at on systems without lib prefix on libraries.
Date: Fri, 17 Sep 2010 08:44:43 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

Hi!

need_lib_prefix.at currently fails with MSVC. I think the test
is there to ensure that "weird" systems continue to work even
if the testsuite is running on a "normal" system. "weird" in
this case are systems with need_lib_prefix set to "unknown" and
"normal" are those with it set to "no". However, there are
even weirder systems where need_lib_prefix should perhaps be
set to "never" (i.e. MSVC) but that currently simply sets it
to "no". "never" would perhaps be more appropriate since preopen
doesn't work right if libs have a lib prefix. I think OS/2 is
affected in the same way as MSVC, but I have no means to test
that.

The below patch makes the need_lib_prefix.at test skip for the
even weirder systems, i.e. those where libname_spec does not
prefix library names with lib.

Ok to push?


You may want to compare this patch with thread

http://lists.gnu.org/archive/html/libtool-patches/2009-01/msg00174.html

which instead makes the test pass for the even weirder systems,
but I don't think that is really desired. Why should the code be
changed to accommodate a contrived test case? Because this would
never happen in the wild, right?

Oh, and one more thing, there's no rush for this one.

Cheers,
Peter


>From d23b133decabf20349e7b2a13aec5b1ce070b03c Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Thu, 16 Sep 2010 23:17:28 +0200
Subject: [PATCH] Skip need_lib_prefix.at on systems without lib prefix on 
libraries.

* tests/need_lib_prefix.at [MSVC, OS/2]: Skip this test on
systems that do not have libraries prefixed with lib.

Signed-off-by: Peter Rosin <address@hidden>
---
 ChangeLog                |    6 ++++++
 tests/need_lib_prefix.at |    7 +++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 37f6c84..1f86926 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-16  Peter Rosin  <address@hidden>
+
+       Skip need_lib_prefix.at on systems without lib prefix on libraries.
+       * tests/need_lib_prefix.at [MSVC, OS/2]: Skip this test on
+       systems that do not have libraries prefixed with lib.
+
 2010-09-16  Ralf Wildenhues  <address@hidden>
 
        tests: avoid localization failure due to unstable compiler messages.
diff --git a/tests/need_lib_prefix.at b/tests/need_lib_prefix.at
index f6cfcfb..bed24b6 100644
--- a/tests/need_lib_prefix.at
+++ b/tests/need_lib_prefix.at
@@ -148,6 +148,13 @@ esac], [], [ignore])
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
 LDFLAGS="$LDFLAGS"
 
+# Skip this test when libraries are not normally prefixed with lib.
+# E.g., for MSVC and OS/2.
+eval "`$LIBTOOL --config | $EGREP '^(libname_spec)='`"
+name=
+eval libname=\"$libname_spec\"
+AT_CHECK([test "$libname" = lib || exit 77])
+
 # Create our own libtool, forcing need_lib_prefix setting
 sed 's,^\(need_lib_prefix\)=.*$,\1=unknown,' $LIBTOOL > ./libtool
 LIBTOOL="$SHELL ./libtool"
-- 
1.7.1



reply via email to

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