<p>Friendly Automation <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11240">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Christian Savinovich: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Friendly Automation: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">core/buildsystem: check the actual compiler being version<br><br>Make compiler check use the output of the actual compiler being<br>used as reported by the CC variable, instead of unconditionally<br>running the "gcc" binary.  Also only run the check if the compiler<br>is gcc or a cross-compile gcc.<br><br>ASTERISK-28374<br><br>Change-Id: Icaacf6d93686ad21076878aa1504a23b4fc9d0f4<br>---<br>M Makefile.rules<br>1 file changed, 7 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Makefile.rules b/Makefile.rules</span><br><span>index c148af4..24ecf7f 100644</span><br><span>--- a/Makefile.rules</span><br><span>+++ b/Makefile.rules</span><br><span>@@ -70,11 +70,16 @@</span><br><span>   endif</span><br><span> endif</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-# gcc version 8.2.1 and above must have partial-inlining disabled to avoid documented bug</span><br><span style="color: hsl(0, 100%, 40%);">-GCC_VER_GTE821:=$(shell expr `gcc --version | grep ^gcc | cut -d ' ' -f 3 | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 80201)</span><br><span style="color: hsl(120, 100%, 40%);">+# gcc version 8.2.1 and above must have partial-inlining disabled to avoid documented bug.</span><br><span style="color: hsl(120, 100%, 40%);">+# We must handle cross-compiling and clang so make sure the compiler version string has "gcc"</span><br><span style="color: hsl(120, 100%, 40%);">+# somewhere in it before testing the version.</span><br><span style="color: hsl(120, 100%, 40%);">+CC_VERS_STRING=$(shell $(CC) --version | grep -i gcc)</span><br><span style="color: hsl(120, 100%, 40%);">+ifneq ($(CC_VERS_STRING),)</span><br><span style="color: hsl(120, 100%, 40%);">+GCC_VER_GTE821:=$(shell expr `echo '$(CC_VERS_STRING)' | cut -d ' ' -f 3 | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 80201)</span><br><span> ifeq ($(GCC_VER_GTE821),1)</span><br><span>     OPTIMIZE+=-fno-partial-inlining</span><br><span> endif</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span> </span><br><span> ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_CODE_COVERAGE),no)</span><br><span>     _ASTCFLAGS+=$(OPTIMIZE)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11240">change 11240</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11240"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Icaacf6d93686ad21076878aa1504a23b4fc9d0f4 </div>
<div style="display:none"> Gerrit-Change-Number: 11240 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Guido Falsi <madpilot@freebsd.org> </div>
<div style="display:none"> Gerrit-Reviewer: Christian Savinovich <csavinovich@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>