Add -fno-tree-loop-distribute-patterns to avoid spurious memset

This commit is contained in:
Francesco Conti 2025-01-31 21:16:05 +01:00
parent 7308922ffa
commit ace4469fc4

View file

@ -34,7 +34,12 @@ PULP_ARCH_LDFLAGS ?= -march=rv32imcxgap9
PULP_ARCH_OBJDFLAGS ?= -Mmarch=rv32imcxgap9
endif
# without -fno-tree-loop-distribute-patterns, gcc would insert memset & co where it shouldn't! only avoid this option in CV32E40X+LLVM
ifdef USE_CV32E40X
PULP_CFLAGS += -fdata-sections -ffunction-sections -include chips/pulpissimo/config.h -I$(PULPRT_HOME)/include/chips/pulpissimo
else
PULP_CFLAGS += -fno-tree-loop-distribute-patterns -fdata-sections -ffunction-sections -include chips/pulpissimo/config.h -I$(PULPRT_HOME)/include/chips/pulpissimo
endif
PULP_OMP_CFLAGS += -fopenmp -mnativeomp
PULP_CC ?= riscv32-unknown-elf-gcc