[Asterisk-code-review] no-partial-inlining: disable partial-inlining if gcc>=8.2 (...asterisk[16])
Christian Savinovich
asteriskteam at digium.com
Thu Mar 7 13:57:12 CST 2019
Christian Savinovich has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11106
Change subject: no-partial-inlining: disable partial-inlining if gcc>=8.2
......................................................................
no-partial-inlining: disable partial-inlining if gcc>=8.2
Apply flag -fno-partial-inlining on default optimization if and only if
gcc version >= 8.2 (Will occur if latest Fedora or Ubuntu). This is done to
avoid documented bug that causes arithmetic calculations to fail if the
following conditions are met:
1. TEST_FRAMEWORK on
2. DONT_OPTIMIZE off
3. Fedora and Ubuntu
4. GCC 8.2.1
5. There must exist a certain combination of multithreading.
6. Optimization level -O2 and -O3
7. Flag -fpartial-inline activated (default optimization level>=2)
Change-Id: Ibd1afe60e0a38b88e85fdcd9b051004601c2f102
---
M Makefile.rules
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/06/11106/1
diff --git a/Makefile.rules b/Makefile.rules
index b979927..d8fddba 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -70,6 +70,12 @@
endif
endif
+# gcc version 8.20 and above must have partial-inlining disabled to avoid documented bug
+GCC_VER_GTE82:=$(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/'` \>= 80200)
+ifeq ($(GCC_VER_GTE82),1)
+ OPTIMIZE+=-fno-partial-inlining
+endif
+
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_CODE_COVERAGE),no)
_ASTCFLAGS+=$(OPTIMIZE)
else
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11106
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ibd1afe60e0a38b88e85fdcd9b051004601c2f102
Gerrit-Change-Number: 11106
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Savinovich <csavinovich at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190307/674eeb36/attachment.html>
More information about the asterisk-code-review
mailing list