Update BUILD_WINDOWS.md (#124)

* Update BUILD_WINDOWS.md

* Update BUILD_WINDOWS.md

* Update BUILD_WINDOWS.md

* Update BUILD_WINDOWS.md
This commit is contained in:
MegaMech 2022-01-02 17:30:56 -07:00 committed by GitHub
parent 20d9e8afba
commit 5fbfc21512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 8 deletions

View File

@ -43,23 +43,28 @@ In `MSYS2 MinGW x64` run in `mk64/tools/ido5.3_recomp/`:
g++ recomp.cpp -o recomp -g -lcapstone -Dugen53
```
### Step 6: Compiling the recomp compiler in `MSYS2 MSYS`
In `MSYS2 MSYS` run:
### Step 6: Generate Recomp Source Files in `MSYS2 MinGW x64`
Generate the .c files which will compile into the recomp binaries.
mk64 requires the following compiler binaries: `as1, cc, cfe, copt, ugen, ujoin, uld, umerge, uopt`
In `MSYS2 MinGW x64` run in the directory `mk64/tools/ido5.3_recomp/`:
```
make -C tools
./recomp ../ido5.3_compiler/usr/lib/as1 > as1_c.c
```
If the make file is broken then manually generate each source file in `mk64/tools/ido5.3_recomp/`:
If you get an assertion failed error. Then the directory to the compiler is incorrect.
The binary for cc is in `/ido5.3_compiler/usr/bin/` so do:
```
./recomp ~/ido7.1_compiler/usr/lib/as1 > as1_c.c
./recomp ../ido5.3_compiler/usr/bin/cc > cc_c.c
```
Next, compile the generated C files:
### Step 7: Compiling the recomp compiler in `MSYS2 MSYS`
In `MSYS2 MSYS` run in the directory `mk64/tools/ido5.3_recomp/`:
```
gcc libc_impl.c as1_c.c -o as1 -g -fno-strict-aliasing -lm -no-pie -DIDO53 -O2
```
`-O2` is an optional optimization flag.
mk64 requires the following: as1, cc, cfe, copt, ugen, ujoin, uld, umerge, uopt
### Step 7: Compile mk64 in `MSYS2 MinGW x64`
### Step 8: Compile mk64 in `MSYS2 MinGW x64`
In `/mk64/` run:
```
make -j#