Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No rule to make target capstone.lib when compiling under MSYS2 #1464

Open
hipsterfont opened this issue Apr 24, 2019 · 1 comment
Open

No rule to make target capstone.lib when compiling under MSYS2 #1464

hipsterfont opened this issue Apr 24, 2019 · 1 comment

Comments

@hipsterfont
Copy link

hipsterfont commented Apr 24, 2019

Minor bug in the Makefile I found while building QEMU. The IS_MINGW check in the Makefile fails under MSYS2 MinGW-w64 because cc --version doesn't have mingw in the output anymore:

$ whereis cc
cc: /mingw64/bin/cc.exe

$ cc --version
cc.exe (Rev2, Built by MSYS2 project) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Really simple patch:

diff --git "a/Makefile" "b/Makefile"
index 063f50db..1d9f042e 100644
--- "a/Makefile"
+++ "b/Makefile"
@@ -288,7 +288,7 @@ CFLAGS := $(CFLAGS:-fPIC=)
 # On Windows we need the shared library to be executable
 else
 # mingw?
-IS_MINGW := $(shell $(CC) --version | grep -i mingw | wc -l)
+IS_MINGW := $(shell $(CC) --version | grep -i msys2 | wc -l)
 ifeq ($(IS_MINGW),1)
 EXT = dll
 AR_EXT = lib
@aquynh
Copy link
Collaborator

aquynh commented Apr 29, 2019

please send pull req, so i can merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants