Description: link with pthread on some architectures
Bug-Debian: https://bugs.debian.org/760211
Author: Nicolas Boulenguez <nicolas@debian.org>

--- a/sql/gnatcoll_sql.gpr
+++ b/sql/gnatcoll_sql.gpr
@@ -85,4 +85,17 @@
       for VCS_Kind use "Git";
    end Ide;
 
+   --  In Debian, we link with --as-needed so this only applies on
+   --  architectures affected by https://bugs.debian.org/760211.
+   Ldlibs := ("-lpthread");
+   case Library_Type is
+      when "relocatable" =>
+         for Library_Options use Ldlibs;
+      when others =>
+         null;
+   end case;
+   package Linker is
+      for Switches ("Ada") use Ldlibs;
+   end Linker;
+
 end GnatColl_SQL;
