]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: Makefile: include librt before libpthread
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 07:31:47 +0000 (08:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 11:02:27 +0000 (12:02 +0100)
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.

Makefile

index 2d7e0e9728fd42f6154ea04deb9b3f10aa60cea9..396471062bdc738d1c5e10b14cef51bb24795b81 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -508,14 +508,14 @@ ifneq ($(USE_DL),)
 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