-
Notifications
You must be signed in to change notification settings - Fork 2
/
ReadMe
31 lines (17 loc) · 867 Bytes
/
ReadMe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From a fresh Ubuntu:
$ sudo add-apt-repository ppa:hvr/ghc
$ sudo apt-get update
$ sudo apt-get install ghc-8.2.2
Build steps:
$ git submodule update --init --recursive
$ stack build
Execution:
$ stack exec atva-demo elf.exe
Note for MacOS users:
The input language of macaw is Elf, which is not a format of object file format supported by OS X (Mach-O).
To generate Elf file on MacOS, we cross-compile to a linux target.
1) set gcc target to be a linux machine:
$ gcc -fno-stack-protector -foptimize-sibling-calls -target x86_64-unknown-linux-gnu -c -o foo.o foo.c
2) use a linker configured for that target-triple. Follow the instructions on
https://stackoverflow.com/questions/39059597/how-to-create-an-elf-executable-on-mac-os-x before running:
$ ~/.local/binutils/x86_64-unknown-linux-gnu/bin/ld -static -o foo.exe foo.o