diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-23 01:16:22 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-23 01:16:22 +0000 |
commit | 02947292b1fa2c5103562fedab076d2f6622ca95 (patch) | |
tree | 1b875b349a4b90446dbd724c2b47925949fc2546 /gcc/mkconfig.sh | |
parent | f9e869db08b0c76452a336fb924fe97485b0048b (diff) | |
download | gcc-02947292b1fa2c5103562fedab076d2f6622ca95.tar.gz |
* mkconfig.sh: Use a subshell with redirected stdout,
instead of closing stdout and confusing commands that run
afterward. Throw away output of cmp.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40765 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/mkconfig.sh')
-rw-r--r-- | gcc/mkconfig.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh index e89d382e002..5250708fcec 100644 --- a/gcc/mkconfig.sh +++ b/gcc/mkconfig.sh @@ -12,7 +12,10 @@ fi output=$1 rm -f $output.T -exec > $output.T + +# We used to exec > $output.T but apparently this has bugs. +# Use a redirected subshell instead. +( # Define TARGET_CPU_DEFAULT if the system wants one. # This substitutes for lots of *.h files. @@ -53,10 +56,10 @@ echo "#include \"insn-codes.h\"" echo "#include \"insn-flags.h\"" echo "#endif" -exec >&- +) > $output.T # Avoid changing the actual file if possible. -if [ -f $output ] && cmp $output.T $output; then +if [ -f $output ] && cmp $output.T $output >/dev/null 2>&1; then echo $output is unchanged >&2 rm -f $output.T else |