This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: "Fix" strip test failure
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: "Fix" strip test failure
- From: Andreas Jaeger <aj at suse dot de>
- Date: 02 May 2001 15:17:30 +0200
- Cc: "H . J . Lu" <hjl at lucon dot org>, binutils at sources dot redhat dot com
- References: <u8wv82nmjp.fsf@gromit.rhein-neckar.de><20010430142931.A12863@lucon.org><ory9sgsf2q.fsf@guarana.lsd.ic.unicamp.br>
Alexandre Oliva <aoliva@redhat.com> writes:
> On Apr 30, 2001, "H . J . Lu" <hjl@lucon.org> wrote:
>
> > My Linux binutils has no problems. I have fixed it long time ago:
>
> > http://sources.redhat.com/ml/binutils/2000-10/msg00047.html
>
> > But my patch was not accepted :-(.
>
> Actually, it's still in my libtool-patches mail folder, along with
> hundreds of other patches I'm yet to analyze and eventually comment on
> or install.
>
> I have mixed feelings about this patch. On one hand, I perfectly
> understand the reasoning to avoid getting these warning messages. On
> the other hand, I find it would be a problem if libtool were to relink
> the program and fail without producing a reasonable error message.
>
> I'd rather have something that would save the error messages in a
> temporary file (or perhaps in a shell variable), and display them in
> case linking fails, or throw them away in case it succeeds.
Like this?
Andreas
2001-05-02 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
* ltmain.sh (relink_command): Save output to a variable and
display it only if relinking fails.
============================================================
Index: ltmain.sh
--- ltmain.sh 2001/04/20 09:28:05 1.10
+++ ltmain.sh 2001/05/02 13:16:20
@@ -4622,8 +4622,9 @@
if test -n "$relink_command"; then
$echo "$modename: warning: relinking \`$file'" 1>&2
$show "$relink_command"
- if $run eval "$relink_command"; then :
+ if relink_command_output=`$run eval "$relink_command" 2>&1`; then :
else
+ $echo "$relink_command_output" >&2
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
continue
fi
@@ -4792,8 +4793,9 @@
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
$show "$relink_command"
- if $run eval "$relink_command"; then :
+ if relink_command_output=`$run eval "$relink_command" 2>&1`; then :
else
+ $echo "\$relink_command_output" >&2
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
${rm}r "$tmpdir"
continue
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj