blob: 560b628c5d1b5e775d63592c5a8bd182b9a98d4c [file] [log] [blame]
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# The master for this file is $GOROOT/src/quietgcc.bash
# Changes made to $HOME/bin/quietgcc will be overridden.
# Gcc output that we don't care to see.
ignore=': error: .Each undeclared identifier'
ignore=$ignore'|: error: for each function it appears'
ignore=$ignore'|is dangerous, better use'
ignore=$ignore'|is almost always misused'
ignore=$ignore'|: In function '
ignore=$ignore'|: At top level: '
ignore=$ignore'|In file included from'
ignore=$ignore'| from'
# Figure out which cc to run.
# Can use plain cc on real 64-bit machines
# and on OS X, but have to use crosstool on
# mixed64-32 machines like thresher.
case "`uname -a`" in
# Run gcc, save error status, redisplay output without noise, exit with gcc status.
$gcc -m64 -Wall -Wno-sign-compare -Wno-missing-braces \
-Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment \
"$@" >$tmp 2>&1
egrep -v "$ignore" $tmp | uniq
rm -f $tmp
exit $status