Workaround undefined __stack_chk_guard by disabling LTO

Disable LTO to avoid undefined __stack_chk_guard symbol
problem. "externally_visible" attribute could be a fix for
that but it is not known to our LLVM.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I39e0ccaee5897c696a7a9a235e433cf9113853ce
This commit is contained in:
Zbigniew Bodek 2020-10-08 20:52:11 +08:00 committed by Wojciech Zmuda WX948747
parent aff8a3e3c1
commit 669221b620
1 changed files with 4 additions and 1 deletions

View File

@ -463,7 +463,10 @@ ifeq ($(LOSCFG_COMPILE_DEBUG), y)
LITEOS_COPTS_OPTION = -g -gdwarf-2
else
ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y)
LITEOS_COPTS_OPTMIZE = -Oz -flto
# WORKAROUND: Disable LTO to avoid undefined __stack_chk_guard
# problem. "externally_visible" attribute could be
# a fix for that but it is not known to our LLVM.
LITEOS_COPTS_OPTMIZE = -Oz #-flto
else
LITEOS_COPTS_OPTMIZE = -O2
endif