summaryrefslogtreecommitdiff
path: root/gcc/Makefile.in
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-18 20:45:26 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-18 20:45:26 +0000
commitf1035767ba452ca6194865236191ee619215c88c (patch)
tree245651951ece0aac97f2aca3cb99e9d5d3e256a3 /gcc/Makefile.in
parentaf5a705a7ed632222c970e43ef20330afc8f7e78 (diff)
downloadgcc-f1035767ba452ca6194865236191ee619215c88c.tar.gz
2005-05-18 Geoffrey Keating <geoffk@apple.com>
* dummy-checksum.c: New. * genchecksum.c: New. * c.opt (print_pch_checksum): New flag. * c-pch.c (struct c_pch_validity): Make much shorter. (no_checksum): New. (host_machine): Remove. (target_machine): Remove. (get_ident): Change PCH version number. (pch_init): When -fverbose-asm, print out the compiler fingerprint. Don't put triplets or version string in PCH validity data. Do put the compiler checksum in the validity data. (c_common_valid_pch): Don't check triplets or version string. Do check checksum. (c_common_print_pch_checksum): New. * c-opts.c (c_common_handle_option): Add OPT_print_pch_checksum. Print fingerprint with -v. * c-common.h (c_common_print_pch_checksum): New. (executable_checksum): New. * Makefile.in (STAGEMOVESTUFF): Add cc1*-dummy, *-checksum.c. (cc1-dummy): New rule. (cc1-checksum.c): New rule. (cc1-checksum.o): New rule. (cc1): Add checksum support. (build/genchecksum): New. (build/genchecksum.o): New. (dummy-checksum.o): New. (genobjnames): Add genchecksum.o. (mostlyclean): Remove *-checksum.c. (gnucompare): Add libgcc to list of directories checked. Make comparison problems in libgcc/ and with checksum files only be warnings. * doc/invoke.texi (Precompiled Headers): Remove caution. Document that it must be the exact same binary. Add a few known-safe flags to the list. In cp/: 2005-05-18 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (cc1plus-dummy): New. (cc1plus-checksum.c): New. (cc1plus-checksum.o): New. (cc1plus): Add cc1plus-checksum.o. In objc/: 2005-05-18 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (cc1obj-dummy): New. (cc1obj-checksum.c): New. (cc1obj-checksum.o): New. (cc1obj): Add cc1obj-checksum.o. In objcp/: 2005-05-18 Geoffrey Keating <geoffk@apple.com> * Make-lang.in (cc1objplus-dummy): New. (cc1objplus-checksum.c): New. (cc1objplus-checksum.o): New. (cc1objplus): Add cc1objplus-checksum.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99928 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r--gcc/Makefile.in69
1 files changed, 49 insertions, 20 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 62ac422337a..296e1cbe00f 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -983,12 +983,12 @@ STAGECOPYSTUFF = insn-flags.h insn-config.h insn-codes.h \
# Files to be moved away after each stage in building.
STAGEMOVESTUFF = *$(objext) s-* \
- xgcc$(exeext) cpp$(exeext) cc1$(exeext) $(EXTRA_PASSES) \
+ xgcc$(exeext) cpp$(exeext) cc1$(exeext) cc1*-dummy$(exeext) $(EXTRA_PASSES) \
$(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
protoize$(exeext) unprotoize$(exeext) \
$(SPECS) collect2$(exeext) \
gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
- *.[0-9][0-9].* *.[si] libbackend.a libgcc.mk \
+ *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk \
$(LANG_STAGESTUFF)
# Defined in libgcc2.c, included only in the static library.
@@ -1213,9 +1213,18 @@ $(SPECS): xgcc$(exeext)
gcc-cross: xgcc$(exeext)
cp xgcc$(exeext) gcc-cross$(exeext)
-cc1$(exeext): $(C_OBJS) $(BACKEND) $(LIBDEPS)
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1$(exeext) \
- $(C_OBJS) $(BACKEND) $(LIBS)
+cc1-dummy$(exeext): $(C_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) dummy-checksum.o \
+ $(BACKEND) $(LIBS)
+
+cc1-checksum.c : cc1-dummy$(exeext) build/genchecksum$(exeext)
+ build/genchecksum$(exeext) cc1-dummy$(exeext) > $@
+
+cc1-checksum.o : cc1-checksum.c
+
+cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) cc1-checksum.o \
+ $(BACKEND) $(LIBS)
# Build the version of limits.h that we will install.
xlimits.h: glimits.h limitx.h limity.h
@@ -1532,6 +1541,14 @@ gccspec.o: gccspec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H)
cppspec.o: cppspec.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H)
+build/genchecksum$(build_exeext) : build/genchecksum.o $(BUILD_LIBDEPS)
+ $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ \
+ build/genchecksum.o $(BUILD_LIBS)
+
+build/genchecksum.o : genchecksum.c $(BCONFIG_H) $(SYSTEM_H) $(MD5_H)
+
+dummy-checksum.o : dummy-checksum.c
+
tree-check.h: s-check ; @true
s-check : build/gencheck$(build_exeext)
$(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
@@ -2668,7 +2685,8 @@ genobjnames=$(genprognames:%=%.o) read-rtl.o gensupport.o genattrtab.o \
genconstants.o gen-protos.o scan.o fix-header.o scan-decls.o \
gencheck.o dummy-conditions.o genconditions.o errors.o ggc-none.o \
min-insn-modes.o rtl.o print-rtl.o varray.o gcov-iov.o \
- insn-conditions.o gengtype-lex.o gengtype-yacc.o genmddeps.o
+ insn-conditions.o gengtype-lex.o gengtype-yacc.o genmddeps.o \
+ genchecksum.o
genobjs=$(genobjnames:%=build/%)
@@ -3300,6 +3318,8 @@ mostlyclean: lang.mostlyclean
# Delete files generated by gengtype.c
-rm -f gtype-*
-rm -f gt-*
+# Delete genchecksum outputs
+ -rm -f *-checksum.c
# Delete all files made by compilation
# that don't exist in the distribution.
@@ -4068,23 +4088,32 @@ fastcompare fastcompare3 fastcompare4 fastcompare-lean fastcompare3-lean fastcom
gnucompare gnucompare3 gnucompare4 gnucompare-lean gnucompare3-lean gnucompare4-lean: force
-rm -f .bad_compare
case "$@" in *compare | *compare-lean ) stage=2 ;; * ) stage=`echo $@ | sed -e 's,^[a-z]*compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
- for dir in . $(SUBDIRS); do \
+ for dir in . $(SUBDIRS) libgcc; do \
if [ "`echo $$dir/*$(objext)`" != "$$dir/*$(objext)" ] ; then \
for file in $$dir/*$(objext); do \
- case "$@" in \
- slowcompare* ) \
- tail +16c ./$$file > tmp-foo1; \
- tail +16c stage$$stage/$$file > tmp-foo2 \
- && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $$file differs >> .bad_compare) || true; \
- ;; \
- fastcompare* ) \
- cmp $$file stage$$stage/$$file 16 16 > /dev/null 2>&1; \
- test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
- ;; \
- gnucompare* ) \
- cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1; \
- test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+ case $$file in \
+ ./cc*-checksum$(objext) | libgcc/* ) \
+ tail +16c ./$$file > tmp-foo1 \
+ && tail +16c stage$$stage/$$file > tmp-foo2 \
+ && ( cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 \
+ || echo warning: $$file differs || true ) \
;; \
+ *) case "$@" in \
+ slowcompare* ) \
+ tail +16c ./$$file > tmp-foo1; \
+ tail +16c stage$$stage/$$file > tmp-foo2 \
+ && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 \
+ || echo $$file differs >> .bad_compare) || true; \
+ ;; \
+ fastcompare* ) \
+ cmp $$file stage$$stage/$$file 16 16 > /dev/null 2>&1; \
+ test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+ ;; \
+ gnucompare* ) \
+ cmp --ignore-initial=16 $$file stage$$stage/$$file > /dev/null 2>&1; \
+ test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+ ;; \
+ esac ; \
esac ; \
done; \
else true; fi; \