Message ID | 20240911091406.134240-8-andrew.jones@linux.dev (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Support cross compiling with clang | expand |
diff --git a/riscv/Makefile b/riscv/Makefile index 179a373dbacf..22fd273acac3 100644 --- a/riscv/Makefile +++ b/riscv/Makefile @@ -76,7 +76,9 @@ LDFLAGS += -melf32lriscv endif CFLAGS += -DCONFIG_RELOC CFLAGS += -mcmodel=medany -CFLAGS += -mstrict-align +# Unaligned accesses are allowed, but may be emulated by M-mode. +# Enable -mstrict-align if that's troublesome (only supported by gcc). +#CFLAGS += -mstrict-align CFLAGS += -std=gnu99 CFLAGS += -ffreestanding CFLAGS += -O2