Merge "partial-inlining: disable partial-inlining if gcc>=8.2.1" into 16

This commit is contained in:
Joshua C. Colp 2019-03-13 06:29:48 -05:00 committed by Gerrit Code Review
commit c8a1f8bfaa
1 changed files with 6 additions and 0 deletions

View File

@ -70,6 +70,12 @@ ifneq ($(findstring darwin,$(OSARCH)),)
endif
endif
# gcc version 8.2.1 and above must have partial-inlining disabled to avoid documented bug
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)
ifeq ($(GCC_VER_GTE821),1)
OPTIMIZE+=-fno-partial-inlining
endif
ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS))$(AST_CODE_COVERAGE),no)
_ASTCFLAGS+=$(OPTIMIZE)
else