[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#400031: gcc-4.1: Enable -pthread for GNU/Hurd



Package: gcc-4.1
Version: 4.1.1ds2-20
Severity: important
Tags: patch

Hi,

currently, the -pthread option is not understood by the GNU/Hurd gcc,
which makes some packages FTBFS, e.g. directfb.

The attached addition to hurd-changes.dpatch fixes this.


Michael
--- gcc/config/gnu.h.orig       2006-11-21 06:23:34.000000000 +0000
+++ gcc/config/gnu.h    2006-11-21 06:23:53.000000000 +0000
@@ -6,7 +6,7 @@

 /* Default C library spec.  Use -lbsd-compat for gcc -bsd.  */
 #undef LIB_SPEC
-#define LIB_SPEC "%{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+#define LIB_SPEC "%{pthread:-lpthread} %{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"

 /* Standard include directory.  In GNU, "/usr" is a four-letter word.  */
 #undef STANDARD_INCLUDE_DIR
--- gcc/config/i386/gnu.h.orig  2004-09-08 00:17:19.000000000 +0000
+++ gcc/config/i386/gnu.h       2006-11-21 06:34:03.000000000 +0000
@@ -17,7 +17,7 @@
   while (0)

 #undef CPP_SPEC
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE} %{pthread:-D_REENTRANT}"

 #undef CC1_SPEC
 #define CC1_SPEC "%(cc1_cpu)"

Reply to: