arch: Add gcov related config for arm/risc-v/xtensa
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
eba185b04b
commit
e84e5f0e1d
@ -75,6 +75,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MM_KASAN),y)
|
||||
ARCHCPUFLAGS += -fsanitize=kernel-address
|
||||
endif
|
||||
@ -161,3 +165,7 @@ endif
|
||||
ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||
endif
|
||||
|
@ -79,6 +79,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
# Parametrization for ARCHCPUFLAGS
|
||||
|
||||
TOOLCHAIN_MTUNE := -mcpu=cortex-m0 -mthumb
|
||||
@ -202,3 +206,7 @@ endif
|
||||
ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||
endif
|
||||
|
@ -120,6 +120,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ENDIAN_BIG),y)
|
||||
TARGET_ARCH := armeb
|
||||
else
|
||||
@ -208,3 +212,7 @@ endif
|
||||
ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||
endif
|
||||
|
@ -81,6 +81,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARMV7M_STACKCHECK),y)
|
||||
ARCHOPTIMIZATION += -finstrument-functions -ffixed-r10
|
||||
endif
|
||||
@ -274,3 +278,7 @@ endif
|
||||
ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||
endif
|
||||
|
@ -69,6 +69,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_CORTEXR4),y)
|
||||
ARCHCPUFLAGS += -mcpu=cortex-r4
|
||||
else ifeq ($(CONFIG_ARCH_CORTEXR5),y)
|
||||
@ -184,3 +188,7 @@ endif
|
||||
ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||
endif
|
||||
|
@ -81,6 +81,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARMV8M_STACKCHECK),y)
|
||||
ARCHOPTIMIZATION += -finstrument-functions -ffixed-r10
|
||||
endif
|
||||
@ -283,3 +287,7 @@ endif
|
||||
ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||
endif
|
||||
|
@ -63,6 +63,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
ARCHCFLAGS += -fno-common
|
||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
||||
|
||||
@ -189,3 +193,7 @@ endif
|
||||
ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||
endif
|
||||
|
@ -67,6 +67,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
ARCHCFLAGS += -fno-common
|
||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
||||
|
||||
@ -129,3 +133,7 @@ endif
|
||||
ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||
endif
|
||||
|
@ -67,6 +67,10 @@ ifeq ($(CONFIG_STACK_CANARIES),y)
|
||||
ARCHOPTIMIZATION += -fstack-protector-all
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
ARCHOPTIMIZATION += -fprofile-generate -ftest-coverage
|
||||
endif
|
||||
|
||||
ARCHCFLAGS += -fno-common
|
||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
||||
|
||||
@ -129,3 +133,7 @@ endif
|
||||
ifeq ($(CONFIG_LIBSUPCXX),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user