From 0e5ce5515d80d053bf798cfdb4e36fec1b961e3c Mon Sep 17 00:00:00 2001 From: markoburcul Date: Mon, 9 Feb 2026 14:33:28 +0100 Subject: [PATCH] makefile: allow multiple definitions flag for Nim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rust includes compiler_builtins crate in rln.lib for low-level ops GCC (mingw-winlibs) also provides its own implementation of these same builtins Both are being linked together → conflict --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 2f15ccd71..be2bc172c 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,9 @@ ifeq ($(detected_OS),Windows) LIBS = -lws2_32 -lbcrypt -liphlpapi -luserenv -lntdll -lminiupnpc -lnatpmp -lpq NIM_PARAMS += $(foreach lib,$(LIBS),--passL:"$(lib)") + # Allow multiple definitions when linking Rust static library with GCC + NIM_PARAMS += --passL:"-Wl,--allow-multiple-definition" + export PATH := /c/msys64/usr/bin:/c/msys64/mingw64/bin:/c/msys64/usr/lib:/c/msys64/mingw64/lib:$(PATH) endif