🧪[sw] test additional GCC optimization flags

This commit is contained in:
stnolting 2023-07-29 11:23:13 +02:00
parent 609f00d727
commit e8e59b5202
2 changed files with 3 additions and 1 deletions

View file

@ -265,6 +265,8 @@ The following default compiler flags are used for compiling an application. Thes
| `-lgcc` | Make sure we have no unresolved references to internal GCC library subroutines.
| `-mno-fdiv` | Use built-in software functions for floating-point divisions and square roots (since the according instructions are not supported yet).
| `-g` | Include debugging information/symbols in ELF.
| `-mstrict-align` | Unaligned memory accesses cannot be resolved by the hardware and require emulation.
| `-mbranch-cost=...` | Branches cost a lot cycles on a multi-cycle architecture.
|=======================
:sectnums:

View file

@ -130,7 +130,7 @@ IMAGE_GEN = $(NEORV32_EXG_PATH)/image_gen
# Compiler & linker flags
CC_OPTS = -march=$(MARCH) -mabi=$(MABI) $(EFFORT) -Wall -ffunction-sections -fdata-sections -nostartfiles -mno-fdiv
CC_OPTS += -g -Wl,--gc-sections
CC_OPTS += -mstrict-align -mbranch-cost=10 -g -Wl,--gc-sections
CC_OPTS += $(USER_FLAGS)
LD_LIBS = -lm -lc -lgcc
LD_LIBS += $(USER_LIBS)