Skip to content

Commit 945762e

Browse files
committed
docs: Added 64-bit compilation info to README
1 parent 545672a commit 945762e

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,51 @@ Once you've made sure you have the above, proceed with the following steps:
3535

3636
You should now have a working `src/le_disasm` executable file.
3737

38+
#### Build example - MSYS2 updated 2023-07 on Windows
39+
40+
Using Minimal System and the MinGW toolchain available within, it is possible
41+
to build the executable using the same way as for UNIX systems, with bash and autotools.
42+
43+
First install the dependencies - mingw64:
44+
45+
```
46+
pacman -S mingw-w64-x86_64-binutils mingw-w64-x86_64-pkgconf mingw-w64-x86_64-make mingw-w64-x86_64-gcc
47+
```
48+
49+
Now as our host is ready, we can start working on the actual `le_disasm` sources.
50+
We will provide path to mingw64 aclocal config, just in case another toolchain is default.
51+
Go to the `le_disasm` folder, and generate build scripts from templates using autotools:
52+
53+
```
54+
autoreconf -ivf --include=/mingw64/share/aclocal/
55+
```
56+
57+
Next, proceed with the build steps; we will do that in a separate folder.
58+
Note how we are modifying PATH environment variable to make shell search for mingw32
59+
binaries before the default mingw64:
60+
61+
```
62+
mkdir -p release; cd release
63+
../configure
64+
make V=1
65+
```
66+
67+
On success, this will create `release/src/le_disasm.exe` executable file.
68+
Note that you need a pack of DLL files from `mingw64` folder to corretly run
69+
the executable on other Windows installations.
70+
71+
In case you want a debug version of the binary (required for tracing bugs within the
72+
tool), the commands should include optimizations disable and debug symbols enable.
73+
To get such build, go to the `le_disasm` folder; then it would be prudent to create
74+
a separate build directory for debug version, and compile the tool there:
75+
76+
```
77+
mkdir -p debug; cd debug
78+
CPPFLAGS="-DDEBUG" CFLAGS="-g -O0" CXXFLAGS="-g -O0" LDFLAGS="-g -O0" ../configure
79+
make V=1
80+
```
81+
On success, this will create `debug/src/le_disasm.exe` executable file.
82+
3883
#### Build example - 32-bit toolchain of MSYS2 updated 2023-07 on Windows
3984

4085
Using Minimal System and the MinGW toolchain available within, it is possible

0 commit comments

Comments
 (0)