aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/2004_enforce-lpthread.patch
blob: 474feb0dda291a07850b48bffa2273c4b1cf814f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: Enforce -lpthread when linking nxcomp.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Abstract:
 This is a workaround for a nasty libtool bug!!!
 .
 We actually compile libXcomp with pthread support, but libtool uses g++
 ... -nostdlib ... -pthread on Linux. -nostdlib causes -pthread to be
 ignored.
 .
 According to GCC upstream, this is not a bug:
 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
 .
 GCC upstream insists that libtool needs to handle -pthread in a special
 way when using -nostdlib.
 .
 A patch has been submitted to the libtool project:
 http://lists.gnu.org/archive/html/libtool-patches/2013-11/msg00015.html
 but never applied to the code base. Boo.
 .
 We will work around this bug by hard-coding the linking with pthread
 support in libXcomp for now.

--- a/nxcomp/src/Makefile.am
+++ b/nxcomp/src/Makefile.am
@@ -139,7 +139,7 @@
 libXcomp_la_LDFLAGS =					\
     -version-number @LT_COMP_VERSION@			\
     -no-undefined					\
-    $(PTHREAD_LDFLAGS)					\
+    $(PTHREAD_LDFLAGS) -lpthread			\
     $(NULL)
 
 libXcompincludedir = $(includedir)/nx