libtool
[Top][All Lists]
Advanced

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

Re: fail.at failing on HP-UX


From: Ralf Wildenhues
Subject: Re: fail.at failing on HP-UX
Date: Wed, 3 May 2006 18:16:46 +0200
User-agent: Mutt/1.5.11

Hi Albert,

Sorry for the delay.

* Albert Chin wrote on Sun, Apr 30, 2006 at 11:21:57PM CEST:
> On Sun, Apr 30, 2006 at 05:09:23PM +0200, Ralf Wildenhues wrote:
> > * Albert Chin wrote on Sun, Apr 30, 2006 at 05:00:46PM CEST:
> > > I'm getting the following test failure from HEAD on HP-UX 11.23/PA:
> > 
> > > However, even though there is no main, `a' is still created. How do we
> > > work around this?
> > 
> > Yes.  I didn't finish this when I saw it, several weeks ago.
> > Bob suggested removing the binary in mode=link when an error occurred, I
> > am hesitant as the binary may still be useful for the clueful developer.
> 
> If cc doesn't remove it, libtool definitely should not.

OK.  Let's not change it now.

> Can we XFAIL it for now on *-hpux*? How do I do this?

No, that's ugly.  Giving in on matching $host in the link-order test has
already created a maintenance hassle, and I want to revert this
eventually.

This should work.  Let's just hope there is no legacy system where both
"test -x" doesn't work and the linker outputs broken binaries.

OK?  (We can still factor it nicely in a macro should we need it
elsewhere.)

Cheers,
Ralf

        * tests/fail.at: Use "test -x" if available, for testing of
        executables; code modified from Autoconf's AS_EXECUTABLE_P.
        Reported by Albert Chin <address@hidden>.

Index: tests/fail.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/fail.at,v
retrieving revision 1.3
diff -u -r1.3 fail.at
--- tests/fail.at       5 Feb 2006 09:56:44 -0000       1.3
+++ tests/fail.at       3 May 2006 16:11:23 -0000
@@ -28,6 +28,17 @@
 [AT_CHECK([if $1; then (exit 1); else :; fi], [0], [ignore], [ignore])
 ])
 
+AT_DATA([script],
+[[#! /bin/sh
+exit 0
+]])
+chmod +x script
+if test -x script >/dev/null 2>&1; then
+  test_x="test -x"
+else
+  test_x=:
+fi
+
 # compile failure
 echo 'choke me' > a.c
 FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c])
@@ -52,9 +63,9 @@
 echo 'int not_main(void) { return 0; }' > a.c
 $CC $CPPFLAGS $CFLAGS -c a.c
 FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a a.$OBJEXT])
-AT_CHECK([test -f a || test -f a$EXEEXT], [1])
+AT_CHECK([{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x 
a$EXEEXT; }], [1])
 FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a a.$OBJEXT -static])
-AT_CHECK([test -f a || test -f a$EXEEXT], [1])
+AT_CHECK([{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x 
a$EXEEXT; }], [1])
 
 # shared library creation failure
 case $build_libtool_libs in yes)




reply via email to

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