aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-06-14 15:05:41 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-06-14 15:05:41 +0000
commit3708da2ac564f6f5834fafa0c9d57227d356912e (patch)
tree43e8f44404072cb7459f6038d247d4657e59a5e5
parent9756074d28bd076d7aaf512012b32435c190c930 (diff)
downloadgcc-3708da2ac564f6f5834fafa0c9d57227d356912e.zip
gcc-3708da2ac564f6f5834fafa0c9d57227d356912e.tar.gz
gcc-3708da2ac564f6f5834fafa0c9d57227d356912e.tar.bz2
opts.sh: Work around a mysterious feature in cygwin's gawk where specifying the input...
* opts.sh: Work around a mysterious feature in cygwin's gawk where specifying the input files explicitly has a different behavior to piping them via stdin. From-SVN: r67946
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/opts.sh4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9381b40..fd2c294 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-14 Roger Sayle <roger@eyesopen.com>
+
+ * opts.sh: Work around a mysterious feature in cygwin's gawk
+ where specifying the input files explicitly has a different
+ behavior to piping them via stdin.
+
2003-06-14 Neil Booth <neil@daikokuya.co.uk>
* doc/sourcebuild.texi: Update.
diff --git a/gcc/opts.sh b/gcc/opts.sh
index 9be2c5d..4d59dc5 100644
--- a/gcc/opts.sh
+++ b/gcc/opts.sh
@@ -33,12 +33,12 @@ SORT=sort # Could be /bin/sort or /usr/bin/sort
C_FILE=$1; shift
H_FILE=$1; shift
-cat "$@" | ${AWK} '
+${AWK} '
BEGIN{ RS=""; FS="\n" }
# Ignore comments and blank lines
/^[ \t]*(;|$)/ { next }
/^[^ \t]/ { gsub ("\n", "\034", $0); print }
-' | ${SORT} | ${AWK} '
+' "$@" | ${SORT} | ${AWK} '
function switch_flags (langs, flags)
{
langs = ":" langs ":"