Troy via Gcc kirjoitti 29.9.2024 klo 6.15:
I've created a Unix-like system, and although it's not very complete
yet, I want to make a cross-compilation chain for it so that I can use
some open source c libraries.

More important would be to see the -v output when you ran the compiler
and got the error message from the compiler.  Most likely it's not
finding a risc-v assembler.

Configured with: ../gcc/configure --target=riscv64-caffeinix
--prefix=/home/troy/repo/riscv-toolchain/riscv-gnu-toolchain/bin-gcc/

  as -v --traditional-format -march=rv64imafdc_zicsr
-march=rv64imafdc_zicsr -mabi=lp64d -misa-spec=20191213 -o /tmp/ccIwNEVC.o
/tmp/ccH3vrdP.s
GNU assembler version 2.38 (x86_64-linux-gnu) using BFD version (GNU
Binutils for Ubuntu) 2.38
Assembler messages:
Fatal error: invalid -march= option: `rv64imafdc_zicsr'
Using just the same $prefix value in both the GNU binutils and GCC configure is very basic know-how, one shouldn't use different values for them unless doing something to help the '$target-gcc' to find the right binutils. The default place for the $target
binutils is the :
$prefix/$target/bin
As their "bare" names like 'as', 'ld', 'ar', 'nm' etc. Meanwhile the same stuff aimed for the GCC user to use are in the '$prefix/bin' with names '$target-as', '$target-ld' etc. As you can see the name 'as' was tried for the 'risc-v' target assembler and when the
right one wasn't found the build system's own 'as' was used.

Reply via email to