Skip to content

Commit

Permalink
Build softfloat library.
Browse files Browse the repository at this point in the history
(Attempt to fix Travis.)
  • Loading branch information
ijc8 committed Oct 2, 2018
1 parent 2e4e3b9 commit 2389b89
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "riscv-tests"]
path = riscv-tests
url = https://github.com/riscv/riscv-tests
[submodule "softfloat-hs"]
path = softfloat-hs
url = https://github.com/GaloisInc/softfloat-hs.git
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ before_install:
- mkdir -p ~/.local/bin
- mkdir ~/riscv-gcc
- export PATH=$HOME/.local/bin:$HOME/riscv-gcc/bin:$PATH
- export LD_LIBRARY_PATH=$(pwd)/softfloat-hs/lib
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- travis_retry curl -L https://github.com/gnu-mcu-eclipse/riscv-none-gcc/releases/download/v7.2.0-2-20180110/gnu-mcu-eclipse-riscv-none-gcc-7.2.0-2-20180111-2230-centos64.tgz | tar xz --strip-components=3 -C ~/riscv-gcc gnu-mcu-eclipse/riscv-none-gcc/7.2.0-2-20180111-2230

Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
.PHONY: elf2hex test riscv-tests clean all
.PHONY: elf2hex test softfloat-hs riscv-tests clean all

all: elf2hex test riscv-tests
all: elf2hex test softfloat-hs riscv-tests

elf2hex:
$(MAKE) -C elf2hex

test:
$(MAKE) -C test

softfloat-hs:
TMPDIR=$$(mktemp -d); \
echo '$$@' > $$TMPDIR/sudo; \
chmod +x $$TMPDIR/sudo; \
PATH=$$TMPDIR:$$PATH $(MAKE) -C softfloat-hs INCLUDEPATH=include; \
rm -r $$TMPDIR

riscv-tests:
RISCV_PREFIX=riscv-none-embed- $(MAKE) -C riscv-tests/isa rv64mi rv64si rv64ui rv64uf

clean:
rm -rf .stack-work/
$(MAKE) -C elf2hex clean
$(MAKE) -C test clean
$(MAKE) -C softfloat-hs clean INCLUDEPATH=include
$(MAKE) -C riscv-tests/isa clean
6 changes: 5 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ whichstack=`which stack`
if [ "$whichstack" == "" ]; then
curl -sSL https://get.haskellstack.org/ | sh
fi
stack setup; stack install split; stack install text; stack build
stack setup
stack install split
stack install text
make
stack build
1 change: 1 addition & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
export PATH=$(pwd)/gnu-mcu-eclipse/riscv-none-gcc/7.2.0-2-20180111-2230/bin/:$PATH
export LD_LIBRARY_PATH=$(pwd)/softfloat-hs/lib
1 change: 1 addition & 0 deletions softfloat-hs
Submodule softfloat-hs added at d60900
9 changes: 3 additions & 6 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ resolver: nightly-2017-10-26
# will not be run. This is useful for tweaking upstream packages.
packages:
- '.'
- location:
git: https://github.com/GaloisInc/softfloat-hs.git
commit: d60900669f35878c54114a0d4b5a3acd91ba0654
extra-dep: true
- 'softfloat-hs'
# - clash/clash-ghc
# - clash/clash-lib
# - clash/clash-prelude
Expand Down Expand Up @@ -77,8 +74,8 @@ extra-package-dbs: []
# arch: x86_64
#
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
extra-include-dirs: [softfloat-hs/include]
extra-lib-dirs: [softfloat-hs/lib]
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor

0 comments on commit 2389b89

Please sign in to comment.