Should the IDE compile commands produce same object file if executed from shell?

I posted a question about this in the galileo forum

https://communities.intel.com/message/222225#222225

but want to confirm what I think is the expected behaviour for all arduino type platforms.

If the compile output is copied from the IDE output window and then pasted into a command shell window and executed, would you expect the object file that is produced to be identical every time ?

There is a high probability that a timestamp is included inside the file.

How different are the two files?

Good point, I would say the file has more differences than 1 timestamp though, it starts off OK then gets very different. The files are attached to the galileo forum if you want to examine them in a hex viewer. They were produced on a Windows NT machine.

https://communities.intel.com/servlet/JiveServlet/download/222225-75841/Stream_original.cpp.o.zip
https://communities.intel.com/servlet/JiveServlet/download/222225-75840/Stream_via_command_prompt.cpp.o.zip

I think I figured it.. the Galileo compiles with "-g" option which I guess produces debug information held within the object file.

Since I was asking the compiler to output to "stream_my_new_name.cpp.o" (instead of "stream.cpp.o" ) this was reflected in the output - but you can't tell because the output file is unreadable in a text editor.

I confirmed this by re-doing my test but in a different sequence..

  1. Execute a build in Arduino
  2. Find the object file you want - e.g. stream.cpp.o
  3. Rename it so it won't be overwritten
  4. Execute the the Arduino command line from a shell window using the exact command i.e. don't change any file names at this point
  5. Compare the files, they should be same.

Thanks Coding Badly for giving me the hint about timestamps, that got me thinking about the debug info

Mike.