This is the mail archive of the gcc@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: Object files know where they're built?!?


> Joseph Myers said:
> >dependencies, between all stages, to one invocation of make, but this
> >can't work because each stage needs to be built separately, with the 
> >files
> >in the same location (not in the stage subdirectory), for the compare
> >stage to succeed.
> 
> I ran into this when I tried to use a different scheme for building 
> stage1.  I wanted to compare the files produced by my new scheme with 
> the files produced by the original.  My new scheme built stage1 in a 
> different directory (stage1-gcc).  Every object file differed at byte 33 
> or 34.
> 
> I couldn't figure out why.
> 
> Do the object files (on i686-pc-linux-gnu) somehow encode their build 
> location?  This would be stupid, obviously, but if it's true it's true. 
> :-)  Is there a way to compare the object files without regard to 
> spurious differences like this?

Not necessarily, but they do include the location of source and include 
files (so that debuggers can find things) -- and most files will include 
config.h, insn-flags.h, etc which are put in the build directory.

R.


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