diff --git a/docs/BUILD_WINDOWS.md b/docs/BUILD_WINDOWS.md index 814dbdc89..8075d10b9 100644 --- a/docs/BUILD_WINDOWS.md +++ b/docs/BUILD_WINDOWS.md @@ -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#