fix a top directory build ld error
When in the top source directory use: cmake . & cmake --build .
will cause a linker error : /usr/bin/ld: fatal error: cstool: open: Is a directory
It's caused because build will generate a binary named cstool and we also have a directory with exactly the same name. This will cause some overwrite make liker confused and cause a mystical bug.
So my proposal is to change the directory cstool to cstool-src or something else diff with the cstool.
call cmake generate capstone/Makefile first, please.
interesting, but this breaks CI, because you havent updated Makefile yet.
another issue with your way of building from root dir is that cmake will overwrite original Makefile. so you better create a directory, and compile from there, like recommended.
$ mkdir build
$ cd build
$ ../make.sh
So how to describe the relations between CMakeLists.txt and the Makefile of the root directory?
Is it come from cmake generate? If not, what's the purpose of CMakeLists.txt?
Of course, I have known to create a new clean directory to build the capstone. But for me, the intuitive chose is what uses the cmake.
Makefile is for "make". We support "cmake" at the same time.
Thank you for the PR! I closed it because it is out of date. With the new auto-sync update for v6 we made many changes to some main architectures and will do also to others. This also changed the requirements we have now for new PRs.
If you still want to merge the changes, please rebase your fix onto the newest next branch and open a new PR.