Could someone help me out ?Sorry for thread broken. On Thu, Sep 26, 2024 at 9:47 AM Troy <troymitchell...@gmail.com> wrote:
> > On Thu, Sep 26, 2024 at 12:27 AM Jeff Law <jeffreya...@gmail.com> wrote: > >> >> >> On 9/25/24 2:56 AM, Troy Mitchell via Gcc wrote: >> > Hi everyone, I'm new to the world of gcc. >> > I don't know if this is the right place to post, but I'm having some >> > issues that are really annoying. >> > >> > 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. >> > >> > I modify these files: >> > >> > config.sub, fixincludes/mkfixinc.sh, config.gcc, >> gcc/config/caffeinix.h, >> > libgcc/config.host >> > >> > But after I compiled gcc, I ran into problems when I ran it. >> > I tried to compile a test file (it has nothing but the main function), >> > but I got the following error: >> > ❯ ./riscv64-caffeinix-gcc -o test test.c >> > >> > Assembler messages: >> > Fatal error: invalid -march= option: `rv64imafdc_zicsr' >> > >> > Information I can provide: >> > Host: Ubuntu 22.04 >> > Newlib (compiled by myself): 2.5.0 >> > >> > And the compiled gcc information: >> > >> > ❯ ./riscv64-caffeinix-gcc -march=rv64gc -Q --help=target >> > >> [ ... ] >> > >> > Assembler messages: >> > Fatal error: invalid -march= option: `rv64gc' >> > ❯ ./riscv64-caffeinix-gcc -v >> 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. >> > Sorry, I see. > it's more informations here and I can't find anything useful one..: > > Using built-in specs. > COLLECT_GCC=./riscv64-caffeinix-gcc > > COLLECT_LTO_WRAPPER=/home/troy/repo/riscv-toolchain/riscv-gnu-toolchain/bin-gcc/libexec/gcc/riscv64-caffeinix/13.2.0/lto-wrapper > Target: riscv64-caffeinix > Configured with: ../gcc/configure --target=riscv64-caffeinix > --prefix=/home/troy/repo/riscv-toolchain/riscv-gnu-toolchain/bin-gcc/ > --with-sysroot=/home/troy/repo/riscv-toolchain/bin-newlib/ > --enable-languages=c > --with-headers=/home/troy/repo/riscv-toolchain/bin-newlib/riscv64-caffeinix/include > --with-arch=rv64imafdc --with-abi=lp64d --with-tune=rocket > --with-isa-spec=20191213 --with-newlib > Thread model: single > Supported LTO compression algorithms: zlib > gcc version 13.2.0 (GCC) > COLLECT_GCC_OPTIONS='-o' 'test' '-v' '-mtune=rocket' > '-march=rv64imafdc_zicsr' '-mabi=lp64d' '-misa-spec=20191213' > '-march=rv64imafdc_zicsr' > > /home/troy/repo/riscv-toolchain/riscv-gnu-toolchain/bin-gcc/libexec/gcc/riscv64-caffeinix/13.2.0/cc1 > -quiet -v -imultilib . test.c -quiet -dumpbase test.c -dumpbase-ext .c > -mtune=rocket -march=rv64imafdc_zicsr -mabi=lp64d -misa-spec=20191213 > -march=rv64imafdc_zicsr -version -o /tmp/ccH3vrdP.s > GNU C17 (GCC) version 13.2.0 (riscv64-caffeinix) > Compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, > MPC version 1.2.1, isl version isl-0.24-GMP > > GGC parameters: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 > Ignoring nonexistent directory > "/home/troy/repo/riscv-toolchain/bin-newlib/usr/local/include" > Ignoring nonexistent directory > "/home/troy/repo/riscv-toolchain/riscv-gnu-toolchain/bin-gcc/lib/gcc/riscv64-caffeinix/13.2.0/../../../../riscv64-caffeinix/include" > #include "..." search starts here: > #include <...> search starts here: > > > /home/troy/repo/riscv-toolchain/riscv-gnu-toolchain/bin-gcc/lib/gcc/riscv64-caffeinix/13.2.0/include > > > /home/troy/repo/riscv-toolchain/riscv-gnu-toolchain/bin-gcc/lib/gcc/riscv64-caffeinix/13.2.0/include-fixed > /home/troy/repo/riscv-toolchain/bin-newlib/usr/include > End of search list. > Compiler executable checksum: 01f20c63f1ee93b4e7344797d234e600 > COLLECT_GCC_OPTIONS='-o' 'test' '-v' '-mtune=rocket' > '-march=rv64imafdc_zicsr' '-mabi=lp64d' '-misa-spec=20191213' > '-march=rv64imafdc_zicsr' > 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' > >> >> jeff >> >> Thanks for ur response! I didn't think anyone would reply to me at > first.you make my day. > > Best regards. > Troy. >