[PATCH 6/6] newlib: introduce HAVE_HW_UNALIGNED_ACCESS option

Christian Herber (OSS) christian.herber@oss.nxp.com
Mon Jan 27 11:36:56 GMT 2025


Clang has also adopted this: https://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20240610/587759.html

I would suggest to work out a solution that works for older and newer versions of compilers.

IMHO, for older versions, this macro could be simply defined with -D.

________________________________
From: Alexey Lapshin <alexey.lapshin@espressif.com>
Sent: Monday, January 27, 2025 12:27:56 PM
To: newlib@sourceware.org <newlib@sourceware.org>; Christian Herber (OSS) <christian.herber@oss.nxp.com>
Cc: Alexey Gerenkov <alexey.gerenkov@espressif.com>; Ivan Grokhotkov <ivan@espressif.com>
Subject: Re: [PATCH 6/6] newlib: introduce HAVE_HW_UNALIGNED_ACCESS option

Thanks for highlighting that! But unfortunately this was added too recently in GCC (14.1.0).
Moving to approach with __riscv_misaligned_fast will not work for older GCC.
Also, I'm not sure if this will be applicable to other compilers as well

https://github.com/gcc-mirror/gcc/commit/6e23440b5df4011bbe1dbee74d47641125dd7d16


On Mon, 2025-01-27 at 10:58 +0000, Christian Herber (OSS) wrote:
> Shouldn't this be controlled by __riscv_misaligned_fast according to https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc#preprocessor-definitions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/newlib/attachments/20250127/5bf839bb/attachment.htm>


More information about the Newlib mailing list