[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fwd: Bug#207475: libtool: wrongly hides important compiler output]
From: |
Gary V. Vaughan |
Subject: |
Re: [Fwd: Bug#207475: libtool: wrongly hides important compiler output] |
Date: |
Tue, 07 Oct 2003 16:14:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Thunderbird/0.3 |
Scott James Remnant wrote:
Forwarded for discussion purposes ...
Thanks!
I can see Sam's point, but I can also see the reason for suppressing one
of two near-identical compilations.
How about a -no-suppress option? (see attachment)
Cheers,
Gary.
-----Forwarded Message-----
From: Sam Hocevar <address@hidden>
To: Debian Bug Tracking System <address@hidden>
Subject: Bug#207475: libtool: wrongly hides important compiler output
Date: Wed, 27 Aug 2003 12:40:32 +0200
Package: libtool
Version: 1.5-1 (not installed)
Severity: normal
My generated libtool scripts contain the following lines (coming from
/usr/share/libtool/ltmain.sh, line 725):
# Allow error messages only from the first compilation.
suppress_output=' >/dev/null 2>&1'
Which means that if the -fPIC compilation succeeded, it sends the
output of the non-PIC compilation to /dev/null, wrongly assuming that
if a file builds in PIC mode it will build in non-PIC mode (which is
obviously wrong since one can put broken code between #ifndef PIC). It
is then highly irritating to get a build error from the buildd that
simply says "Error 1".
I suggest that this suppress_output line either be simply removed,
because it is simply wrong to hide meaningful output from the user, or
at least be made configurable.
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux c18 2.4.21-rc5 #2 Wed May 28 22:10:14 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=fr_FR
--
())_. Gary V. Vaughan gary@(lilith.warpmail.net|gnu.org)
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/
Index: ChangeLog
from Gary V. Vaughan <address@hidden>
* ltmain.in: Don't suppress output of PIC mode compile if
-no-suppress option is given.
* doc/libtool.texi (Invoking libtool): Document it.
* NEWS: Updated.
Index: NEWS
===================================================================
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.114
diff -u -p -u -r1.114 NEWS
--- NEWS 7 Oct 2003 11:12:16 -0000 1.114
+++ NEWS 7 Oct 2003 15:07:56 -0000
@@ -4,6 +4,8 @@ New in 1.5b: 2003-??-??; CVS version 1.5
* libtoolize installs libtool.m4 (and ltdl.m4 if used) to AC_CONFIG_M4_DIR.
* Mode inferrence removed, shorthand for choosing modes added.
* Specifying -allow-undefined is now an error.
+* -no-suppress in compile mode shows compiler output for both PIC and non-PIC
+ object compilation.
* Bug fixes.
New in 1.5.1: 2003-??-??; CVS version 1.5.0a, Libtool team:
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.347
diff -u -p -u -r1.347 ltmain.in
--- ltmain.in 7 Oct 2003 14:51:05 -0000 1.347
+++ ltmain.in 7 Oct 2003 15:07:57 -0000
@@ -357,6 +357,7 @@ exec_cmd=
# Get the compilation command and the source file.
base_compile=
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
suppress_output=
arg_mode=normal
libobj=
@@ -403,6 +404,11 @@ exec_cmd=
continue
;;
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
-Xcompiler)
arg_mode=arg # the next one goes into the "base_compile" arg list
continue # The current "srcfile" will either be retained or
@@ -710,7 +716,9 @@ pic_object='$objdir/$objname'
EOF
# Allow error messages only from the first compilation.
- suppress_output=' >/dev/null 2>&1'
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
else
# No PIC object so indicate it doesn't exist in the libtool
# object file.
Index: doc/libtool.texi
===================================================================
RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v
retrieving revision 1.137
diff -u -p -u -r1.137 libtool.texi
--- doc/libtool.texi 7 Oct 2003 14:51:06 -0000 1.137
+++ doc/libtool.texi 7 Oct 2003 15:07:59 -0000
@@ -1152,6 +1152,12 @@ linker flags with @samp{-Wl,@var{flag}}
You can also pass compile specific flags using @samp{-Wc,@var{flag}}
and @samp{-Xcompiler @var{flag}}.
+If both PIC and non-PIC objects are being built, libtool will normally
+supress the compiler output for the PIC object compilation to save
+showing very similar, if not identical duplicate output for each
+object. If the @samp{-no-suppress} option is given in compile mode,
+libtool will show the compiler output for both objects.
+
If the @samp{-static} option is given, then a @samp{.o} file is built,
even if libtool was configured with @samp{--disable-static}.
- Re: [Fwd: Bug#207475: libtool: wrongly hides important compiler output],
Gary V. Vaughan <=