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

Bug#636291: gnat-4.6: FTBFS on kfreebsd-* with s-taprop.adb:717:32: "lwp_self" is undefined

Package: src:gnat-4.6
Version: 4.6.1-1
Severity: serious
Tags: upstream

/build/buildd-gnat-4.6_4.6.1-2-kfreebsd-amd64-Jts3n3/gnat-4.6-4.6.1/build/./gcc/xgcc -B/build/buildd-gnat-4.6_4.6.1-2-kfreebsd-amd64-Jts3n3/gnat-4.6-4.6.1/build/./gcc/ -c -g -O2  -W -Wall -gnatpg  s-taprop.adb -o s-taprop.o
s-taprop.adb:717:32: "lwp_self" is undefined
s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)

I have traced this to the following commit:

commit a0d9619fa08b438aaeda58cb70100b803942e9fe
Author: charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed Apr 15 10:06:20 2009 +0000

    2009-04-15  Nicolas Roche  <roche@adacore.com>
    	* adaint.c: Add function __gnat_lwp_self that retrieves the LWP of the
    	current thread.
    	* s-osinte-linux.ads: Import the __gnat_lwp_self function as lwp_self
    	* s-taprop-linux.adb (Enter_Task): Store the LWP in the TCB
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146097 138bc75d-0d04-0410-961f-82ee72b054a4

The function __gnat_lwp_self exists in adaint.c only #if defined(linux),
so it may not apply to kfreebsd-*.  The problem exists because
kfreebsd-* uses s-osinte-kfreebsd-gnu.ads, which does not import the
function, but also uses s-taprop-linux.adb, which does use the function.

I am not sure what to do: either introduce a new file
s-taprop-kfreebsd-gnu.adb or provide the function __gnat_lwp_self also
on kfreebsd-* and import it in s-osinte-kfreebsd-gnu.ads.

Ludovic Brenta.

Reply to: