Skip to content

Latest commit

 

History

History
102 lines (71 loc) · 3.12 KB

Depend.md

File metadata and controls

102 lines (71 loc) · 3.12 KB

Dependencies

  • gcc, ar
  • diff
  • GNU make
  • NASM
  • SPIM

Details

GCC is used to compile the TinyScheme interpreter which is used to bootstrap the project, which is written in C. A custom version of the TinyScheme interpreter source is included as part of this codebase. TinyScheme was set up for many platforms/compilers so it should be fairly easy to replace this with other compilers.

GCC is also used to compile some minimal runtime library functions written in C. These pieces may eventually be replaced with assembly. Again, it should be relatively simple to replace GCC for this purpose.

NASM is used to assemble x86 code files generated by the backend, producing object code output (.o, .obj). The backend produces x86 assembly code in a format that is somewhat specific to NASM, so it may be more difficult to replace this component with a different assembler (e.g. GAS).

The archiver tool (ar) is used during the build process to group object code files into lib files. It should be straightforward to replace this with any appropriate library tool.

Finally GCC is used as a linker for the object code and lib files to produce the final exe. It should be straightforward to use other linker tools for this purpose.

The project is currently tested and developed on a Windows machine using the MinGW port of gcc, ar and make. Testing and supporting other platforms (Linux) and compilers (clang) is planned and/or in progress.

SPIM is used as a testbed tool for verifying that the MIPS backend is working, but this is not a required dependency to bootstrap the compiler on an x86 machine.

Tested Dependency Versions on Windows

The project is tested with these versions of the dependency components. Replacing these components or picking up new versions may require some tweaks to the project.

>ver
Microsoft Windows [Version 10.0.17763.253]

>make --version
GNU Make 3.82.90
Built for i686-pc-mingw32

>gcc --version
gcc (GCC) 5.3.0

>ar --version
GNU ar (GNU Binutils) 2.25.1

>diff --version
diff (GNU diffutils) 3.6

>nasm -version
NASM version 2.12.02 compiled on Jul  6 2016

See MinGW for native Windows builds of the GNU tools, including make, gcc, and ar, and diff. MSYS is a component of the Windows port of Git, so also check the usr\bin directory of the Git install for some tools, including diff.

See NASM for The Netwide Assembler.

Tested Dependency Versions on Linux

The project was tested on the following dependency component versions.

$ uname -a
Linux schemer 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) i686 GNU/Linux

$ make --version
GNU Make 4.0
Built for i586-pc-linux-gnu

$ gcc --version
gcc (Debian 4.9.2-10+deb8u2) 4.9.2

$ ar --version
GNU ar (GNU Binutils for Debian) 2.25

$ diff --version
diff (GNU diffutils) 3.3

$ nasm -version
NASM version 2.11.05 compiled on Sep  9 2014

On Debian GNU/Linux, all of these components can be installed with apt.