This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: "Fix" strip test failure


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]