From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23092 invoked by alias); 27 Jan 2011 16:29:20 -0000 Received: (qmail 23068 invoked by uid 22791); 27 Jan 2011 16:29:17 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_BG,TW_IB,TW_PW,TW_TP,TW_WU 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; Thu, 27 Jan 2011 16:29:13 +0000 From: "ro at CeBiTec dot Uni-Bielefeld.DE" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47491] [4.6 Regression] libgfortran: getpwuid_r (for GETLOG) breaks bootstrapping X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at CeBiTec dot Uni-Bielefeld.DE X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 27 Jan 2011 16:43: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-01/txt/msg03002.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47491 --- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE 2011-01-27 16:28:39 UTC --- > --- Comment #2 from Janne Blomqvist 2011-01-27 16:10:41 UTC --- > Some git-grepping showed that at least libjava has in configure.ac > > AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Required define if using POSIX > threads]) > > and in case Boehm GC is not used (which libgfortran never uses): > > AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads]) > > However, if I understand gcc/config/ correctly, _REENTRANT should be > automatically set for all targets that need it. At least on Solaris (and I think on other targets as well), only with -pthread. > Also in gcc/config a few targets set > > -D_POSIX_C_SOURCE=199506L > > (not Solaris, though). But apparently we shouldn't go and set this somewhere in > libgfortran? That is, at least no other library does this.. That may not provide the best guidance. I'd rather look for autoconf and/or gnulib here. On Solaris, this may not be enough: starting with Solaris 10, there's POSIX.1-2001 support via -D_POSIX_C_SOURCE=200112L. > Moreover, in config/extensions.m4 there is the macro > > AC_USE_SYSTEM_EXTENSIONS > > that seems to define _POSIX_PTHREAD_SEMANTICS on Solaris. > > This seems to me the most sensible solution. Would that work? Seems so. At least I've just found that I need -D__EXTENSIONS__ in addition to -D_XOPEN_SOURCE=600 to get EIP defined in (needed by fpu-target.h). Rainer