Compiling the RISC-V GNU Compiler Toolchain on OS X
#1
Hello everyone,

i want the RISC-V GNU Compiler Toolchain to work on OS X. Here are my steps so far and what goes wrong.


Code:
brew install gawk gnu-sed gmp mpfr libmpc isl zlib



Code:
git clone --recursive https://github.com/pulp-platform/pulp-riscv-gnu-toolchain


Code:
./configure --prefix=/opt/riscv --with-arch=rv32imfdc --with-cmodel=medlow --enable-multilib make

Then i created a disk image of 8 GiB with a case sensitive APFS file system and copied all the files into that disk image. Inside that disk image i run make.


Code:
make

Make returns the following error message which is the same error message if i do not run make inside the disk image.

Code:
/Users/rene/code/pulp-riscv-gnu-toolchain/riscv-binutils-gdb/readline/rltty.c:83:7: error: implicit declaration of function 'ioctl' is invalid in C99
     [-Werror,-Wimplicit-function-declaration]
 if (ioctl (tty, TIOCGWINSZ, &w) == 0)
     ^
/Users/rene/code/pulp-riscv-gnu-toolchain/riscv-binutils-gdb/readline/rltty.c:720:3: error: implicit declaration of function 'ioctl' is invalid in C99
     [-Werror,-Wimplicit-function-declaration]
 ioctl (fildes, TIOCSTART, 0);
 ^
/Users/rene/code/pulp-riscv-gnu-toolchain/riscv-binutils-gdb/readline/rltty.c:759:3: error: implicit declaration of function 'ioctl' is invalid in C99
     [-Werror,-Wimplicit-function-declaration]
 ioctl (fildes, TIOCSTOP, 0);
 ^
3 errors generated.
make[3]: *** [rltty.o] Error 1
make[2]: *** [all-readline] Error 2
make[1]: *** [all] Error 2
make: *** [stamps/build-binutils-newlib] Error 2
Reply


Messages In This Thread
Compiling the RISC-V GNU Compiler Toolchain on OS X - by Coderitter GmbH - 02-04-2022, 09:49 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)