[PATCH v2] newlib: riscv: Fix build and reorganize header files
Corinna Vinschen
vinschen@redhat.com
Wed Apr 2 08:47:52 GMT 2025
On Apr 1 22:00, Eric Salem wrote:
> The sys/asm.h header file is included for certain assembly files, so
> move the typedef to a separate header file due to the build breaking on
> some systems. Also include the port's string header file (and move and
> rename) instead of the system's version.
>
> Addresses: https://sourceware.org/pipermail/newlib/2025/021591.html
> Fixes: c3b9bb173c8c ("newlib: riscv: Add XLEN typedef and clean up types")
> Reported-by: Jeff Law <jlaw@ventanamicro.com>
> Suggested-by: Kito Cheng <kito.cheng@gmail.com>
> Signed-off-by: Eric Salem <ericsalem@gmail.com>
> ---
> Changes in v2:
> - Move header files and rename string.h to avoid confusion
> - Use "" for #include for header files in same directory
> - Link to v1: https://sourceware.org/pipermail/newlib/2025/021609.html
>
> .../machine/riscv/{sys/string.h => rv_string.h} | 8 ++++----
> newlib/libc/machine/riscv/stpcpy.c | 2 +-
> newlib/libc/machine/riscv/strcpy.c | 2 +-
> newlib/libc/machine/riscv/strlen.c | 2 +-
> newlib/libc/machine/riscv/sys/asm.h | 4 ----
> newlib/libc/machine/riscv/xlenint.h | 14 ++++++++++++++
> 6 files changed, 21 insertions(+), 11 deletions(-)
> rename newlib/libc/machine/riscv/{sys/string.h => rv_string.h} (97%)
> create mode 100644 newlib/libc/machine/riscv/xlenint.h
Pushed.
Thanks,
Corinna
More information about the Newlib
mailing list