test/riscv: disable linker relaxation, specify ISA string and ABI
Although linker relaxation is disabled, the compiler still emits small data sections which must be explicitly included in the linker script.
This commit is contained in:
parent
d7d4aea753
commit
02356f690f
@ -47,6 +47,11 @@ override INTERNALCFLAGS := \
|
|||||||
-I. \
|
-I. \
|
||||||
-I..
|
-I..
|
||||||
|
|
||||||
|
ifneq ($(findstring riscv,$(CC_FOR_TARGET)),)
|
||||||
|
override INTERNALCFLAGS += -march=rv64imac -mabi=lp64 -mno-relax
|
||||||
|
override INTERNALLDFLAGS += --no-relax
|
||||||
|
endif
|
||||||
|
|
||||||
override INTERNALCFLAGS_MB := \
|
override INTERNALCFLAGS_MB := \
|
||||||
-std=c11 \
|
-std=c11 \
|
||||||
-ffreestanding \
|
-ffreestanding \
|
||||||
|
@ -32,6 +32,7 @@ SECTIONS
|
|||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
*(.data .data.*)
|
*(.data .data.*)
|
||||||
|
*(.sdata .sdata.*)
|
||||||
} :data
|
} :data
|
||||||
|
|
||||||
.dynamic : {
|
.dynamic : {
|
||||||
@ -39,6 +40,7 @@ SECTIONS
|
|||||||
} :data :dynamic
|
} :data :dynamic
|
||||||
|
|
||||||
.bss : {
|
.bss : {
|
||||||
|
*(.sbss .sbss.*)
|
||||||
*(.bss .bss.*)
|
*(.bss .bss.*)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
} :data
|
} :data
|
||||||
|
Loading…
Reference in New Issue
Block a user