Why is building with Make 3.8.1 different to Make 4.1?
<p>I am building an Embedded ARM project using <code>gcc</code> with C++:</p>

<pre><code>11:01:29 ○⨠ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is  NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</code></pre>

<p>and make:</p>

<pre><code>17:11:17 ○⨠ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
</code></pre>

<p>I was building a recent piece of code and it just <em>wasn't</em> working for me at all - the code built and deployed fine but the functionality just wasn't there. Tt made no sense as the code looked entirely fine. </p>

<p>A colleague reviewed it with me and we could find no problem with the code so for a laugh, we decided to get him to build and deploy it. </p>

<p>It worked fine!</p>

<p>So inspecting our versions, he was running <code>make 4.1</code>. I upgraded to this and hey presto, it worked fine. </p>

<pre><code>11:06:15 ○⨠ make --version
GNU Make 4.1
Built for x86_64-apple-darwin14.3.0
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
</code></pre>

<p>We played some more with  <code>3.81</code> and deduced that optimisation may have been the problem. </p>

<p>But both instances were passing <code>-Os</code> to <code>gcc</code>. </p>

<p>So, my question is this - why would <code>Make</code> have an influence on the compiler here?!</p>