Patch to detect crashes in fixproto/fix-header and halt bootstrap
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Sun Apr 16 07:54:00 GMT 2000
The fix-header program is crashing on all my platforms this morning
(except for x86-linux which doesn't use it.) However the bootstrap
process blithely continues on as if nothing went wrong. I only
happened to notice it because I was looking at the screen as saw the
core dump message.
The following patch allows the bootstrap process to detect
errors/crashes from fixproto/fix-header and halt immediately so these
problems are noticed.
Tested on the following platforms which now all correctly crash and
burn on stage1 fixproto:
mips-sgi-irix6.2
alphaev5-dec-osf4.0b
sparc-sun-sunos4.1.4
sparc-sun-solaris2.7
Okay to install?
--Kaveh
2000-04-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (stmp-fixproto): Acknowledge errors in fixproto.
* fixproto: If fix-header fails, exit with an error.
diff -rup orig/egcs-CVS20000416/gcc/Makefile.in egcs-CVS20000416/gcc/Makefile.in
--- orig/egcs-CVS20000416/gcc/Makefile.in Sun Apr 16 08:21:33 2000
+++ egcs-CVS20000416/gcc/Makefile.in Sun Apr 16 09:49:18 2000
@@ -2316,7 +2316,7 @@ fixhdr.ready: fix-header
# if it has already been run on the files in `include'.
stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs
@echo "Various warnings and error messages from fixproto are normal"
- -if [ -f include/fixed ] ; then true; \
+ if [ -f include/fixed ] ; then true; \
else \
: This line works around a 'make' bug in BSDI 1.1.; \
FIXPROTO_DEFINES="$(FIXPROTO_DEFINES)"; export FIXPROTO_DEFINES; \
@@ -2324,6 +2324,7 @@ stmp-fixproto: fixhdr.ready fixproto stm
export mkinstalldirs; \
if [ -d $(SYSTEM_HEADER_DIR) ] ; then \
$(SHELL) ${srcdir}/fixproto include include $(SYSTEM_HEADER_DIR); \
+ if [ $$? -eq 0 ] ; then true ; else exit 1 ; fi ; \
else true; fi; \
touch include/fixed; \
fi
diff -rup orig/egcs-CVS20000416/gcc/fixproto egcs-CVS20000416/gcc/fixproto
--- orig/egcs-CVS20000416/gcc/fixproto Mon May 17 19:07:40 1999
+++ egcs-CVS20000416/gcc/fixproto Sun Apr 16 09:40:43 2000
@@ -264,6 +264,7 @@ for code in ALL STD ; do
then true
else
$FIX_HEADER $rel_source_file $abs_source_file $abs_target_file ${DEFINES} $include_path
+ if test $? != 0 ; then exit 1 ; fi
echo "${rel_source_file}" >>fixproto.list
fi
done
@@ -299,6 +300,7 @@ EOF
#endif /* __${rel_source_ident} */
EOF
${FIX_HEADER} $rel_source_file tmp.h $abs_target_dir/$rel_source_file ${DEFINES} $include_path
+ if test $? != 0 ; then exit 1 ; fi
rm tmp.h
fi
done
More information about the Gcc-patches
mailing list