BUILD: Makefile: include librt before libpthread
Statically building on for i386/x86_64 on linux+glibc 2.18 fails in rt with
undefined references to pthread_attr_init and a few others. Let's just swap
the two libs in order to fix this.
diff --git a/Makefile b/Makefile
index 2d7e0e9..3964710 100644
--- a/Makefile
+++ b/Makefile
@@ -508,14 +508,14 @@
OPTIONS_LDFLAGS += -ldl
endif
-ifneq ($(USE_THREAD),)
-OPTIONS_LDFLAGS += -lpthread
-endif
-
ifneq ($(USE_RT),)
OPTIONS_LDFLAGS += -lrt
endif
+ifneq ($(USE_THREAD),)
+OPTIONS_LDFLAGS += -lpthread
+endif
+
ifneq ($(USE_BACKTRACE),)
OPTIONS_LDFLAGS += -Wl,$(if $(EXPORT_SYMBOL),$(EXPORT_SYMBOL),--export-dynamic)
endif