aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <aswaterman@gmail.com>2019-02-04 11:28:31 -0800
committerGitHub <noreply@github.com>2019-02-04 11:28:31 -0800
commit2b38c82833addb35fd8aea0e63f8deeaa44a5a86 (patch)
treec50763b55239a30a7599dec1ecc93208bce190bb
parentee6fe6501a21ea8d167b6a5048527ba9eb924878 (diff)
parent97ed2cc42ad354560db479d608eefe07ccff1167 (diff)
downloadspike-2b38c82833addb35fd8aea0e63f8deeaa44a5a86.zip
spike-2b38c82833addb35fd8aea0e63f8deeaa44a5a86.tar.gz
spike-2b38c82833addb35fd8aea0e63f8deeaa44a5a86.tar.bz2
Merge pull request #274 from hakrdinesh/master
openbsd port of spike and its build documentation
-rw-r--r--README.md14
-rw-r--r--riscv/remote_bitbang.cc7
-rwxr-xr-xscripts/vcs-version.sh2
3 files changed, 22 insertions, 1 deletions
diff --git a/README.md b/README.md
index 98b6bf2..8b164e5 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,20 @@ install path, and that the riscv-fesvr package is installed there.
$ make
$ [sudo] make install
+Build Steps on OpenBSD
+----------------------
+
+Install bash, gmake, dtc, and use clang.
+
+ $ pkg_add bash gmake dtc
+ $ exec bash
+ $ export CC=cc; export CXX=c++
+ $ mkdir build
+ $ cd build
+ $ ../configure --prefix=$RISCV --with-fesvr=$RISCV
+ $ gmake
+ $ [doas] make install
+
Compiling and Running a Simple C Program
-------------------------------------------
diff --git a/riscv/remote_bitbang.cc b/riscv/remote_bitbang.cc
index 21306dd..8453e85 100644
--- a/riscv/remote_bitbang.cc
+++ b/riscv/remote_bitbang.cc
@@ -5,6 +5,13 @@
#include <string.h>
#include <unistd.h>
+#ifndef AF_INET
+#include <sys/socket.h>
+#endif
+#ifndef INADDR_ANY
+#include <netinet/in.h>
+#endif
+
#include <algorithm>
#include <cassert>
#include <cstdio>
diff --git a/scripts/vcs-version.sh b/scripts/vcs-version.sh
index 31fae86..692c071 100755
--- a/scripts/vcs-version.sh
+++ b/scripts/vcs-version.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#=========================================================================
# vcs-version.sh [options] [src-dir]
#=========================================================================