I'm working on an Arduino project which was being developed on a Windows machine with the Arduino Builder. After having a release candidate, I started developing a Linux docker container that would automatically compile this project once it was pushed to my git remote. However, I noticed that the compiled binary from the Linux container is different from that of the Windows machine, in-spite of the same Arduino version and compilation flags. Is this supposed to happen? Shouldn't AVR-GCC make an equal cross-compilation result?
Thanks in advance.
Ok, so after having dug deeper into this issue and confirmed that the toolchains had the same versions (despite the different host OSs), I found out that on Linux I was not giving the linker the -flto
flag for enabling the link-time optimizer, while doing it on Windows.
So all in all, there was indeed a configuration error on my part, and the code now runs smoothly when compiled on both host OSs.