Open Xxfore opened 1 year ago
Hi @Xxfore,
I'm not sure if this link below is what you're looking for. It mentioned Cross Compile
and Triple Compile
in the Environments section. Maybe you could search for the keyword "cross-compile" to find more information.
I encountered the same problem as you. In my approach, I used the pre-built tools on my x86 Linux and use the riscv.cfg
file to compile (cross compilation) those benchmarks. After that, I put those files generated by --copy
option into QEMU RISCV Linux.
Hi @Xxfore,
I'm not sure if this link below is what you're looking for. It mentioned
Cross Compile
andTriple Compile
in the Environments section. Maybe you could search for the keyword "cross-compile" to find more information.I encountered the same problem as you. In my approach, I used the pre-built tools on my x86 Linux and use the
riscv.cfg
file to compile (cross compilation) those benchmarks. After that, I put those files generated by--copy
option into QEMU RISCV Linux.
Thank you so much for your kindness help. I have tried to build target riscv benchmarks on x86 host by using Speckle, When i run 403.gcc with command : gcc 166.in -o 166.s it shows error like :
166.in:14985 : internal error : 4
It is possible that you may be trying to use SPEC's version of gcc
without first defining the appropriate flags. Please check the flags
that are in the config files from recently-published results on your
platform, and check that you are using an up-to-date compiler. If
you still need help, please contact SPEC, reporting your hw/os
platform, your compiler version, and your compilation flags.
Contact SPEC at xxxx
Have you ever meet this error before?
Hi, @Xxfore
riscv.cfg
as the configuration file in gen_binaries.sh
?CC, CXX, FC
in your riscv.cfg
?gcc 166.in -o 166.s
? on QEMU RISC-V Linux or anything else?file ./gcc
in 403.gcc folder?In my case,
I use RISC-V GNU Toolchain 2021.06.18, which contains RISC-V GCC 10.2 (I use --enable-multilib
option),
and I set the CC, CXX, FC to where I installed the tollchain in my riscv.cfg like the following:
CC = riscv64-unknown-linux-gnu-gcc -static -Wl,-Ttext-segment,0x10000 -march=rv64imafdc -mabi=lp64d
CXX = riscv64-unknown-linux-gnu-g++ -static -Wl,-Ttext-segment,0x10000 -march=rv64imafdc -mabi=lp64d
FC = riscv64-unknown-linux-gnu-gfortran -static -Wl,-Ttext-segment,0x10000 -march=rv64imafdc -mabi=lp64d
and the info of compiled 403.gcc (in 403.gcc after it compiled by RISC-V GCC) is like the following:
$ cd 403.gcc
$ file ./gcc
# ./gcc: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), statically linked, for GNU/Linux 4.15.0, with debug_info, not stripped
I need more information about your environments.
QL
Hi, Firstly , i hope run the benchmarks on a RISCV FPGA wich minimal linux kernel, So i want to do some cross-compile job on x86 server, But as check your provide guide about build/run/copy instruction, I have few confuse about tool build. Does it mean tools cant do cross-compile under such as x86 machine? it should build on a riscv machine with native compiler? From your guide and Spec official documation , i cant find any information about tool cross-compile build.
Hope your kindness reply.