public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD
@ 2015-03-10 19:23 Jonathan Wakely
  2015-03-10 19:55 ` Jeff Law
  2015-03-10 19:55 ` John Marino
  0 siblings, 2 replies; 9+ messages in thread
From: Jonathan Wakely @ 2015-03-10 19:23 UTC (permalink / raw)
  To: libstdc++, gcc-patches; +Cc: John Marino

It has just occurred to me we might want to make this change for GCC5:


diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 1727140..0b8c0f0 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1219,11 +1219,11 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
           ac_has_clock_realtime=yes
         fi
         ac_has_nanosleep=yes
         ac_has_sched_yield=yes
         ;;
-      freebsd*|netbsd*)
+      freebsd*|netbsd*|dragonfly*)
         ac_has_clock_monotonic=yes
         ac_has_clock_realtime=yes
         ac_has_nanosleep=yes
         ac_has_sched_yield=yes
         ;;


We could make this change post-GCC5 but as the dragonfly target is new
for GCC5 it would be a shame to release it with a sub-optimal
resolution for clocks and thread sleeping.

John, assuming I'm right that dragonfly supports all these features,
could you test this change?  (You'll need the same change on line
19555 of the libstdc++-v3/configure script.)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD
  2015-03-10 19:23 [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD Jonathan Wakely
@ 2015-03-10 19:55 ` Jeff Law
  2015-03-10 19:55 ` John Marino
  1 sibling, 0 replies; 9+ messages in thread
From: Jeff Law @ 2015-03-10 19:55 UTC (permalink / raw)
  To: Jonathan Wakely, libstdc++, gcc-patches; +Cc: John Marino

On 03/10/15 13:23, Jonathan Wakely wrote:
> It has just occurred to me we might want to make this change for GCC5:
>
>
> diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
> index 1727140..0b8c0f0 100644
> --- a/libstdc++-v3/acinclude.m4
> +++ b/libstdc++-v3/acinclude.m4
> @@ -1219,11 +1219,11 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
>            ac_has_clock_realtime=yes
>          fi
>          ac_has_nanosleep=yes
>          ac_has_sched_yield=yes
>          ;;
> -      freebsd*|netbsd*)
> +      freebsd*|netbsd*|dragonfly*)
>          ac_has_clock_monotonic=yes
>          ac_has_clock_realtime=yes
>          ac_has_nanosleep=yes
>          ac_has_sched_yield=yes
>          ;;
>
>
> We could make this change post-GCC5 but as the dragonfly target is new
> for GCC5 it would be a shame to release it with a sub-optimal
> resolution for clocks and thread sleeping.
>
> John, assuming I'm right that dragonfly supports all these features,
> could you test this change?  (You'll need the same change on line
> 19555 of the libstdc++-v3/configure script.)
Given the narrow scope for potential breakage, it seems fine to me.

jeff

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD
  2015-03-10 19:23 [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD Jonathan Wakely
  2015-03-10 19:55 ` Jeff Law
@ 2015-03-10 19:55 ` John Marino
  2015-03-10 20:18   ` Jonathan Wakely
  1 sibling, 1 reply; 9+ messages in thread
From: John Marino @ 2015-03-10 19:55 UTC (permalink / raw)
  To: Jonathan Wakely, libstdc++, gcc-patches

On 3/10/2015 20:23, Jonathan Wakely wrote:
> It has just occurred to me we might want to make this change for GCC5:
> 
> 
> diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
> index 1727140..0b8c0f0 100644
> --- a/libstdc++-v3/acinclude.m4
> +++ b/libstdc++-v3/acinclude.m4
> @@ -1219,11 +1219,11 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
>           ac_has_clock_realtime=yes
>         fi
>         ac_has_nanosleep=yes
>         ac_has_sched_yield=yes
>         ;;
> -      freebsd*|netbsd*)
> +      freebsd*|netbsd*|dragonfly*)
>         ac_has_clock_monotonic=yes
>         ac_has_clock_realtime=yes
>         ac_has_nanosleep=yes
>         ac_has_sched_yield=yes
>         ;;
> 
> 
> We could make this change post-GCC5 but as the dragonfly target is new
> for GCC5 it would be a shame to release it with a sub-optimal
> resolution for clocks and thread sleeping.
> 
> John, assuming I'm right that dragonfly supports all these features,
> could you test this change?  (You'll need the same change on line
> 19555 of the libstdc++-v3/configure script.)
> 

Sure, I can test it.  How can I tell if the result is successful?
Successful build versus failed build?

Thanks,
John


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD
  2015-03-10 19:55 ` John Marino
@ 2015-03-10 20:18   ` Jonathan Wakely
  2015-03-10 22:04     ` John Marino
  2015-03-13 11:02     ` Jonathan Wakely
  0 siblings, 2 replies; 9+ messages in thread
From: Jonathan Wakely @ 2015-03-10 20:18 UTC (permalink / raw)
  To: John Marino; +Cc: libstdc++, gcc-patches

On 10/03/15 20:55 +0100, John Marino wrote:
>On 3/10/2015 20:23, Jonathan Wakely wrote:
>> John, assuming I'm right that dragonfly supports all these features,
>> could you test this change?  (You'll need the same change on line
>> 19555 of the libstdc++-v3/configure script.)
>>
>
>Sure, I can test it.  How can I tell if the result is successful?
>Successful build versus failed build?

Yes, that should be enough. If any of sched_yield(), nanosleep(),
clock_gettime() etc. is missing you'll get a build failure.

I'll do a full testsuite run (bootstrap and 'make check') on dragonfly
before committing, but I'll need some time to resurrect the dragonfly
VM I was using previously.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD
  2015-03-10 20:18   ` Jonathan Wakely
@ 2015-03-10 22:04     ` John Marino
  2015-03-13  8:50       ` John Marino
  2015-03-13 11:02     ` Jonathan Wakely
  1 sibling, 1 reply; 9+ messages in thread
From: John Marino @ 2015-03-10 22:04 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches

On 3/10/2015 21:18, Jonathan Wakely wrote:
> On 10/03/15 20:55 +0100, John Marino wrote:
>> On 3/10/2015 20:23, Jonathan Wakely wrote:
>>> John, assuming I'm right that dragonfly supports all these features,
>>> could you test this change?  (You'll need the same change on line
>>> 19555 of the libstdc++-v3/configure script.)
>>>
>>
>> Sure, I can test it.  How can I tell if the result is successful?
>> Successful build versus failed build?
> 
> Yes, that should be enough. If any of sched_yield(), nanosleep(),
> clock_gettime() etc. is missing you'll get a build failure.
> 
> I'll do a full testsuite run (bootstrap and 'make check') on dragonfly
> before committing, but I'll need some time to resurrect the dragonfly
> VM I was using previously.

Hi Jonathan,
gcc 5 built fine on DragonFly with your patch:
http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/20150310_142205/logs/gcc5-5.0.s20150308.log

Regards,
John

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD
  2015-03-10 22:04     ` John Marino
@ 2015-03-13  8:50       ` John Marino
  2015-03-13 10:24         ` Jonathan Wakely
  0 siblings, 1 reply; 9+ messages in thread
From: John Marino @ 2015-03-13  8:50 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches

On 3/10/2015 23:04, John Marino wrote:
> On 3/10/2015 21:18, Jonathan Wakely wrote:
>> On 10/03/15 20:55 +0100, John Marino wrote:
>>> On 3/10/2015 20:23, Jonathan Wakely wrote:
>>>> John, assuming I'm right that dragonfly supports all these features,
>>>> could you test this change?  (You'll need the same change on line
>>>> 19555 of the libstdc++-v3/configure script.)
>>>>
>>>
>>> Sure, I can test it.  How can I tell if the result is successful?
>>> Successful build versus failed build?
>>
>> Yes, that should be enough. If any of sched_yield(), nanosleep(),
>> clock_gettime() etc. is missing you'll get a build failure.
>>
>> I'll do a full testsuite run (bootstrap and 'make check') on dragonfly
>> before committing, but I'll need some time to resurrect the dragonfly
>> VM I was using previously.
> 
> Hi Jonathan,
> gcc 5 built fine on DragonFly with your patch:
> http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/20150310_142205/logs/gcc5-5.0.s20150308.log
> 

Hi Jonathan,
Today I build gcc5 and looked at the config.h contained in
libstdc++-v3's build directory and none of those variables are enabled.

The code that is patched doesn't seem to do anything.  I grepped the
entire build directory for "libstdcxx_time" and got no results.

I don't have "--enable-libstdcxx-time" set as a configure argument.  So
I am thinking somehow this configuration check got skipped completely.

John





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD
  2015-03-13  8:50       ` John Marino
@ 2015-03-13 10:24         ` Jonathan Wakely
  2015-03-13 10:26           ` John Marino
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Wakely @ 2015-03-13 10:24 UTC (permalink / raw)
  To: John Marino; +Cc: Jonathan Wakely, libstdc++, gcc-patches

On 13 March 2015 at 08:50, John Marino wrote:
> Hi Jonathan,
> Today I build gcc5 and looked at the config.h contained in
> libstdc++-v3's build directory and none of those variables are enabled.
>
> The code that is patched doesn't seem to do anything.  I grepped the
> entire build directory for "libstdcxx_time" and got no results.
>
> I don't have "--enable-libstdcxx-time" set as a configure argument.  So
> I am thinking somehow this configuration check got skipped completely.

Hi John,

The variables cause additional checks to be run in configure, which
then result in these macros in c++config.h


/* Defined if clock_gettime has monotonic clock support. */
#define _GLIBCXX_USE_CLOCK_MONOTONIC 1

/* Defined if clock_gettime has realtime clock support. */
#define _GLIBCXX_USE_CLOCK_REALTIME 1

and

/* Defined if nanosleep is available. */
#define _GLIBCXX_USE_NANOSLEEP 1

and

/* Defined if sched_yield is available. */
#define _GLIBCXX_USE_SCHED_YIELD 1

I see these defined in
include/x86_64-unknown-dragonfly3.6/bits/c++config.h and I also see
previously UNSUPPORTED tests now PASS, so I think it's working.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD
  2015-03-13 10:24         ` Jonathan Wakely
@ 2015-03-13 10:26           ` John Marino
  0 siblings, 0 replies; 9+ messages in thread
From: John Marino @ 2015-03-13 10:26 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Jonathan Wakely, libstdc++, gcc-patches

On 3/13/2015 11:23, Jonathan Wakely wrote:
> On 13 March 2015 at 08:50, John Marino wrote:
>> Hi Jonathan,
>> Today I build gcc5 and looked at the config.h contained in
>> libstdc++-v3's build directory and none of those variables are enabled.
>>
>> The code that is patched doesn't seem to do anything.  I grepped the
>> entire build directory for "libstdcxx_time" and got no results.
>>
>> I don't have "--enable-libstdcxx-time" set as a configure argument.  So
>> I am thinking somehow this configuration check got skipped completely.
> 
> Hi John,
> 
> The variables cause additional checks to be run in configure, which
> then result in these macros in c++config.h

Okay. I guess I was just looking at the wrong config file then.
Thanks for sorting out that confusion!
John

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD
  2015-03-10 20:18   ` Jonathan Wakely
  2015-03-10 22:04     ` John Marino
@ 2015-03-13 11:02     ` Jonathan Wakely
  1 sibling, 0 replies; 9+ messages in thread
From: Jonathan Wakely @ 2015-03-13 11:02 UTC (permalink / raw)
  To: John Marino; +Cc: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

On 10/03/15 20:18 +0000, Jonathan Wakely wrote:
>On 10/03/15 20:55 +0100, John Marino wrote:
>>On 3/10/2015 20:23, Jonathan Wakely wrote:
>>>John, assuming I'm right that dragonfly supports all these features,
>>>could you test this change?  (You'll need the same change on line
>>>19555 of the libstdc++-v3/configure script.)
>>>
>>
>>Sure, I can test it.  How can I tell if the result is successful?
>>Successful build versus failed build?
>
>Yes, that should be enough. If any of sched_yield(), nanosleep(),
>clock_gettime() etc. is missing you'll get a build failure.
>
>I'll do a full testsuite run (bootstrap and 'make check') on dragonfly
>before committing, but I'll need some time to resurrect the dragonfly
>VM I was using previously.

I've done that testing and committed it to trunk now.


[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 1147 bytes --]

commit 16ed217e6b129861980c7f7c92964203708684e5
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Mar 12 13:20:06 2015 +0000

    	* acinclude.m4: Make --enable-libstdcxx-time=auto work for dragonfly.
    	* configure: Regenerate.

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 1727140..0b8c0f0 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1221,7 +1221,7 @@ AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
         ac_has_nanosleep=yes
         ac_has_sched_yield=yes
         ;;
-      freebsd*|netbsd*)
+      freebsd*|netbsd*|dragonfly*)
         ac_has_clock_monotonic=yes
         ac_has_clock_realtime=yes
         ac_has_nanosleep=yes
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index acd8c60..bcdb931 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -19551,7 +19551,7 @@ $as_echo "$glibcxx_glibc217" >&6; }
         ac_has_nanosleep=yes
         ac_has_sched_yield=yes
         ;;
-      freebsd*|netbsd*)
+      freebsd*|netbsd*|dragonfly*)
         ac_has_clock_monotonic=yes
         ac_has_clock_realtime=yes
         ac_has_nanosleep=yes

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-13 11:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10 19:23 [patch] Use --enable-libstdcxx-time=yes on DragonFly BSD Jonathan Wakely
2015-03-10 19:55 ` Jeff Law
2015-03-10 19:55 ` John Marino
2015-03-10 20:18   ` Jonathan Wakely
2015-03-10 22:04     ` John Marino
2015-03-13  8:50       ` John Marino
2015-03-13 10:24         ` Jonathan Wakely
2015-03-13 10:26           ` John Marino
2015-03-13 11:02     ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).