This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/49940] New: [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"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49940

           Summary: [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"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ludovic@ludovic-brenta.org
              Host: x86_64-pc-kfreebsd-gnu
            Target: x86_64-pc-kfreebsd-gnu
             Build: x86_64-pc-kfreebsd-gnu


(Forwarding http://bugs.debian.org/636291)

In the build logs at
https://buildd.debian.org/status/fetch.php?pkg=gnat-4.6&arch=kfreebsd-amd64&ver=4.6.1-2&stamp=1311435165
we see:

/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 the first error to the following commit:

    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.  (Note
that s-taprop-posix.adb also calls lwp_self).

I am not sure what to do: 

* introduce a new file s-taprop-kfreebsd-gnu.adb?
* provide the function __gnat_lwp_self also on kfreebsd-* and import it in
s-osinte-kfreebsd-gnu.ads?

-- 
Ludovic Brenta.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]