From 7797f017a2c07d89a47ba2467ed0131b53fc1d4d Mon Sep 17 00:00:00 2001 From: Zbigniew Bodek Date: Thu, 31 Dec 2020 17:56:06 +0800 Subject: [PATCH 1/3] Disable LTO only for Qemu ARM build Keep flag enabled for HiSi cameras whereas LTO will be disabled for Qemu as a workaround. Signed-off-by: Zbigniew Bodek Change-Id: Iad7295d108dfea0928537281f87eb46836ee6681 --- tools/build/mk/los_config.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/build/mk/los_config.mk b/tools/build/mk/los_config.mk index 5839d3e5..2fc434d2 100644 --- a/tools/build/mk/los_config.mk +++ b/tools/build/mk/los_config.mk @@ -463,10 +463,14 @@ ifeq ($(LOSCFG_COMPILE_DEBUG), y) LITEOS_COPTS_OPTION = -g -gdwarf-2 else ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y) - # 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 + ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y) + # 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 = -Oz -flto + endif else LITEOS_COPTS_OPTMIZE = -O2 endif From 3cac7c61bb5cc91b8bb8496620cfc1145498002b Mon Sep 17 00:00:00 2001 From: Zbigniew Bodek Date: Thu, 31 Dec 2020 18:08:28 +0800 Subject: [PATCH 2/3] Apply post review fixes for style in shell Improve style of the ifdef in OsShellSourceInit(). Signed-off-by: Zbigniew Bodek Change-Id: I733423ce7e0d923702ea62f9e319a92525ebe161 --- shell/full/src/base/show.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/shell/full/src/base/show.c b/shell/full/src/base/show.c index e7eeae7e..13ea0874 100644 --- a/shell/full/src/base/show.c +++ b/shell/full/src/base/show.c @@ -100,16 +100,16 @@ STATIC UINT32 OsShellSourceInit(INT32 consoleId) ret = LOS_NOK; goto ERR_OUT4; } - if (consoleId == CONSOLE_TELNET #if !defined(LOSCFG_PLATFORM_ROOTFS) - /* - * In case of ROOTFS disabled but - * serial console enabled, it is required - * to create Shell task in kernel for it. - */ - || consoleId == CONSOLE_SERIAL + /* + * In case of ROOTFS disabled but + * serial console enabled, it is required + * to create Shell task in kernel for it. + */ + if (consoleId == CONSOLE_TELNET || consoleId == CONSOLE_SERIAL) { +#else + if (consoleId == CONSOLE_TELNET) { #endif - ) { ret = OsShellCreateTask(shellCB); if (ret != LOS_OK) { goto ERR_OUT4; From fab70c738d98a1231286bc0889790d9af43e169f Mon Sep 17 00:00:00 2001 From: Zbigniew Bodek Date: Thu, 31 Dec 2020 19:21:25 +0800 Subject: [PATCH 3/3] Remove redundant extern SystemInit Signed-off-by: Zbigniew Bodek Change-Id: I3c93fd703eb184d946f25a7f6be3c70124b469c1 --- kernel/common/los_config.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/common/los_config.c b/kernel/common/los_config.c index a9b78390..f851a7cd 100644 --- a/kernel/common/los_config.c +++ b/kernel/common/los_config.c @@ -130,7 +130,6 @@ extern "C" { #endif /* __cplusplus */ extern UINT32 OsSystemInit(VOID); -extern VOID SystemInit(VOID); VOID __attribute__((weak)) SystemInit(VOID) {