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) { 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; 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