diff options
author | Zack Weinberg <zackw@stanford.edu> | 2001-03-23 01:16:22 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2001-03-23 01:16:22 +0000 |
commit | 1b0ae0f9be2921fae57caf7e9ad6160d7a5edb3a (patch) | |
tree | 1b875b349a4b90446dbd724c2b47925949fc2546 | |
parent | b937498e3083dae97f40d24e3057a99328f3e695 (diff) | |
download | gcc-1b0ae0f9be2921fae57caf7e9ad6160d7a5edb3a.zip gcc-1b0ae0f9be2921fae57caf7e9ad6160d7a5edb3a.tar.gz gcc-1b0ae0f9be2921fae57caf7e9ad6160d7a5edb3a.tar.bz2 |
mkconfig.sh: Use a subshell with redirected stdout...
* mkconfig.sh: Use a subshell with redirected stdout,
instead of closing stdout and confusing commands that run
afterward. Throw away output of cmp.
From-SVN: r40765
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/mkconfig.sh | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c94dacc..07dcc2f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2001-03-22 Zack Weinberg <zackw@stanford.edu> + + * mkconfig.sh: Use a subshell with redirected stdout, + instead of closing stdout and confusing commands that run + afterward. Throw away output of cmp. + 2001-03-22 Gordon Sadler <gbsadler1@lcisp.com> * Makefile.in (stage1_build): Pass CFLAGS to stage1_build. diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh index e89d382..5250708fc 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 |