From 12a82990d32a6addda7fb3ae451d19cae2df2d2a Mon Sep 17 00:00:00 2001 From: izder456 Date: Tue, 15 Oct 2024 14:01:09 -0500 Subject: [PATCH] implement LINK variable in Makefile to conditionally link to C++ runtime & thus use of _Unwind symbols --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a10eb5214..86f37bbe0 100644 --- a/Makefile +++ b/Makefile @@ -165,6 +165,9 @@ else CFLAGS += -g endif +# link with CC by default +LINK ?= $(CC) + default: $(PLAT) web: @@ -253,7 +256,7 @@ clean: $(BUILD_DIR): mkdir -p $(BUILD_DIR) $(ENAME): $(BUILD_DIR) $(OBJECTS) - $(CC) $(LDFLAGS) -o $@$(OEXT) $(OBJECTS) $(EXTRA_LIBS) $(LIBS) + $(LINK) $(LDFLAGS) -o $@$(OEXT) $(OBJECTS) $(EXTRA_LIBS) $(LIBS) # macOS app bundle