This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[LTO][PATCH] Fix lto-wrapper output for gcc -v cases


This patch fixes -fwhopr link failures that can occur if '-v' is given on
the outer level gcc command.  lto-wrapper passes this down, and the output
that subprograms generate with '-v' then interfere with lto-wrapper's own
output, captured and used by collect2.

Example:

  $ rm -rf x.o x.so
  $ gcc -fwhopr -c -o x.o -xc /dev/null
  $ gcc -fwhopr -shared -o x.so x.o
  $ echo $?
  0
  $ ls -l x.so
  -rwxr-x--- 1 ... 4955 Dec 10 21:44 x.so

  $ rm -rf x.o x.so
  $ gcc -v -fwhopr -c -o x.o -xc /dev/null
  $ gcc -v -fwhopr -shared -o x.so x.o
  $ echo $?
  1
  $ ls -l x.so
  ls: x.so: No such file or directory


gcc/lto/ChangeLog
2008-12-10  Simon Baldwin  <simonb@google.com>

	* ltrans-driver: Always run make in silent mode, to avoid make's
	trace on stdout interfering with lto-wrapper output.


Index: gcc/lto/ltrans-driver
===================================================================
--- gcc/lto/ltrans-driver	(revision 142647)
+++ gcc/lto/ltrans-driver	(working copy)
@@ -80,9 +80,7 @@ done
 
 echo "all: $outputlist" >> $makefile
 
-quiet="--quiet"
 if [ $verbose -eq 1 ] ; then
-  quiet=""
   set -x
 fi
 
@@ -101,5 +99,5 @@ if [ -x $awk -a -x $uptime -a -x $getcon
     par=$[($nprocs - $loadavg) * 2]
   fi
 fi
-${MAKE-make} $quiet -f $makefile -j $par all
+${MAKE-make} -s -f $makefile -j $par all
 exit $?


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