From 3c3c59928da42faa360d56ec0652343f24b0f0b8 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 17 Oct 2023 23:44:30 -0400 Subject: [PATCH] Makefile: support for Mingw64 toolchain --- src/Makefile.cfg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 5248dbdf..b839b5ea 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -54,7 +54,10 @@ ifeq (,$(filter GCC%,$(.VARIABLES))) version:=$(shell $(CC) --version) # check if this is in fact GCC ifneq (,$(or $(findstring gcc,$(version)),$(findstring GCC,$(version)))) - version:=$(shell $(CC) -dumpversion) + shellversion:=$(shell $(CC) -dumpversion) + + # Try to remove "-win32" + version:=$(subst -win32,.0,$(shellversion)) # Turn version into words of major, minor v:=$(subst ., ,$(version))