Open hakrdinesh opened 5 years ago
ob1$ gmake gmake: ../scripts/vcs-version.sh: Command not found
Kindly pull https://github.com/hakrdinesh/riscv-isa-sim/commit/5907e70c43c172f456f3bbb52c85ba156d025d55
The error on OpenBSD goes away. No regressions will be seen Ubuntu 16.04, FreeBSD 13.0-current, NetBSD 8.0, and OpenBSD 6.4 on the amd64 platform.
Kindly pull https://github.com/hakrdinesh/riscv-isa-sim/commit/ec694bbddad0dc9af38597c7df63f139d67c77ce
to fix compilation errors on OpenBSD.
The compilation errors are gone with that change.
ob1$ pwd
/home/dt/riscv-isa-sim/build
ob1$ gmake
gmake: Nothing to be done for 'default'.
ob1$ find . -name "bit.o"
./remote_bitbang.o
ob1$ git remote -v
origin https://github.com/hakrdinesh/riscv-isa-sim (fetch)
origin https://github.com/hakrdinesh/riscv-isa-sim (push)
ob1$
Thanks.
Need to check for any regressions on NetBSD, FreeBSD and Ubuntu.
Added OpenBSD build instructions in https://github.com/hakrdinesh/riscv-isa-sim/commit/5e6973db21a04d848067661124b78e7434099d7a
Kindly pull in. Thanks.
Sorry to bump, but does OpenBSD plan to support Risc-V in the future? And if so, when? just curious.
OpenBSD 6.4/amd64
ob1$ script openbsd.out Script started, output file is openbsd.out ob1$ cd riscv-isa-sim
ob1$ mkdir build ob1$ cd build ob1$ export RISCV=/home/dt/r5 ob1$ uname -a OpenBSD ob1.my.domain 6.4 GENERIC#349 amd64 ob1$ cc --version OpenBSD clang version 6.0.0 (tags/RELEASE_600/final) (based on LLVM 6.0.0) Target: amd64-unknown-openbsd6.4 Thread model: posix InstalledDir: /usr/bin ob1$ export CC=cc ob1$ c++ --version OpenBSD clang version 6.0.0 (tags/RELEASE_600/final) (based on LLVM 6.0.0) Target: amd64-unknown-openbsd6.4 Thread model: posix InstalledDir: /usr/bin ob1$ export CXX=c++ ob1$ ../configure --prefix=$RISV --with-fesvr=$RISCV ob1$ ../configure --prefix=$RISCV --with-fesvr=$RISCV checking build system type... x86_64-unknown-openbsd6.4 checking host system type... x86_64-unknown-openbsd6.4 checking for gcc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking whether we are using the GNU C++ compiler... yes checking whether c++ accepts -g... yes checking for ar... ar checking for ranlib... ranlib checking for dtc... /usr/local/bin/dtc checking how to run the C++ preprocessor... c++ -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether byte ordering is bigendian... no checking for a BSD-compatible install... /usr/bin/install -c checking for ANSI C header files... (cached) yes configure: configuring default subproject : riscv checking for library containing dlopen... none required checking for libfesvr_is_present in -lfesvr... yes checking for pthread_create in -lpthread... yes configure: configuring default subproject : dummy_rocc configure: configuring default subproject : softfloat configure: configuring default subproject : spike_main configure: creating ./config.status config.status: creating riscv.mk config.status: creating dummy_rocc.mk config.status: creating softfloat.mk config.status: creating spike_main.mk config.status: creating Makefile config.status: creating riscv-spike.pc config.status: creating riscv-riscv.pc config.status: creating riscv-softfloat.pc config.status: creating riscv-dummy_rocc.pc config.status: creating riscv-spike_main.pc config.status: creating config.h ob1$ gmake gmake: ../scripts/vcs-version.sh: Command not found ../riscv/gen_icache
grep "ICACHE_ENTRIES =" ../riscv/mmu.h | sed 's/.* = \(.*\);/\1/'
> icache.h.tmp ../riscv/gen_icache[6]: seq: not found mv icache.h.tmp icache.h for insn in add addi addiw addw amoadd_d amoadd_w amoand_d amoand_w amomax_d amomaxu_d amomaxu_w amomax_w amomin_d amominu_d amominu_w amomin_w amoor_d amoor_w amoswap_d amoswap_w amoxor_d amoxor_w and andi auipc beq bge bgeu blt bltu bne c_add c_addi4spn c_addi c_addw c_and c_andi c_beqz c_bnez c_ebreak c_fld c_fldsp c_flw c_flwsp c_fsd c_fsdsp c_fsw c_fswsp c_jal c_jalr c_j c_jr c_li c_lui c_lw c_lwsp c_mv c_or c_slli c_srai c_srli c_sub c_subw c_xor csrrc csrrci csrrs csrrsi csrrw csrrwi c_sw c_swsp div divu divuw divw dret ebreak ecall fadd_d fadd_q fadd_s fclass_d fclass_q fclass_s fcvt_d_l fcvt_d_lu fcvt_d_q fcvt_d_s fcvt_d_w fcvt_d_wu fcvt_l_d fcvt_l_q fcvt_l_s fcvt_lu_d fcvt_lu_q fcvt_lu_s fcvt_q_d fcvt_q_l fcvt_q_lu fcvt_q_s fcvt_q_w fcvt_q_wu fcvt_s_d fcvt_s_l fcvt_s_lu fcvt_s_q fcvt_s_w fcvt_s_wu fcvt_w_d fcvt_w_q fcvt_w_s fcvt_wu_d fcvt_wu_q fcvt_wu_s fdiv_d fdiv_q fdiv_s fence fence_i feq_d feq_q feq_s fld fle_d fle_q fle_s flq flt_d flt_q flt_s flw fmadd_d fmadd_q fmadd_s fmax_d fmax_q fmax_s fmin_d fmin_q fmin_s fmsub_d fmsub_q fmsub_s fmul_d fmul_q fmul_s fmv_d_x fmv_w_x fmv_x_d fmv_x_w fnmadd_d fnmadd_q fnmadd_s fnmsub_d fnmsub_q fnmsub_s fsd fsgnj_d fsgnj_q fsgnjn_d fsgnjn_q fsgnjn_s fsgnj_s fsgnjx_d fsgnjx_q fsgnjx_s fsq fsqrt_d fsqrt_q fsqrt_s fsub_d fsub_q fsub_s fsw jal jalr lb lbu ld lh lhu lr_d lr_w lui lw lwu mret mul mulh mulhsu mulhu mulw or ori rem remu remuw remw sb sc_d sc_w sd sfence_vma sh sll slli slliw sllw slt slti sltiu sltu sra srai sraiw sraw sret srl srli srliw srlw sub subw sw wfi xor xori ; do \ printf 'DEFINE_INSN(%s)\n' "${insn}" ; \ done > insn_list.h.tmp mv insn_list.h.tmp insn_list.h c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -x c++-header ../riscv/insn_template.h -o insn_template.h.gch c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/processor.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/execute.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/dts.cc ../riscv/dts.cc:120:35: warning: missing sentinel in function call [-Wsentinel] execl(DTC, DTC, "-O", "dtb", 0); ^ , nullptr /usr/include/unistd.h:332:6: note: function has been explicitly marked sentinel here int execl(const char , const char , ...) ^ 1 warning generated. c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/sim.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/interactive.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/trap.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/cachesim.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/mmu.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../spike_main/disasm.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/extension.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/extensions.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/rocc.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/regnames.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/devices.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/rom.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/clint.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/debug_module.cc c++ -fPIC -MMD -MP -I/home/dt/r5/include -Wall -Wno-unused -g -O2 -std=c++11 -DPREFIX=\"/home/dt/r5\" -I. -I.. -I../riscv -I../dummy_rocc -I../softfloat -I../spike_main -c ../riscv/remote_bitbang.cc ../riscv/remote_bitbang.cc:29:22: error: use of undeclared identifier 'AF_INET' socket_fd = socket(AF_INET, SOCK_STREAM, 0); ^ ../riscv/remote_bitbang.cc:29:31: error: use of undeclared identifier 'SOCK_STREAM' socket_fd = socket(AF_INET, SOCK_STREAM, 0); ^ ../riscv/remote_bitbang.cc:38:29: error: use of undeclared identifier 'SOL_SOCKET' if (setsockopt(socket_fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, ^ ../riscv/remote_bitbang.cc:38:41: error: use of undeclared identifier 'SO_REUSEADDR' if (setsockopt(socket_fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, ^ ../riscv/remote_bitbang.cc:45:22: error: variable has incomplete type 'struct sockaddr_in' struct sockaddr_in addr; ^ ../riscv/remote_bitbang.cc:45:10: note: forward declaration of 'sockaddr_in' struct sockaddr_in addr; ^ ../riscv/remote_bitbang.cc:47:21: error: use of undeclared identifier 'AF_INET' addr.sin_family = AF_INET; ^ ../riscv/remote_bitbang.cc:48:26: error: use of undeclared identifier 'INADDR_ANY' addr.sin_addr.s_addr = INADDR_ANY; ^ ../riscv/remote_bitbang.cc:57:7: error: use of undeclared identifier 'listen' if (listen(socket_fd, 1) == -1) { ^ ../riscv/remote_bitbang.cc:77:17: error: no member named 'accept' in the global namespace client_fd = ::accept(socket_fd, NULL, NULL); ~~^ 9 errors generated. gmake: *** [Makefile:319: remote_bitbang.o] Error 1 ob1$ ^D Script done, output file is openbsd.out ob1$