<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 8, 2019 at 10:17 PM Ryan Schmidt <<a href="mailto:ryandesign@macports.org">ryandesign@macports.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Nov 8, 2019, at 20:03, Joshua Root wrote:<br>
<br>
> On 2019-11-9 10:28 , Jack Howarth wrote:<br>
>> I just noticed a really bizarre aspect to this Xcode 11 bug. If you<br>
>> build gmp manually from source with the default compiler flags in use...<br>
>> <br>
>> ./configure<br>
>> make<br>
>> make check<br>
>> <br>
>> the t-powm test case fails. However if you add -fstack-check<br>
>> explicitly on CFLAGS and CXXFLAGS, the t-powm test case failure is<br>
>> suppressed.<br>
>> <br>
>> ./configure CFLAGS='-O2 -fcheck-stack' CXXFLAGS='-O2 -fcheck-stack'<br>
>> make<br>
>> make check<br>
> <br>
> Are the default compiler flags '-O2'?<br>
<br>
MacPorts default optimization flag is -Os.<br>
<br></blockquote><div><br></div><div>Same behavior...</div><div><br></div>./configure CFLAGS='-Os -fstack-check' CXXFLAGS='-Os -fstack-check'<div><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px"></span>make</div><div>make check</div><div><br></div><div>suppresses the failure</div><div><br></div>PASS: t-powm</div><div class="gmail_quote"><br></div><div class="gmail_quote">with Xcode 11.2 in a manual build. Wonder how many of the remaining packages that are requiring -fno-check-stack could actually be 'fixed' by explicitly passing -fcheck-stack instead. Obviously that option disabled some of the problematic stack checking code that Apple's clang is automatically generating in the absence of the flag.<br><div> </div></div></div></div></div>