Windows tools produce differant binary files

Chris Johns chrisj at rtems.org
Mon Sep 4 14:15:17 UTC 2006


Mick Davis wrote:
> 
> We're using the msys environment on windows to build for our coldfire 
> target.  I'm finalising the upgrade to 4.6.99-3, which has produced a 
> small improvement in our target's idle time.
> 

Nice.

> I've got a problem using the rtems4.7-m68k-20060707-1.exe tools, which I 
> also reproduced using the same tools, but built myself, under msys.

There is a newer release. Please check the Wiki page. It should be the 
same compiler but it would be nice if you could try it.

> The problem is that the binary I'm producing isn't always the same, 
> depending on the PC I use to build it.  3 older PCs using windows 2000 
> produce one .srec, and 2 newer PCs running windows XP produce another.

Is it the same repeatable difference on each machine ?

> As well as just being suspicious, this is a problem for our quality 
> system, since we support a number of engineers.

It should be the same on each machine.

> I was speculating that 
> the level of optimisation may depend on the capabilities of the build 
> machine?

We have a cross compiler so I would be surprised if this is the problem.

Until I can see the code and difference it would be hard to isolate.

If you wish we can take this off line to resolve.

> 
> I use a -DNDEBUG=1 compilation flag to keep build system file names out 
> of the output.  I've checked this by running the output .elf through the 
> 'strings' program, and I don't see any file names.
>

This could still be a problem but you mention a different register used 
which rules this out.

> I've been through the gcc manual, and none of the environment variables 
> it mentions exist.  I've been adjusting the variables which are 
> different between PCs, but none have an effect.

I do not understand what you mean here.

> Looking at the differences in the binaries themselves, the differences 
> appear to be in the code, but harmless. For example, the register d0 is 
> used instead of d1.  Either binary appears to run without a problem.

This is interesting. I would not expect to see this if everything is the 
same.

> 
> Can anyone point me to something in the build process which might 
> produce these differences? Do the automake files put build information 
> into the executable somewhere?

Could you please run the build with -save-temps on each machine and diff 
the files ? If they are same then we have the same environment set up. 
We can then look at the compiler for what is happening.

Regards
Chris



More information about the users mailing list