From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1441 invoked by alias); 20 Dec 2012 12:59:26 -0000 Received: (qmail 1372 invoked by uid 48); 20 Dec 2012 12:59:09 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc Date: Thu, 20 Dec 2012 12:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 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: 2012-12/txt/msg01963.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741 --- Comment #6 from Jonathan Wakely 2012-12-20 12:59:08 UTC --- (In reply to comment #5) > (In reply to comment #4) > > The point of http://gcc.gnu.org/viewcvs?view=revision&revision=193769 was that > > std::this_thread::sleep_for() is always available, even without > > --enable-libstdcxx-time=yes, so the default configuration needs to bootstrap. > > Well, patch has one issue about used type. Sleep expects 'unsigned long' as > argument. Ah thanks, I didn't know what type DWORD is. > Rest of suggested patch works. Great, thanks. So if I change the type to unsigned long and commit it, can I say you tested it? I don't like committing changes I can't test myself! Or if you want to commit it then it's pre-approved by me. > The reason I mentioned --enable > option is that nanosleep isn't detected proper by configure test in case that > nanosleep is a function provided by POSIX-library pthread. This is the same on all platforms. I would like to revisit that for GCC 4.9 but for 4.8 I just want std::this_thread::sleep_for() to work, even if it uses a low resolution sleep function. The __sleep_for function is in the .so and takes units of seconds and nanoseconds, so if we enable nanosleep automatically in 4.9 then code compiled with 4.8 and linked to libstdc++.so from 4.9 will get the nanosleep-capable version of __sleep_for() without needing to be recompiled.