Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-18 Thread Maxime Villard

Le 17/10/2019 à 14:45, Maxime Villard a écrit :

Le 17/10/2019 à 14:07, Joerg Sonnenberger a écrit :

On Thu, Oct 17, 2019 at 12:43:48PM +0200, Rhialto wrote:

On Thu 17 Oct 2019 at 11:07:44 +0200, Maxime Villard wrote:

I guess we whould disable the messages on this particular file for now as
the others have suggested, and file a PR in LLVM/GCC, because apart from
a compiler bug I don't see what it could be.


The original error has no place in a freestanding build anyway, since
vfork (and longjmp probably too) are concepts of hosted implementations
only.


Yes and no. GCC has a hard-coded list of functions that always get the
returns_twice attribute. (v)fork is on that list, but also savectx. So
the fix is not to disable the warning, but rename the function.

Joerg


It appears that the savectx in this function is unused.

It copies %rsp and %rbp in pcb1, but nothing can be done with that. pcb1 gets
copied into pcb2, but pcb2->pcb_{rsp,rbp} get overwritten at the end of the
function.

So the savectx block can be dropped.


I've dropped it.


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-17 Thread Maxime Villard

Le 17/10/2019 à 14:07, Joerg Sonnenberger a écrit :

On Thu, Oct 17, 2019 at 12:43:48PM +0200, Rhialto wrote:

On Thu 17 Oct 2019 at 11:07:44 +0200, Maxime Villard wrote:

I guess we whould disable the messages on this particular file for now as
the others have suggested, and file a PR in LLVM/GCC, because apart from
a compiler bug I don't see what it could be.


The original error has no place in a freestanding build anyway, since
vfork (and longjmp probably too) are concepts of hosted implementations
only.


Yes and no. GCC has a hard-coded list of functions that always get the
returns_twice attribute. (v)fork is on that list, but also savectx. So
the fix is not to disable the warning, but rename the function.

Joerg


It appears that the savectx in this function is unused.

It copies %rsp and %rbp in pcb1, but nothing can be done with that. pcb1 gets
copied into pcb2, but pcb2->pcb_{rsp,rbp} get overwritten at the end of the
function.

So the savectx block can be dropped.


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-17 Thread Joerg Sonnenberger
On Thu, Oct 17, 2019 at 12:43:48PM +0200, Rhialto wrote:
> On Thu 17 Oct 2019 at 11:07:44 +0200, Maxime Villard wrote:
> > I guess we whould disable the messages on this particular file for now as
> > the others have suggested, and file a PR in LLVM/GCC, because apart from
> > a compiler bug I don't see what it could be.
> 
> The original error has no place in a freestanding build anyway, since
> vfork (and longjmp probably too) are concepts of hosted implementations
> only.

Yes and no. GCC has a hard-coded list of functions that always get the
returns_twice attribute. (v)fork is on that list, but also savectx. So
the fix is not to disable the warning, but rename the function.

Joerg


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-17 Thread Rhialto
On Thu 17 Oct 2019 at 11:07:44 +0200, Maxime Villard wrote:
> I guess we whould disable the messages on this particular file for now as
> the others have suggested, and file a PR in LLVM/GCC, because apart from
> a compiler bug I don't see what it could be.

The original error has no place in a freestanding build anyway, since
vfork (and longjmp probably too) are concepts of hosted implementations
only.

-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.   --Douglas Adams, "THGTTG"


signature.asc
Description: PGP signature


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-17 Thread Maxime Villard

I guess we whould disable the messages on this particular file for now as
the others have suggested, and file a PR in LLVM/GCC, because apart from
a compiler bug I don't see what it could be.

Le 17/10/2019 à 09:22, J. Hannken-Illjes a écrit :

Any chance we can build x86 kernels without DIAGNOSTIC again?

Does it need a PR?

--
J. Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig




On 15. Oct 2019, at 17:56, John D. Baker  wrote:

On Tue, 15 Oct 2019, Ryo ONODERA wrote:


If the problem is the compiler bug, the patch like the following
may be effective.



[snip]


I applied a similar change for i386 and with it the stock NET4501
config (w/"options DIAGNOSTIC" commented out) builds successfully.

+Index: sys/arch/i386/conf/Makefile.i386
+===
+RCS file: /cvsroot/src/sys/arch/i386/conf/Makefile.i386,v
+retrieving revision 1.194
+diff -u -p -r1.194 Makefile.i386
+--- sys/arch/i386/conf/Makefile.i38622 Sep 2018 12:24:02 -  1.194
 sys/arch/i386/conf/Makefile.i38615 Oct 2019 15:52:05 -
+@@ -44,6 +44,7 @@ CFLAGS+=  -mno-mmx -mno-sse -mno-avx
+ CFLAGS+=   -mindirect-branch=thunk
+ CFLAGS+=   -mindirect-branch-register
+ .endif
++COPTS.vm_machdep.c+=   -Wno-error=clobbered
+
+ ##
+ ## (3) libkern and compat




--
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645




Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-17 Thread J. Hannken-Illjes
Any chance we can build x86 kernels without DIAGNOSTIC again?

Does it need a PR?

--
J. Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig



> On 15. Oct 2019, at 17:56, John D. Baker  wrote:
> 
> On Tue, 15 Oct 2019, Ryo ONODERA wrote:
> 
>> If the problem is the compiler bug, the patch like the following
>> may be effective.
> 
>> [snip]
> 
> I applied a similar change for i386 and with it the stock NET4501
> config (w/"options DIAGNOSTIC" commented out) builds successfully.
> 
> +Index: sys/arch/i386/conf/Makefile.i386
> +===
> +RCS file: /cvsroot/src/sys/arch/i386/conf/Makefile.i386,v
> +retrieving revision 1.194
> +diff -u -p -r1.194 Makefile.i386
> +--- sys/arch/i386/conf/Makefile.i38622 Sep 2018 12:24:02 -  1.194
>  sys/arch/i386/conf/Makefile.i38615 Oct 2019 15:52:05 -
> +@@ -44,6 +44,7 @@ CFLAGS+=  -mno-mmx -mno-sse -mno-avx
> + CFLAGS+=   -mindirect-branch=thunk
> + CFLAGS+=   -mindirect-branch-register
> + .endif
> ++COPTS.vm_machdep.c+=   -Wno-error=clobbered
> +
> + ##
> + ## (3) libkern and compat
> 
> 
> 
> 
> --
> |/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
> |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
> | X  No HTML/proprietary data in email.   BSD just sits there and works!
> |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



signature.asc
Description: Message signed with OpenPGP


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-15 Thread John D. Baker
On Tue, 15 Oct 2019, Ryo ONODERA wrote:

> If the problem is the compiler bug, the patch like the following
> may be effective.

> [snip]

I applied a similar change for i386 and with it the stock NET4501
config (w/"options DIAGNOSTIC" commented out) builds successfully.

+Index: sys/arch/i386/conf/Makefile.i386
+===
+RCS file: /cvsroot/src/sys/arch/i386/conf/Makefile.i386,v
+retrieving revision 1.194
+diff -u -p -r1.194 Makefile.i386
+--- sys/arch/i386/conf/Makefile.i38622 Sep 2018 12:24:02 -  1.194
 sys/arch/i386/conf/Makefile.i38615 Oct 2019 15:52:05 -
+@@ -44,6 +44,7 @@ CFLAGS+=  -mno-mmx -mno-sse -mno-avx
+ CFLAGS+=   -mindirect-branch=thunk
+ CFLAGS+=   -mindirect-branch-register
+ .endif
++COPTS.vm_machdep.c+=   -Wno-error=clobbered
+ 
+ ##
+ ## (3) libkern and compat




-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-15 Thread Ryo ONODERA
Hi,

Maxime Villard  writes:

> I don't understand what this error means. There is nothing related to
> longjmp in this code or any code I've touched, and the FPU code does
> not rely on that. As well I don't see what difference SVS could make
> since it doesn't rely on that either.
>
> No idea, looks like a compiler bug.

If the problem is the compiler bug, the patch like the following
may be effective.

Index: sys/arch/amd64/conf/Makefile.amd64
===
RCS file: /cvsroot/src/sys/arch/amd64/conf/Makefile.amd64,v
retrieving revision 1.78
diff -u -r1.78 Makefile.amd64
--- sys/arch/amd64/conf/Makefile.amd64  7 Sep 2019 18:56:01 -   1.78
+++ sys/arch/amd64/conf/Makefile.amd64  15 Oct 2019 08:35:44 -
@@ -59,6 +59,7 @@
 .endfor
 CFLAGS+=   ${KASANFLAGS.${.IMPSRC:T}:U${KASANFLAGS}}
 .endif
+COPTS.vm_machdep.c+=   -Wno-error=clobbered
 
 ##
 ## (3) libkern and compat


-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-14 Thread John D. Baker
On Mon, 14 Oct 2019, Patrick Welche wrote:

> On Sun, Oct 13, 2019 at 04:31:08PM -0500, John D. Baker wrote:
> > Building the NET4501 kernel with 9.99.17 sources fails with:
> > 
> > /x/current/src/sys/arch/x86/x86/vm_machdep.c: In function 'cpu_lwp_fork':
> > /x/current/src/sys/arch/x86/x86/vm_machdep.c:134:21: error: variable 'pcb2' 
> > might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
> >   struct pcb *pcb1, *pcb2;
> 
> I can reproduce this on amd64 with:
> 
> include "arch/amd64/conf/GENERIC"
> no options  DIAGNOSTIC

And un-commenting "options DIAGNOSTIC" in the "NET4501" config file
allows it to build.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-14 Thread Lars Reichardt
On Mon, 14 Oct 2019 10:31:08 +0100
Patrick Welche  wrote:

> On Sun, Oct 13, 2019 at 04:31:08PM -0500, John D. Baker wrote:
> > Building the NET4501 kernel with 9.99.17 sources fails with:
> > 
> > [...]
> > #   compile  NET4501/vm_machdep.o
> > /r0/build/current/tools/amd64/bin/i486--netbsdelf-gcc -msoft-float
> > -mno-mmx -mno-sse -mno-avx -ffreestanding
> > -fno-zero-initialized-in-bss -fno-delete-null-pointer-checks -g -Os
> > -fstack-protector -Wstack-protector --param ssp-buffer-size=1
> > -fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wall -Wno-main
> > -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes
> > -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow
> > -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign
> > -Wno-attributes -Wextra -Wno-unused-parameter
> > -Wold-style-definition -Wno-sign-compare
> > --sysroot=/r0/build/current/DEST/i386 -Di386 -I.
> > -I/x/current/src/sys/external/bsd/acpica/dist
> > -I/x/current/src/sys/external/bsd/libnv/dist
> > -I/x/current/src/sys/../common/lib/libx86emu
> > -I/x/current/src/sys/../common/lib/libc/misc
> > -I/x/current/src/sys/../common/include -I/x/current/src/sys/arch
> > -I/x/current/src/sys -nostdinc -DCOMPAT_UTILS -DTIMER_FREQ=1189200
> > -DCOMPAT_44 -D_KERNEL -D_KERNEL_OPT -std=gnu99
> > -I/x/current/src/sys/lib/libkern/../../../common/lib/libc/quad
> > -I/x/current/src/sys/lib/libkern/../../../common/lib/libc/string
> > -I/x/current/src/sys/lib/libkern/../../../common/lib/libc/arch/i386/string
> > -D_FORTIFY_SOURCE=2
> > -I/x/current/src/sys/external/isc/atheros_hal/dist
> > -I/x/current/src/sys/external/isc/atheros_hal/ic
> > -I/x/current/src/sys/external/bsd/libnv/dist -c
> > /x/current/src/sys/arch/x86/x86/vm_machdep.c -o vm_machdep.o
> > /x/current/src/sys/arch/x86/x86/vm_machdep.c: In function
> > 'cpu_lwp_fork':
> > /x/current/src/sys/arch/x86/x86/vm_machdep.c:134:21: error:
> > variable 'pcb2' might be clobbered by 'longjmp' or 'vfork'
> > [-Werror=clobbered] struct pcb *pcb1, *pcb2;  
> 
> I can reproduce this on amd64 with:
> 
> include "arch/amd64/conf/GENERIC"
> no options  DIAGNOSTIC
> 
> 
> Cheers,
> 
> Patrick

I've seen that aswell, I can't see anything wrong here.
Maybe the compilers check is missguided by fpu_lwp_fork accessing pcb
inderectly via l1/l2 and not directly like in the old code?

para


-
You will continue to suffer
if you have an emotional reaction to everything that is said to you.
True power is sitting back and observing everything with logic.
If words control you that means everyone else can control you.
Breathe and allow things to pass.

--- Bruce Lee



Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-14 Thread Patrick Welche
On Sun, Oct 13, 2019 at 04:31:08PM -0500, John D. Baker wrote:
> Building the NET4501 kernel with 9.99.17 sources fails with:
> 
> [...]
> #   compile  NET4501/vm_machdep.o
> /r0/build/current/tools/amd64/bin/i486--netbsdelf-gcc -msoft-float -mno-mmx 
> -mno-sse -mno-avx -ffreestanding -fno-zero-initialized-in-bss 
> -fno-delete-null-pointer-checks -g -Os -fstack-protector -Wstack-protector 
> --param ssp-buffer-size=1 -fno-strict-aliasing -fno-common -std=gnu99 -Werror 
> -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
> -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual 
> -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes 
> -Wextra -Wno-unused-parameter -Wold-style-definition -Wno-sign-compare 
> --sysroot=/r0/build/current/DEST/i386 -Di386 -I. 
> -I/x/current/src/sys/external/bsd/acpica/dist 
> -I/x/current/src/sys/external/bsd/libnv/dist 
> -I/x/current/src/sys/../common/lib/libx86emu 
> -I/x/current/src/sys/../common/lib/libc/misc 
> -I/x/current/src/sys/../common/include -I/x/current/src/sys/arch 
> -I/x/current/src/sys -nostdinc -DCOMPAT_UTILS -DTIMER_FREQ=1189200 
> -DCOMPAT_44 -D_KERNEL -D_KERNEL_OPT -std=gnu99 
> -I/x/current/src/sys/lib/libkern/../../../common/lib/libc/quad 
> -I/x/current/src/sys/lib/libkern/../../../common/lib/libc/string 
> -I/x/current/src/sys/lib/libkern/../../../common/lib/libc/arch/i386/string 
> -D_FORTIFY_SOURCE=2 -I/x/current/src/sys/external/isc/atheros_hal/dist 
> -I/x/current/src/sys/external/isc/atheros_hal/ic 
> -I/x/current/src/sys/external/bsd/libnv/dist -c 
> /x/current/src/sys/arch/x86/x86/vm_machdep.c -o vm_machdep.o
> /x/current/src/sys/arch/x86/x86/vm_machdep.c: In function 'cpu_lwp_fork':
> /x/current/src/sys/arch/x86/x86/vm_machdep.c:134:21: error: variable 'pcb2' 
> might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
>   struct pcb *pcb1, *pcb2;

I can reproduce this on amd64 with:

include "arch/amd64/conf/GENERIC"
no options  DIAGNOSTIC


Cheers,

Patrick


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-13 Thread Maxime Villard

Le 14/10/2019 à 01:01, Chavdar Ivanov a écrit :

My amd64 build also failed with
...
src/tests/lib/libnvmm/h_mem_assist.c:178:2: error: missing initializer
for field 'off' of 'const struct test'
[-Werror=missing-field-initializers]
...
(and many more).


Ah yes, I was doing local builds of it, not the in-src ones.


On Sun, 13 Oct 2019 at 23:48, matthew green  wrote:


Robert Swindells writes:


"John D. Baker" 

Building the NET4501 kernel with 9.99.17 sources fails with:

/x/current/src/sys/arch/x86/x86/vm_machdep.c: In function 'cpu_lwp_fork':
/x/current/src/sys/arch/x86/x86/vm_machdep.c:134:21: error: variable 'pcb2' 
might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  struct pcb *pcb1, *pcb2;
 ^~~~


My custom amd64 kernels fail too, there was a failure report from
someone else but it doesn't seem to be in the archive yet.

The amd64 GENERIC config does build though.


i don't know what is up yet, but maxv changed this file recently.
i wonder if there was/is something special about either SVS here,
or fpu_lwp_fork() it's triggering on.  i don't see any attributes
that should apply here.. guessing SVS as it is the only conditional
compile there that should matter, but i still don't see anything
that actually points to it.

Maxime?


I don't understand what this error means. There is nothing related to
longjmp in this code or any code I've touched, and the FPU code does
not rely on that. As well I don't see what difference SVS could make
since it doesn't rely on that either.

No idea, looks like a compiler bug.


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-13 Thread Thomas Klausner
Christos committed a fix for this one.
 Thomas

On Mon, Oct 14, 2019 at 12:01:51AM +0100, Chavdar Ivanov wrote:
> My amd64 build also failed with
> ...
> src/tests/lib/libnvmm/h_mem_assist.c:178:2: error: missing initializer
> for field 'off' of 'const struct test'
> [-Werror=missing-field-initializers]
> ...
> (and many more).
> 
> On Sun, 13 Oct 2019 at 23:48, matthew green  wrote:
> >
> > Robert Swindells writes:
> > >
> > > "John D. Baker" 
> > > >Building the NET4501 kernel with 9.99.17 sources fails with:
> > > >
> > > >/x/current/src/sys/arch/x86/x86/vm_machdep.c: In function 'cpu_lwp_fork':
> > > >/x/current/src/sys/arch/x86/x86/vm_machdep.c:134:21: error: variable 
> > > >'pcb2' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
> > > >  struct pcb *pcb1, *pcb2;
> > > > ^~~~
> > >
> > > My custom amd64 kernels fail too, there was a failure report from
> > > someone else but it doesn't seem to be in the archive yet.
> > >
> > > The amd64 GENERIC config does build though.
> >
> > i don't know what is up yet, but maxv changed this file recently.
> > i wonder if there was/is something special about either SVS here,
> > or fpu_lwp_fork() it's triggering on.  i don't see any attributes
> > that should apply here.. guessing SVS as it is the only conditional
> > compile there that should matter, but i still don't see anything
> > that actually points to it.
> >
> > Maxime?
> >
> >
> > .mrg.
> 
> 
> 
> -- 
> 
> 


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-13 Thread Chavdar Ivanov
My amd64 build also failed with
...
src/tests/lib/libnvmm/h_mem_assist.c:178:2: error: missing initializer
for field 'off' of 'const struct test'
[-Werror=missing-field-initializers]
...
(and many more).

On Sun, 13 Oct 2019 at 23:48, matthew green  wrote:
>
> Robert Swindells writes:
> >
> > "John D. Baker" 
> > >Building the NET4501 kernel with 9.99.17 sources fails with:
> > >
> > >/x/current/src/sys/arch/x86/x86/vm_machdep.c: In function 'cpu_lwp_fork':
> > >/x/current/src/sys/arch/x86/x86/vm_machdep.c:134:21: error: variable 
> > >'pcb2' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
> > >  struct pcb *pcb1, *pcb2;
> > > ^~~~
> >
> > My custom amd64 kernels fail too, there was a failure report from
> > someone else but it doesn't seem to be in the archive yet.
> >
> > The amd64 GENERIC config does build though.
>
> i don't know what is up yet, but maxv changed this file recently.
> i wonder if there was/is something special about either SVS here,
> or fpu_lwp_fork() it's triggering on.  i don't see any attributes
> that should apply here.. guessing SVS as it is the only conditional
> compile there that should matter, but i still don't see anything
> that actually points to it.
>
> Maxime?
>
>
> .mrg.



-- 



re: i386 9.99.17 build fails for NET4501 kernel

2019-10-13 Thread matthew green
Robert Swindells writes:
> 
> "John D. Baker" 
> >Building the NET4501 kernel with 9.99.17 sources fails with:
> >
> >/x/current/src/sys/arch/x86/x86/vm_machdep.c: In function 'cpu_lwp_fork':
> >/x/current/src/sys/arch/x86/x86/vm_machdep.c:134:21: error: variable 'pcb2' 
> >might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
> >  struct pcb *pcb1, *pcb2;
> > ^~~~
> 
> My custom amd64 kernels fail too, there was a failure report from
> someone else but it doesn't seem to be in the archive yet.
> 
> The amd64 GENERIC config does build though.

i don't know what is up yet, but maxv changed this file recently.
i wonder if there was/is something special about either SVS here,
or fpu_lwp_fork() it's triggering on.  i don't see any attributes
that should apply here.. guessing SVS as it is the only conditional
compile there that should matter, but i still don't see anything
that actually points to it.

Maxime?


.mrg.


Re: i386 9.99.17 build fails for NET4501 kernel

2019-10-13 Thread Robert Swindells


"John D. Baker" 
>Building the NET4501 kernel with 9.99.17 sources fails with:
>
>/x/current/src/sys/arch/x86/x86/vm_machdep.c: In function 'cpu_lwp_fork':
>/x/current/src/sys/arch/x86/x86/vm_machdep.c:134:21: error: variable 'pcb2' 
>might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
>  struct pcb *pcb1, *pcb2;
> ^~~~

My custom amd64 kernels fail too, there was a failure report from
someone else but it doesn't seem to be in the archive yet.

The amd64 GENERIC config does build though.


i386 9.99.17 build fails for NET4501 kernel

2019-10-13 Thread John D. Baker
Building the NET4501 kernel with 9.99.17 sources fails with:

[...]
#   compile  NET4501/vm_machdep.o
/r0/build/current/tools/amd64/bin/i486--netbsdelf-gcc -msoft-float -mno-mmx 
-mno-sse -mno-avx -ffreestanding -fno-zero-initialized-in-bss 
-fno-delete-null-pointer-checks -g -Os -fstack-protector -Wstack-protector 
--param ssp-buffer-size=1 -fno-strict-aliasing -fno-common -std=gnu99 -Werror 
-Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
-Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual 
-Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wextra 
-Wno-unused-parameter -Wold-style-definition -Wno-sign-compare 
--sysroot=/r0/build/current/DEST/i386 -Di386 -I. 
-I/x/current/src/sys/external/bsd/acpica/dist 
-I/x/current/src/sys/external/bsd/libnv/dist 
-I/x/current/src/sys/../common/lib/libx86emu 
-I/x/current/src/sys/../common/lib/libc/misc 
-I/x/current/src/sys/../common/include -I/x/current/src/sys/arch 
-I/x/current/src/sys -nostdinc -DCOMPAT_UTILS -DTIMER_FREQ=1189200 -DCOMPAT_44 
-D_KERNEL -D_KERNEL_OPT -std=gnu99 
-I/x/current/src/sys/lib/libkern/../../../common/lib/libc/quad 
-I/x/current/src/sys/lib/libkern/../../../common/lib/libc/string 
-I/x/current/src/sys/lib/libkern/../../../common/lib/libc/arch/i386/string 
-D_FORTIFY_SOURCE=2 -I/x/current/src/sys/external/isc/atheros_hal/dist 
-I/x/current/src/sys/external/isc/atheros_hal/ic 
-I/x/current/src/sys/external/bsd/libnv/dist -c 
/x/current/src/sys/arch/x86/x86/vm_machdep.c -o vm_machdep.o
/x/current/src/sys/arch/x86/x86/vm_machdep.c: In function 'cpu_lwp_fork':
/x/current/src/sys/arch/x86/x86/vm_machdep.c:134:21: error: variable 'pcb2' 
might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  struct pcb *pcb1, *pcb2;
 ^~~~
cc1: all warnings being treated as errors
*** [vm_machdep.o] Error code 1

nbmake: stopped in /r0/build/current/obj/i386/sys/arch/i386/compile/NET4501
1 error

nbmake: stopped in /r0/build/current/obj/i386/sys/arch/i386/compile/NET4501

ERROR: Failed to make all in 
"/r0/build/current/obj/i386/sys/arch/i386/compile/NET4501"
*** BUILD ABORTED ***


-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645