Skip to content
Snippets Groups Projects
Commit ea408d18 authored by Milo Craun's avatar Milo Craun
Browse files

Added building instructions

parent 2e0d7081
No related branches found
No related tags found
No related merge requests found
2024-04-10 - Milo - Install cross compiler
# 2024-04-10 - Milo
## Install cross compiler
To run the programs we need on ARM we need to setup a cross
compiler for AArch64. This is actually not too bad.
......@@ -13,3 +14,18 @@ Then we move them to an easier path
`mv gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu aarch`
Now we can use the cross compiler toolchain to compiler our programs.
## Build programs
We need to use the cross compiler, and regular compiler to build out programs.
For both architectures, we need to make sure our binaries are static by using the `-static`
command line option. This is for gem5 to work.
For AArch64 we need to decide what optimization level we want from gcc.
Regardless of optimization level we can turn on auto-vectorization with
-ftree-vectorize
For X86 we need to include an additional flag -msse (or -msse2 not sure).
We can get more info from the compiler by passing in the -ftree-vectorize-verbose=LEVEL flag.
For more info go to [here](https://gcc.gnu.org/projects/tree-ssa/vectorization.html)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment