<p>Joshua C. Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11108">View Change</a></p><div style="white-space:pre-wrap">Approvals:
mattf: Looks good to me, but someone else must approve
Corey Farrell: Looks good to me, but someone else must approve
Joshua C. Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">partial-inlining: disable partial-inlining if gcc>=8.2.1<br><br>Apply flag -fno-partial-inlining on default optimization if and only if<br>gcc version >= 8.2.1 (this is the current ver on Fedora and Ubuntu).<br>This is done to avoid a bug that causes arithmetic calculations to fail<br>if the following conditions are met:<br>1. TEST_FRAMEWORK on<br>2. DONT_OPTIMIZE off<br>3. Fedora and Ubuntu<br>4. GCC 8.2.1<br>5. There must exist a certain combination of multithreading.<br>6. Optimization level -O2 and -O3<br>7. Flag -fpartial-inline activated (default when optimization level>=2)<br>The following link points to a similar gcc bug reported in 2015. This leads me<br>to believe the bug has regressed. Note I am not able to replicate this bug<br>in an environment other than Asterisk + Test Framework + Test_cel because the<br>multithreading combination that causes it seems to be unique. Therefore I<br>am temporarily abandoning any thoughts of reporting the new occurrence of this<br>bug to gcc.gnu.org. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65307<br><br>Change-Id: Ibd1afe60e0a38b88e85fdcd9b051004601c2f102<br>---<br>M Makefile.rules<br>1 file changed, 6 insertions(+), 0 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 b979927..c148af4 100644</span><br><span>--- a/Makefile.rules</span><br><span>+++ b/Makefile.rules</span><br><span>@@ -70,6 +70,12 @@</span><br><span> endif</span><br><span> endif</span><br><span> </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%);">+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%);">+ifeq ($(GCC_VER_GTE821),1)</span><br><span style="color: hsl(120, 100%, 40%);">+ OPTIMIZE+=-fno-partial-inlining</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_CODE_COVERAGE),no)</span><br><span> _ASTCFLAGS+=$(OPTIMIZE)</span><br><span> else</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11108">change 11108</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/+/11108"/><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: Ibd1afe60e0a38b88e85fdcd9b051004601c2f102 </div>
<div style="display:none"> Gerrit-Change-Number: 11108 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Christian Savinovich <csavinovich@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: mattf <creslin@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>