From 669221b620c030b0add1ca8a5abe16c5cca3df8e Mon Sep 17 00:00:00 2001 From: Zbigniew Bodek Date: Thu, 8 Oct 2020 20:52:11 +0800 Subject: [PATCH] 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 Change-Id: I39e0ccaee5897c696a7a9a235e433cf9113853ce --- tools/build/mk/los_config.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/build/mk/los_config.mk b/tools/build/mk/los_config.mk index 3d132f8b..a735842b 100644 --- a/tools/build/mk/los_config.mk +++ b/tools/build/mk/los_config.mk @@ -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 -- GitLab