This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Object files know where they're built?!?
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Nathanael Nerode <neroden at twcny dot rr dot com>
- Cc: gcc at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Sat, 01 Mar 2003 19:10:33 +0000
- Subject: Re: Object files know where they're built?!?
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> 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.