diff --git a/kernel/base/BUILD.gn b/kernel/base/BUILD.gn index 936816d05fc16311fd62f825fe59441ffe176de0..bf8e2381366d404308e65dbac916eb3af272f30a 100644 --- a/kernel/base/BUILD.gn +++ b/kernel/base/BUILD.gn @@ -90,8 +90,13 @@ kernel_module(module_name) { } public_configs = [ ":public" ] + configs += [ ":private" ] } config("public") { include_dirs = [ "include" ] } + +config("private") { + cflags = [ "-Wno-frame-address" ] +} diff --git a/kernel/base/Makefile b/kernel/base/Makefile index bd874b97d55cec4f1c1c3d32b7776507dc49ade4..4753dda36ccda84c9de516e2e2ded7cb3a54443c 100644 --- a/kernel/base/Makefile +++ b/kernel/base/Makefile @@ -40,6 +40,6 @@ LOCAL_SRCS := $(wildcard ipc/*.c) $(wildcard core/*.c) $(wildcard mem/membox/*. $(wildcard sched/*.c) \ $(wildcard vm/*.c) -LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) +LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) -Wno-frame-address include $(MODULE) diff --git a/kernel/base/mp/los_lockdep.c b/kernel/base/mp/los_lockdep.c index 65e5f2f88ebc204b0ffd2a22e8c0517ea495b6a0..fbbbadfcbc704b7a9915c1baeda8304a749c8233 100644 --- a/kernel/base/mp/los_lockdep.c +++ b/kernel/base/mp/los_lockdep.c @@ -190,11 +190,7 @@ VOID OsLockDepCheckIn(SPIN_LOCK_S *lock) { UINT32 intSave; enum LockDepErrType checkResult = LOCKDEP_SUCCESS; -#ifdef LOSCFG_COMPILER_CLANG_LLVM VOID *requestAddr = (VOID *)__builtin_return_address(1); -#else - VOID *requestAddr = (VOID *)__builtin_return_address(0); -#endif LosTaskCB *current = OsCurrTaskGet(); LockDep *lockDep = ¤t->lockDep; LosTaskCB *lockOwner = NULL; @@ -276,11 +272,7 @@ VOID OsLockDepCheckOut(SPIN_LOCK_S *lock) UINT32 intSave; INT32 depth; enum LockDepErrType checkResult = LOCKDEP_SUCCESS; -#ifdef LOSCFG_COMPILER_CLANG_LLVM VOID *requestAddr = (VOID *)__builtin_return_address(1); -#else - VOID *requestAddr = (VOID *)__builtin_return_address(0); -#endif LosTaskCB *current = OsCurrTaskGet(); LosTaskCB *owner = NULL; LockDep *lockDep = NULL; diff --git a/lib/libc/musl/BUILD.gn b/lib/libc/musl/BUILD.gn index 2b5bbbe0fb0f73803fa70945904463d186ec2c00..df8b3507088a5bf6fce7fc575c46cd154ac43829 100644 --- a/lib/libc/musl/BUILD.gn +++ b/lib/libc/musl/BUILD.gn @@ -103,13 +103,13 @@ config("private") { if (defined(LOSCFG_COMPILER_CLANG_LLVM)) { cflags = [ "-Wno-char-subscripts", - "-Wno-unknown-pragmas", + "-Wno-ignored-pragmas", + "-Wno-strict-prototypes", ] } else { cflags = [ "-frounding-math", "-Wno-unused-but-set-variable", - "-Wno-unknown-pragmas", ] } @@ -117,5 +117,6 @@ config("private") { "-Wno-shift-op-parentheses", "-Wno-logical-op-parentheses", "-Wno-bitwise-op-parentheses", + "-Wno-unknown-pragmas", ] } diff --git a/lib/libc/musl/Makefile b/lib/libc/musl/Makefile index 1de4959fd52c047deb7c7ee85ae0b1f900d12cd0..262997ab39ca83c91ce0194cb252fdc3a80593b7 100644 --- a/lib/libc/musl/Makefile +++ b/lib/libc/musl/Makefile @@ -59,10 +59,10 @@ LOCAL_INCLUDE += $(addprefix -I$(MUSLPORTINGDIR)/, src/include src/internal) LOCAL_FLAGS := $(LOCAL_INCLUDE) $(LOCAL_CMACRO) ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y) -LOCAL_FLAGS +=-Wno-char-subscripts -Wno-unknown-pragmas +LOCAL_FLAGS +=-Wno-char-subscripts -Wno-ignored-pragmas -Wno-strict-prototypes else -LOCAL_FLAGS += -frounding-math -Wno-unused-but-set-variable -Wno-unknown-pragmas +LOCAL_FLAGS += -frounding-math -Wno-unused-but-set-variable endif -LOCAL_FLAGS += -Wno-shift-op-parentheses -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses +LOCAL_FLAGS += -Wno-shift-op-parentheses -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses -Wno-unknown-pragmas include $(MODULE)