From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1534 invoked by alias); 2 Aug 2011 01:12:43 -0000 Received: (qmail 1520 invoked by uid 22791); 2 Aug 2011 01:12:42 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_SV X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Aug 2011 01:12:27 +0000 From: "ludovic@ludovic-brenta.org" To: gcc-bugs@gcc.gnu.org Subject: [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" X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ludovic@ludovic-brenta.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 02 Aug 2011 01:12:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg00118.txt.bz2 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 * 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.