diff --git a/plugin.mk b/plugin.mk index 673ebf99..21e23f53 100644 --- a/plugin.mk +++ b/plugin.mk @@ -16,6 +16,9 @@ DISTRIBUTABLES += plugin.json FLAGS += -fPIC FLAGS += -I$(RACK_DIR)/include -I$(RACK_DIR)/dep/include +# This prevents static variables in the DSO (dynamic shared object) from being preserved after dlclose(). +# I don't really understand the side effects (see GCC manual), but so far tests are positive. +FLAGS += -fno-gnu-unique include $(RACK_DIR)/arch.mk