Source: pstoedit
Version: 3.62-1
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hi,

when loading pstoedit plugins (the various libp2edrv*.so) that happen
to use libpthread directly or indirectly (e.g. used by the libraries
these plugin use), the process needs to switch to multithreaded
mutexes and so on. The Hurd port of glibc does not support that, and
the library loading such modules should thus be linked against
libpthread, so as to have libpthread loaded right from the process
startup, and modules linked against libpthread can then be loaded
nicely.

Since debian/rules forces -Wl,--as-needed and nothing in pstoedit
sources explicitly uses libpthread, the link to pthread must be passed
before the as-needed flag. Not the cleanest solution, but it will do
for now.

Thanks,
-- 
Pino
--- a/debian/rules
+++ b/debian/rules
@@ -5,11 +5,15 @@
 
 include /usr/share/dpkg/architecture.mk
 
+ifeq ($(DEB_BUILD_ARCH_OS),hurd)
+HURD_LIBPTHREAD += -lpthread
+endif
+
 %:
 	dh $@ --with autotools_dev
 
 override_dh_auto_configure:
-	CXX="c++ -Wl,--as-needed -Wl,-O1" dh_auto_configure
+	CXX="c++ $(HURD_LIBPTHREAD) -Wl,--as-needed -Wl,-O1" dh_auto_configure
 
 override_dh_auto_build:
 	cd doc && latex2man -M -t pstoedit.trans pstoedit.tex pstoedit.1

Reply via email to