Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5090

C/C++ • pico riscv compiler

$
0
0
Hi Folks,

Has anyone got a link to the incantations for building the above compiler?

I'm my own worst enemy. I shouldn't have tried. I expected to fail at the first hurdle whereupon I would have given up until I had the time .. but no, built binutils, built gcc but am stuck on newlib with implicit declarations of the kind..

Code:

riscv32-none-elf-gcc -B/home/foo/usr/src/pi/xgcc/T/obj-newlib-4.1.0/riscv32-none-elf/newlib/ -isystem /home/foo/usr/src/pi/xgcc/T/obj-newlib-4.1.0/riscv32-none-elf/newlib/targ-include -isystem /home/foo/usr/src/pi/xgcc/T/newlib-4.1.0/newlib/libc/include -B/home/foo/usr/src/pi/xgcc/T/obj-newlib-4.1.0/riscv32-none-elf/libgloss/riscv32 -L/home/foo/usr/src/pi/xgcc/T/obj-newlib-4.1.0/riscv32-none-elf/libgloss/libnosys -L/home/foo/usr/src/pi/xgcc/T/newlib-4.1.0/libgloss/riscv32    -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"4.1.0\" -DPACKAGE_STRING=\"newlib\ 4.1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I../../../../../newlib-4.1.0/newlib/libc/reent -fno-builtin -DHAVE_NANOSLEEP -D__NO_SYSCALLS__      -g -O2 -c -o lib_a-signalr.o `test -f 'signalr.c' || echo '../../../../../newlib-4.1.0/newlib/libc/reent/'`signalr.c../../../../../newlib-4.1.0/newlib/libc/reent/fcntlr.c: In function '_fcntl_r':../../../../../newlib-4.1.0/newlib/libc/reent/fcntlr.c:51:14: error: implicit declaration of function '_fcntl'; did you mean 'fcntl'? [-Wimplicit-function-declaration]   51 |   if ((ret = _fcntl (fd, cmd, arg)) == -1 && errno != 0)      |              ^~~~~~      |              fcntl
..ditto 'lseek,close' etc.

I know nothing about riscv and guessed at options for everything. Basically all I did was tweek my script which builds 'arm-none-eabi'. Now it's irritating me because I figure with the correct options there'd be a header for 'fcntl' and friends.

TIA

Statistics: Posted by swampdog — Wed Aug 14, 2024 7:38 pm



Viewing all articles
Browse latest Browse all 5090

Trending Articles