From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25761 invoked by alias); 13 Mar 2012 10:05:56 -0000 Received: (qmail 25749 invoked by uid 22791); 13 Mar 2012 10:05:55 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Mar 2012 10:05:40 +0000 Received: by ggcy3 with SMTP id y3so342085ggc.20 for ; Tue, 13 Mar 2012 03:05:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.181.132 with SMTP id dw4mr3449642igc.62.1331633139727; Tue, 13 Mar 2012 03:05:39 -0700 (PDT) Received: by 10.42.222.194 with HTTP; Tue, 13 Mar 2012 03:05:39 -0700 (PDT) In-Reply-To: References: Date: Tue, 13 Mar 2012 10:05:00 -0000 Message-ID: Subject: Re: [PATCH] Fix PR49484, gthr requirements update (target maintainers have a looksee) From: Richard Guenther To: Gerald Pfeifer Cc: gcc-patches@gcc.gnu.org, Ian Lance Taylor Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg00899.txt.bz2 On Tue, Mar 13, 2012 at 10:44 AM, Richard Guenther wrote: > On Mon, Mar 12, 2012 at 6:44 PM, Gerald Pfeifer wrot= e: >> On Mon, 12 Mar 2012, Richard Guenther wrote: >>>>> 2012-01-18 =A0Richard Guenther =A0 >>>>> >>>>> =A0 =A0 =A0 =A0* gthr.h (__GTHREAD_MUTEX_INIT_FUNCTION): Adjust speci= fication. >>>>> =A0 =A0 =A0 =A0* gthr-posix.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define. >>>>> =A0 =A0 =A0 =A0(__gthread_mutex_init_function): New function. >>>>> =A0 =A0 =A0 =A0* gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Defin= e. >>>>> >>>>> =A0 =A0 =A0 =A0PR gcov/49484 >>>>> =A0 =A0 =A0 =A0* libgcov.c: Include gthr.h. >>>>> =A0 =A0 =A0 =A0(__gcov_flush_mx): New global variable. >>>>> =A0 =A0 =A0 =A0(init_mx, init_mx_once): New functions. >>>>> =A0 =A0 =A0 =A0(__gcov_flush): Protect self with a mutex. >>>>> =A0 =A0 =A0 =A0(__gcov_fork): Re-initialize mutex after forking. >>>>> =A0 =A0 =A0 =A0* unwind-dw2-fde.c: Change condition under which to use >>>>> =A0 =A0 =A0 =A0__GTHREAD_MUTEX_INIT_FUNCTION. >> >> Richi, I'm afraid this caused the following on i386-unknown-freebsd10? >> >> /scratch2/tmp/gerald/gcc-HEAD/libgcc/libgcov.c:710:54: error: 'NULL' und= eclared here (not in a function) >> gmake[3]: *** [_gcov.o] Error 1 >> gmake[3]: *** Waiting for unfinished jobs.... >> gmake[3]: Leaving directory `/scratch2/tmp/gerald/OBJ-0312-1454/i386-unk= nown-freebsd10.0/libgcc' >> gmake[2]: *** [all-stage1-target-libgcc] Error 2 > > This is > > #ifdef __GTHREAD_MUTEX_INIT > ATTRIBUTE_HIDDEN __gthread_mutex_t __gcov_flush_mx =3D __GTHREAD_MUTEX_IN= IT; > > thus if __GTHREAD_MUTEX_INIT uses NULL and gthr.h does not include > everything to make that initializer valid it is a freebsd header bug, unl= ess > it is > > #if defined(inhibit_libc) > #define IN_LIBGCOV (-1) > #else > #undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch. =A0*/ > #include > > wtf? =A0This is a target library, why is stdio.h not properly included > by tsystem.h? > It is. =A0Anyone remembers? Goes back to rev. 5880 by rms, at which time tsystem.h did not exist. I'm going to remove those two lines, bootstrap & test it and commit as obvious. Richard. > Can you verify that theory, thus remove that #undef and the #include? > > Richard. > >> Gerald