libtool-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Libtool branch, master, updated. v2.2.6-87-ga8bb7bd


From: Ralf Wildenhues
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-87-ga8bb7bd
Date: Sat, 31 Jan 2009 10:43:32 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, master has been updated
       via  a8bb7bd817c7606e848b4c57069d49f6b5b82ed6 (commit)
      from  5e43c14cc9a99af8fbd4121cf913a66b38e100e9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a8bb7bd817c7606e848b4c57069d49f6b5b82ed6
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Jan 31 11:34:06 2009 +0100

    Nonexistent `main' does not guarantee link failure.
    
    * tests/fail.at (Failure tests): Use an unresolved symbol,
    rather than non-presence of `main', to provoke a link failure
    also on QNX.  Only check for failure of the libtool script if
    the link without libtool would have failed, too.
    Report by Mike Gorchak.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    7 +++++++
 tests/fail.at |   27 ++++++++++++++++++++-------
 2 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c6eb87e..10fdbd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-01-31  Ralf Wildenhues  <address@hidden>
 
+       Nonexistent `main' does not guarantee link failure.
+       * tests/fail.at (Failure tests): Use an unresolved symbol,
+       rather than non-presence of `main', to provoke a link failure
+       also on QNX.  Only check for failure of the libtool script if
+       the link without libtool would have failed, too.
+       Report by Mike Gorchak.
+
        Use AT_CHECK more liberally in duplicate members test.
        * tests/duplicate_members.at (duplicate members in archive
        tests): Wrap link commands in AT_CHECK, they might fail, as seen
diff --git a/tests/fail.at b/tests/fail.at
index 088ad9e..fb05f8c 100644
--- a/tests/fail.at
+++ b/tests/fail.at
@@ -1,6 +1,6 @@
 # fail.at -- test that libtool really fail when it should     -*- Autotest -*-
 #
-#   Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2005
 #
 #   This file is part of GNU Libtool.
@@ -64,13 +64,26 @@ case $pic_mode in default | yes)
   ;;
 esac
 
-# program creation failure
-echo 'int not_main(void) { return 0; }' > a.c
+# program creation failure.
+# We can't rely on `main' not being present: the QNX linker
+# won't error out in that case, although the resulting binary won't work.
+# So we provoke a link failure due to an unresolved symbol, and require
+# libtool to fail only if the link without libtool would have failed, too.
+cat > a.c <<'EOF'
+extern int nonexistent_function (void);
+int main (void)
+{
+  return nonexistent_function ();
+}
+EOF
 $CC $CPPFLAGS $CFLAGS -c a.c
-FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT])
-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$EXEEXT a.$OBJEXT 
-static])
-AT_CHECK([{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x 
a$EXEEXT; }], [1])
+if $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then :; else
+  rm -f a a$EXEEXT
+  FAIL_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT])
+  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$EXEEXT a.$OBJEXT 
-static])
+  AT_CHECK([{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x 
a$EXEEXT; }], [1])
+fi
 
 # shared library creation failure
 case $build_libtool_libs in yes)


hooks/post-receive
--
GNU Libtool




reply via email to

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