This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to add fastcompare* targets


In message <200309112057.h8BKv168017598@caip.rutgers.edu>, "Kaveh R. Ghazi" wri
tes:
 >This patch adds fastcompare* targets to GCC.  The cmp on some systems,
 >like solaris2 and irix6, accepts the command line format:
 >
 >	cmp file1 file2 [skip1] [skip2]
 >
 >I also altered the configure check to additionally test for this style
 >when setting the comparison target for bootstraps.
 >
 >I tested the configure part by putting gnu cmp in my path and
 >configuring, then solaris2 cmp in my path and configuring, then I
 >tried linking cmp->true/false and reconfiguring each respectively.  In
 >each case, configure picked the right compare target, gnucompare,
 >fastcompare and slowcompare/slowcompare.
 >
 >I tested the Makefile.in part by bootstrapping with languages=c,objc
 >(the objc tests the SUBDIRS clause) with solaris2 cmp and it passed
 >fastcompare.
 >
 >Ok for mainline?
Note there may be systems which might have cmp  with skip capabilities, but
which have system tools which embed timestamps into objects at unpredictable
locations. 

The 32bit HP SOM assembler for example has that behavior.  The timestamps are
in a well recognized record, but that record is not at a fixed location. 
You'd have to read the SOM header to get the file offset of the timestamp.
Worse yet, the timestamp could (in theory) come after data which varys
based on user input -- so skipping past the timestamp could skip past
useful comparison data.  So a simple skip isn't good on such systems.
Then again, we've always stated that that system is expected to fail its
comparison test when using the system assembler for all these reasons....


Jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]