diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index cb17732fa..00473f116 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -578,7 +578,7 @@ makesdlkeytrans$(EXESUFFIX): $(ENGINE_OBJ)/makesdlkeytrans.$o $(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(SDL_INCLUDES) $(RECIPE_RESULT_ONESTEP) arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o $(ONESTEP_STATUS) - $(RECIPE_IF) $(L_CXX) $(CXXONLYFLAGS) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STDCPPLIB) $(RECIPE_RESULT_ONESTEP) + $(RECIPE_IF) $(L_CXX) $(CXXONLYFLAGS) $(L_CXXONLYFLAGS) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STDCPPLIB) $(RECIPE_RESULT_ONESTEP) #### Lunatic diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index c6390ae18..da1e353d2 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -281,6 +281,7 @@ CXXONLYFLAGS= -fno-exceptions -fno-rtti ASFORMAT=elf$(SYSBITS) ASFLAGS=-s -f $(ASFORMAT) #-g LINKERFLAGS= +L_CXXONLYFLAGS= LIBS=-lm GUI_LIBS= LIBDIRS= @@ -775,6 +776,9 @@ endif ifeq ($(PLATFORM),WINDOWS) COMPILERFLAGS+= -DUNDERSCORES -DHAVE_INTTYPES -Iplatform/Windows/include LINKERFLAGS+= -static-libgcc + ifeq (0,$(CLANG)) + L_CXXONLYFLAGS += -static-libstdc++ + endif ASFORMAT=win$(SYSBITS) ASFLAGS+= -DUNDERSCORES @@ -1080,10 +1084,10 @@ endif COMPILER=$(CC) $(CONLYFLAGS) COMPILER_OBJC=$(COBJC) $(CONLYFLAGS) -LINKER=$(L_CC) +LINKER=$(L_CC) $(CONLYFLAGS) ifneq ($(CPLUSPLUS),0) COMPILER=$(CXX) $(CXXONLYFLAGS) - LINKER=$(L_CXX) + LINKER=$(L_CXX) $(CXXONLYFLAGS) $(L_CXXONLYFLAGS) endif ifneq (,$(CUSTOMOPT))