<div dir="ltr"><div dir="ltr">FYI, the gmp test suite failure in the t-powm test case when using core2 optimization with the default stack checking has been solved in the release Xcode 11.3. So the current -fno-stack-checking workaround in the MacPorts gmp package can be dropped in favor of just blacklisting Xcode 11.0 through 11.2.</div><div> Jack</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 9, 2019 at 10:57 AM Marcus Calhoun-Lopez <<a href="mailto:marcuscalhounlopez@gmail.com">marcuscalhounlopez@gmail.com</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">This is an interesting idea, but there may be other factors at play.<br>
<br>
GMP has definite ideas about which compiler flags to use.<br>
When CFLAGS is set, GMP completely ignores its own and assumes the user just wants what is in CFLAGS.<br>
<br>
Without CFLAGS, GMP uses, for example, -O2 -pedantic -fomit-frame-pointer -m64 -mtune=core2 -march=core2.<br>
When CFLAGS is set, none of these flags are used.<br>
<br>
Following your lead, I was able to pass all of the tests just by setting CFLAGS (*without* -fcheck-stack).<br>
<br>
-Marcus<br>
<br>
> On Nov 9, 2019, at 8:19 AM, Jack Howarth <<a href="mailto:howarth.at.macports@gmail.com" target="_blank">howarth.at.macports@gmail.com</a>> wrote:<br>
> <br>
> <br>
> <br>
> On Fri, Nov 8, 2019 at 10:17 PM Ryan Schmidt <<a href="mailto:ryandesign@macports.org" target="_blank">ryandesign@macports.org</a>> wrote:<br>
> 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>
> <br>
> Same behavior...<br>
> <br>
> ./configure CFLAGS='-Os -fstack-check' CXXFLAGS='-Os -fstack-check'<br>
> make<br>
> make check<br>
> <br>
> suppresses the failure<br>
> <br>
> PASS: t-powm<br>
> <br>
> 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>
> <br>
<br>
</blockquote></div>