From 7a027251791db60b1edda049d74e6f86b3133246 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 16 Jan 2020 03:43:53 -0500 Subject: [PATCH] Compile plugins with -fno-gnu-unique. --- plugin.mk | 3 +++ 1 file changed, 3 insertions(+) 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