libbuilin/compiler_rt: Organize make.defs and eliminate compilation warnings

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
wangmingrong1 2024-11-11 17:08:30 +08:00 committed by Xiang Xiao
parent e3917e2f09
commit 4232a717f2
2 changed files with 10 additions and 11 deletions

View file

@ -60,37 +60,37 @@ void __llvm_profile_register_names_function(void *NamesStart,
COMPILER_RT_VISIBILITY
const __llvm_profile_data *__llvm_profile_begin_data(void)
{
return &__start__llvm_prf_data;
return (const __llvm_profile_data *)__start__llvm_prf_data;
}
COMPILER_RT_VISIBILITY
const __llvm_profile_data *__llvm_profile_end_data(void)
{
return &__end__llvm_prf_data;
return (const __llvm_profile_data *)__end__llvm_prf_data;
}
COMPILER_RT_VISIBILITY
const char *__llvm_profile_begin_names(void)
{
return &__start__llvm_prf_names;
return (const char *)__start__llvm_prf_names;
}
COMPILER_RT_VISIBILITY
const char *__llvm_profile_end_names(void)
{
return &__end__llvm_prf_names;
return (const char *)__end__llvm_prf_names;
}
COMPILER_RT_VISIBILITY
char *__llvm_profile_begin_counters(void)
{
return &__start__llvm_prf_cnts;
return (char *)__start__llvm_prf_cnts;
}
COMPILER_RT_VISIBILITY
char *__llvm_profile_end_counters(void)
{
return &__end__llvm_prf_cnts;
return (char *)__end__llvm_prf_cnts;
}
COMPILER_RT_VISIBILITY

View file

@ -74,8 +74,8 @@ ifeq ($(CONFIG_BUILTIN_COMPILER_RT),y)
FLAGS += ${INCDIR_PREFIX}$(CURDIR)/compiler-rt/compiler-rt/lib/builtins
FLAGS += ${INCDIR_PREFIX}$(CURDIR)/compiler-rt/compiler-rt/lib/builtins/${ARCH}
FLAGS += -Wno-shift-count-negative -Wno-constant-conversion -Wshift-count-overflow
FLAGS += -Wno-undef -Wno-incompatible-pointer-types -Wno-visibility -Wno-macro-redefined
FLAGS += -Wno-undef -Wno-macro-redefined
CSRCS += $(wildcard compiler-rt/compiler-rt/lib/builtins/*.c)
ASRCS += $(wildcard compiler-rt/compiler-rt/lib/builtins/$(ARCH)/*.S)
@ -94,10 +94,9 @@ endif
ifeq ($(CONFIG_COVERAGE_COMPILER_RT),y)
FLAGS += ${INCDIR_PREFIX}$(CURDIR)/compiler-rt/compiler-rt/lib/profile
FLAGS += -Wno-cleardeprecated-pragma -Wno-deprecated-pragma -Wno-incompatible-pointer-types
FLAGS += -Wno-shadow -Wno-strict-prototypes -Wno-undef -Wno-unknown-warning-option
FLAGS += -Wno-undef -Wno-strict-prototypes -Wno-shadow
FLAGS += -DCOMPILER_RT_HAS_UNAME
FLAGS += -fno-profile-generate
CSRCS += $(wildcard compiler-rt/compiler-rt/lib/profile/*.c)
CPPSRCS += $(wildcard compiler-rt/compiler-rt/lib/profile/*.cpp)