Re: [PATCH] Fix NetBSD bootstrap

2016-11-19 Thread Krister Walfridsson

On Thu, 17 Nov 2016, Joseph Myers wrote:


I'll presume you know best about the choices of stdint.h types.  You may
wish to consider what the correct value of use_gcc_stdint is - the
default "none" (rely on the system's header), or "wrap" (use GCC's header
in freestanding mode) or "provide" (always use GCC's header).


I committed the following to set it to "wrap" (which is consistent with 
how the other BSDs handle it).


Bootstrapped and tested on x86_64-unknown-netbsd6.1.

   /Krister


2016-11-19  Krister Walfridsson  

* config.gcc (*-*-netbsd): Set use_gcc_stdint=wrap.



Index: gcc/config.gcc
===
--- gcc/config.gcc  (revision 242620)
+++ gcc/config.gcc  (revision 242621)
@@ -768,6 +768,7 @@
   tmake_file="t-slibgcc"
   gas=yes
   gnu_ld=yes
+  use_gcc_stdint=wrap

   # NetBSD 2.0 and later get POSIX threads enabled by default.
   # Allow them to be explicitly enabled on any other version.


Re: [PATCH] Fix NetBSD bootstrap

2016-11-16 Thread Joseph Myers
I'll presume you know best about the choices of stdint.h types.  You may 
wish to consider what the correct value of use_gcc_stdint is - the 
default "none" (rely on the system's header), or "wrap" (use GCC's header 
in freestanding mode) or "provide" (always use GCC's header).

Note that GCC's header includes support for TS 18661-1 integer width 
macros, and the testsuite verifies these work in freestanding mode.  So if 
you use "none" but your system's header lacks support for these macros, 
you'll have test failures.

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: [PATCH] Fix NetBSD bootstrap

2016-11-16 Thread Mike Stump

> On Nov 16, 2016, at 11:23 AM, Krister Walfridsson 
>  wrote:
> 
> On Wed, 16 Nov 2016, Mike Stump wrote:
> 
>> Looks reasonable.  The biggest issue would be if any of those values changed 
>> through time, and the current version works for older netbsd releases, the 
>> patch could break them.  Of course, I don't have any visibility into how any 
>> of those values might have changed through time.
> 
> This should not be an issue in this case, so I'll commit the patch. Thanks!

Oh, I don't know if you are tracking release branches so that previous releases 
just work, but if you are, you can keep track of patches that would need to be 
back ported for a release branch to work nicely.  As you finish with getting 
things in shape, you can then go back and see about back porting that work, if 
you are interested in that.



Re: [PATCH] Fix NetBSD bootstrap

2016-11-16 Thread Krister Walfridsson

On Wed, 16 Nov 2016, Mike Stump wrote:

Looks reasonable.  The biggest issue would be if any of those values 
changed through time, and the current version works for older netbsd 
releases, the patch could break them.  Of course, I don't have any 
visibility into how any of those values might have changed through time.


This should not be an issue in this case, so I'll commit the patch. 
Thanks!


   /Krister


Re: [PATCH] Fix NetBSD bootstrap

2016-11-16 Thread Mike Stump

> On Nov 16, 2016, at 9:12 AM, Krister Walfridsson 
>  wrote:
> 
> NetBSD fails bootstrap with
>  stdatomic.h:55:17: error: unknown type name '__INT_LEAST8_TYPE__'
> This is fixed by the following patch (only i386 and x86_64 for now. I'll
> do the other ports after fixing some more issues -- the NetBSD support is
> rather broken at the moment...)
> 
> I'm the NetBSD maintainer, so I belive I don't need approval to commit this. 
> But I have been absent for a long time, so it makes sense for someone to 
> review at least this first patch.

Looks reasonable.  The biggest issue would be if any of those values changed 
through time, and the current version works for older netbsd releases, the 
patch could break them.  Of course, I don't have any visibility into how any of 
those values might have changed through time.



Re: [PATCH] Fix NetBSD bootstrap

2016-11-16 Thread Bernd Schmidt

On 11/16/2016 06:12 PM, Krister Walfridsson wrote:

I'm the NetBSD maintainer, so I belive I don't need approval to commit
this. But I have been absent for a long time, so it makes sense for
someone to review at least this first patch.

Bootstrapped and tested on i386-unknown-netbsdelf6.1 and
x86_64-unknown-netbsd6.1.

OK to commit?


I'll take the position that you know best and do not need approval from 
someone else.



Bernd