Den 2010-08-29 07:54 skrev Peter Rosin:
> Den 2010-08-28 12:24 skrev Ralf Wildenhues:
>> Peter, can you check whether ar-lib, lib, and 'link -lib' reliably fail
>> when an @file contains a nonexistent file name?
> 
> I haven't run the testsuite, but manual testing shows that the patch
> should be ok. If the testsuite reveals unexpected problems I'll report
> back...

Microsoft lib prints a failure message though. I assume other
archivers are not unlikely to also do so...

Pushing the attached as obvious.

Cheers,
Peter
>From 34f87a6b07381f6092851a25c9da62b2c40a4d21 Mon Sep 17 00:00:00 2001
From: Peter Rosin <[email protected]>
Date: Tue, 31 Aug 2010 12:40:01 +0200
Subject: [PATCH] Silence archiver output when testing @file support.

* libltdl/m4/libtool.m4 (_LT_PROG_AR): Redirect stdout and stderr
to the bit bucket when testing for @file support.

Signed-off-by: Peter Rosin <[email protected]>
---
 ChangeLog             |    6 ++++++
 libltdl/m4/libtool.m4 |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a4c91cb..1ee96b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-31  Peter Rosin  <[email protected]>
+
+       Silence archiver output when testing @file support.
+       * libltdl/m4/libtool.m4 (_LT_PROG_AR): Redirect stdout and stderr
+       to the bit bucket when testing for @file support.
+
 2010-08-31  Gary V. Vaughan  <[email protected]>
 
        Remove double `Generated from foo.m4sh' lines.
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index e03543b..530c971 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1360,7 +1360,7 @@ AC_CACHE_CHECK([for archiver @FILE support], 
[lt_cv_ar_at_file],
   [lt_cv_ar_at_file=no
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
      [echo conftest.$ac_objext > conftest.lst
-      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst'
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >/dev/null 2>&1'
       AC_TRY_EVAL([lt_ar_try])
       if test "$ac_status" -eq 0; then
        # Ensure the archiver fails upon bogus file names.
-- 
1.7.1

Reply via email to