public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PR ada/49940 [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:717:32: "lwp_self" is undefined"
@ 2011-08-02 10:23 Ludovic Brenta
  0 siblings, 0 replies; only message in thread
From: Ludovic Brenta @ 2011-08-02 10:23 UTC (permalink / raw)
  To: gcc-patches

I think the following fixes this PR; it consists only in duplicating a
few lines from s-osinte-freebsd.ads to s-osinte-kfreebsd-gnu.ads:

Index: b/src/gcc/ada/s-osinte-kfreebsd-gnu.ads
===================================================================
--- a/src/gcc/ada/s-osinte-kfreebsd-gnu.ads
+++ b/src/gcc/ada/s-osinte-kfreebsd-gnu.ads
@@ -238,6 +238,16 @@
    function getpid return pid_t;
    pragma Import (C, getpid, "getpid");
 
+   ---------
+   -- LWP --
+   ---------
+
+   function lwp_self return System.Address;
+   --  lwp_self does not exist on this thread library, revert to pthread_self
+   --  which is the closest approximation (with getpid). This function is
+   --  needed to share 7staprop.adb across POSIX-like targets.
+   pragma Import (C, lwp_self, "pthread_self");
+
    -------------
    -- Threads --
    -------------
Index: b/src/gcc/ada/ChangeLog
===================================================================
--- a/src/gcc/ada/ChangeLog
+++ b/src/gcc/ada/ChangeLog
@@ -0,0 +1,6 @@
+2011-08-02  Ludovic Brenta  <ludovic@ludovic-brenta.org>
+
+	PR ada/49940
+	* s-osinte-kfreebsd-gnu.ads (lwp_self): import pthread_self, as on
+	FreeBSD.
+




-- 
Ludovic Brenta.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-02 10:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-02 10:23 PR ada/49940 [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:717:32: "lwp_self" is undefined" Ludovic Brenta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).