Topic: Building for embedded RISC-V platform
Hello,
I am attempting to build wolfSSL and the associated tests for a platform running a minimalistic kernel (implements some system calls and sets up virtual memory) with a RISC-V arch and newlib toolchain. The library needs to be compiled statically. I am cross-compiling this on an x86 machine.
I'm encountering some build errors for the wolfcrypt/test/testwolfcrypt binary:
tls13.c:(.text+0x2f96): undefined reference to `__errno_location'
integer.c:(.text+0x3912): undefined reference to `__ctype_toupper_loc'
.... and these same errors but for other files as well.
Here's the configuration options used:
./configure --enable-static CFLAGS="-I$RISCV/sysroot/usr/include -I$RISCV/riscv64-unknown-elf/include -DWOLFSSL_USER_IO -Os" CPPFLAGS="-I./" --host=riscv64 CC=riscv64-unknown-elf-gcc AR=riscv64-unknown-elf-ar RANLIB=riscv64-unknown-elf-ranlib LD=riscv64-unknown-elf-gcc --prefix=$HOME/tools/wolfssl LDFLAGS="-L$RISCV/riscv64-unknown-elf/lib -lc -lgloss -lstdc++" --enable-filesystem=no --enable-singlethreaded --enable-oldtls=no --enable-tlsv12=no --enable-asyncthreads=no --enable-asm=no
Are these errors related to libc? I'm configuring with newlib's c library, and not sure what the problem might be.
Is there an additional configuration option needed, or is there somehow a library inconsistency problem?
Thanks.