diff mbox series

[kvm-unit-tests,v2,1/4] riscv: Drop mstrict-align

Message ID 20240904105020.1179006-7-andrew.jones@linux.dev (mailing list archive)
State New
Headers show
Series Support cross compiling with clang | expand

Commit Message

Andrew Jones Sept. 4, 2024, 10:50 a.m. UTC
The spec says unaligned accesses are supported, so this isn't required
and clang doesn't support it. A platform might have slow unaligned
accesses, but kvm-unit-tests isn't about speed anyway.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
 riscv/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicholas Piggin Sept. 11, 2024, 12:08 a.m. UTC | #1
On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote:
> The spec says unaligned accesses are supported, so this isn't required
> and clang doesn't support it. A platform might have slow unaligned
> accesses, but kvm-unit-tests isn't about speed anyway.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
> ---
>  riscv/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/riscv/Makefile b/riscv/Makefile
> index 179a373dbacf..2ee7c5bb5ad8 100644
> --- a/riscv/Makefile
> +++ b/riscv/Makefile
> @@ -76,7 +76,7 @@ LDFLAGS += -melf32lriscv
>  endif
>  CFLAGS += -DCONFIG_RELOC
>  CFLAGS += -mcmodel=medany
> -CFLAGS += -mstrict-align
> +#CFLAGS += -mstrict-align

Just remove the line?

Or put a comment there instead to explain.

Thanks,
Nick
Andrew Jones Sept. 11, 2024, 8:19 a.m. UTC | #2
On Wed, Sep 11, 2024 at 10:08:23AM GMT, Nicholas Piggin wrote:
> On Wed Sep 4, 2024 at 8:50 PM AEST, Andrew Jones wrote:
> > The spec says unaligned accesses are supported, so this isn't required
> > and clang doesn't support it. A platform might have slow unaligned
> > accesses, but kvm-unit-tests isn't about speed anyway.
> >
> > Reviewed-by: Thomas Huth <thuth@redhat.com>
> > Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
> > ---
> >  riscv/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/riscv/Makefile b/riscv/Makefile
> > index 179a373dbacf..2ee7c5bb5ad8 100644
> > --- a/riscv/Makefile
> > +++ b/riscv/Makefile
> > @@ -76,7 +76,7 @@ LDFLAGS += -melf32lriscv
> >  endif
> >  CFLAGS += -DCONFIG_RELOC
> >  CFLAGS += -mcmodel=medany
> > -CFLAGS += -mstrict-align
> > +#CFLAGS += -mstrict-align
> 
> Just remove the line?
> 
> Or put a comment there instead to explain.

I'll add a comment.

Thanks,
drew
diff mbox series

Patch

diff --git a/riscv/Makefile b/riscv/Makefile
index 179a373dbacf..2ee7c5bb5ad8 100644
--- a/riscv/Makefile
+++ b/riscv/Makefile
@@ -76,7 +76,7 @@  LDFLAGS += -melf32lriscv
 endif
 CFLAGS += -DCONFIG_RELOC
 CFLAGS += -mcmodel=medany
-CFLAGS += -mstrict-align
+#CFLAGS += -mstrict-align
 CFLAGS += -std=gnu99
 CFLAGS += -ffreestanding
 CFLAGS += -O2