MichaelB7 / Crafty

Crafty is the "son" (direct descendent) of the chess program Cray Blitz. it is designed totally around the bit-board data structure for reasons of speed of execution, ease of adding new knowledge, and a significantly cleaner overall design. it is written totally in ANSI C with some few UNIX system calls required for I/O, etc.
http://craftychess.com
53 stars 14 forks source link

x86 architecture independent code #13

Closed mkrcmarik closed 6 months ago

mkrcmarik commented 1 year ago

The aim of the modification is the possibility to compile Crafty for other architectures besides x86. The modification has been tested on aarch64 (Raspberry pi 4B) and riscv64(Starfive Visionfive 2) (all under Linux) in addition to x86. A change in the Makefile allows custom CFLAGS to be used in the make command and x86 dependent flag. A change in lock.h removes x86 dependent code.

chromi commented 1 year ago

This looks useful to me.

One other fix could be rolled into the Makefile here: the unix-clang target should have -fprofile-instr-use=... instead of -fprofile-use in LDFLAGS as well as CFLAGS.