Description: Link gnatcoll with pthread to circumvent #760211.
 On armel armhf hurd-i386 kfreebsd-amd64 s390x, inlining of
 Ada.Task_Attributes creates a direct dependency to the
 pthread_getspecific symbol.
 With --as-needed, -lpthread has no other effect than fixing the link
 stage for buggy architectures.
Author: Nicolas Boulenguez <nicolas@debian.org>
Bug-Debian: https://bugs.debian.org/760211
Forwarded: no

--- a/src/gnatcoll__copy.gpr
+++ b/src/gnatcoll__copy.gpr
@@ -12,7 +12,8 @@
    for Library_Version use
       "lib" & Project'Library_Name
       & GnatColl_Shared.So_Ext & "." & GnatColl_Shared.Gnatcoll_Version;
-   for Library_Options use GnatColl_Shared.Rss_Libs;
+   --  See #760211 for -lpthread, only used if needed because of --as-needed.
+   for Library_Options use GnatColl_Shared.Rss_Libs & ("-lpthread");
 
    case Gnatcoll_Shared.Projects is
       when "yes" =>
--- a/src/gnatcoll__gnat_util.gpr
+++ b/src/gnatcoll__gnat_util.gpr
@@ -16,7 +16,8 @@
    for Library_Version use
       "lib" & Project'Library_Name
       & GnatColl_Shared.So_Ext & "." & GnatColl_Shared.Gnatcoll_Version;
-   for Library_Options use GnatColl_Shared.Rss_Libs;
+   --  See #760211 for -lpthread, only used if needed because of --as-needed.
+   for Library_Options use GnatColl_Shared.Rss_Libs & ("-lpthread");
 
    case Gnatcoll_Shared.Projects is
       when "yes" =>
