Skip to content

Commit

Permalink
core: riscv: apply "-march" and "-mabi" options to assembler
Browse files Browse the repository at this point in the history
Update platform-aflags-generic to include the -march option. Without
specifying -march, the assembler will enable the C extension by default
and generate compressed instructions, even if CFG_RISCV_ISA_C=n.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
lyctw authored and jforissier committed Aug 19, 2024
1 parent 883402f commit 7c76fdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/arch/riscv/riscv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ rv64-platform-cppflags += -DRV64=1 -D__LP64__=1
rv32-platform-cppflags += -DRV32=1 -D__ILP32__=1

platform-cflags-generic ?= -ffunction-sections -fdata-sections -pipe
platform-aflags-generic ?= -pipe
platform-aflags-generic ?= -pipe -march=$(riscv-isa) -mabi=$(riscv-abi)

rv64-platform-cflags-generic := -mstrict-align $(call cc-option,)

Expand Down

0 comments on commit 7c76fdc

Please sign in to comment.