Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2020-03-16 Thread Santhosh Raju
On Mon, Mar 16, 2020 at 8:18 PM Santhosh Raju  wrote:
>
> On Mon, Mar 16, 2020 at 8:02 PM Christos Zoulas  wrote:
> >
> > In article <20200317005012.daf4af...@cvs.netbsd.org>,
> > Santhosh Raju  wrote:
> > >-=-=-=-=-=-
> > >
> > >Module Name:   src
> > >Committed By:  fox
> > >Date:  Tue Mar 17 00:50:12 UTC 2020
> > >
> > >Modified Files:
> > >   src/external/cddl/osnet/lib/libdtrace: Makefile
> > >
> > >Log Message:
> > >external/cddl/osnet: Supress -Werror=maybe-uninitialized error in 
> > >libdtrace.
> > >
> > >It looks like this is a false positive, since the section of code
> > >triggering the error
> > >
> > >external/cddl/osnet/dist/lib/libdtrace/common/dt_proc.c:400:42:
> > >
> > >is only accessed after "err" is initialized.
> > >
> > >Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.
> >
> > You did not just suppress the error; you suppressed the warning too...
> > There is a difference between -Wno-error=maybe-uninitialized and
> > -Wno-maybe-uninitialized. I think we want the first flavor, otherwise
> > this is a large axe that will hide other warnings in the long run.
> >
>
> Agreed, I shall make the change to be -Wno-error=maybe-uninitialized.
>

https://mail-index.netbsd.org/source-changes/2020/03/17/msg115173.html

Should be fixed in this commit.

--
Santhosh


Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2020-03-16 Thread Santhosh Raju
On Mon, Mar 16, 2020 at 8:02 PM Christos Zoulas  wrote:
>
> In article <20200317005012.daf4af...@cvs.netbsd.org>,
> Santhosh Raju  wrote:
> >-=-=-=-=-=-
> >
> >Module Name:   src
> >Committed By:  fox
> >Date:  Tue Mar 17 00:50:12 UTC 2020
> >
> >Modified Files:
> >   src/external/cddl/osnet/lib/libdtrace: Makefile
> >
> >Log Message:
> >external/cddl/osnet: Supress -Werror=maybe-uninitialized error in libdtrace.
> >
> >It looks like this is a false positive, since the section of code
> >triggering the error
> >
> >external/cddl/osnet/dist/lib/libdtrace/common/dt_proc.c:400:42:
> >
> >is only accessed after "err" is initialized.
> >
> >Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.
>
> You did not just suppress the error; you suppressed the warning too...
> There is a difference between -Wno-error=maybe-uninitialized and
> -Wno-maybe-uninitialized. I think we want the first flavor, otherwise
> this is a large axe that will hide other warnings in the long run.
>

Agreed, I shall make the change to be -Wno-error=maybe-uninitialized.

> Now perhaps it is better to do what we've been doing traditionallly:
> over-initialize the variable with 'foo = 0; // XXX: gcc', but that's
> more book-keeping (but at least it is localized as opposed to suppress
> for the entire compilation unit). Please note that we don't have a good
> way to go around and test those error-avoidance overrides each time we
> upgrade the compiler so they tend to stick forever.
>

I did think of over-initialize here, but I did not know if it would
change the desired behavior of the code.

> christos1
>

--
Santhosh


Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2020-03-16 Thread Christos Zoulas
In article <20200317005012.daf4af...@cvs.netbsd.org>,
Santhosh Raju  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  fox
>Date:  Tue Mar 17 00:50:12 UTC 2020
>
>Modified Files:
>   src/external/cddl/osnet/lib/libdtrace: Makefile
>
>Log Message:
>external/cddl/osnet: Supress -Werror=maybe-uninitialized error in libdtrace.
>
>It looks like this is a false positive, since the section of code
>triggering the error
>
>external/cddl/osnet/dist/lib/libdtrace/common/dt_proc.c:400:42:
>
>is only accessed after "err" is initialized.
>
>Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

You did not just suppress the error; you suppressed the warning too...
There is a difference between -Wno-error=maybe-uninitialized and
-Wno-maybe-uninitialized. I think we want the first flavor, otherwise
this is a large axe that will hide other warnings in the long run.

Now perhaps it is better to do what we've been doing traditionallly:
over-initialize the variable with 'foo = 0; // XXX: gcc', but that's
more book-keeping (but at least it is localized as opposed to suppress
for the entire compilation unit). Please note that we don't have a good
way to go around and test those error-avoidance overrides each time we
upgrade the compiler so they tend to stick forever.

christos1



CVS commit: src/external/cddl/osnet/lib/libdtrace

2019-10-13 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Oct 13 10:07:27 UTC 2019

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
This previously had -Wno-format-truncation so I am presuming it should
have been converted to GCC_NO_FORMAT_TRUNCATION rather than
GCC_NO_STRINGOP_TRUNCATION which is what happened.   This might unbreak
the build (olr at least get it further).


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/cddl/osnet/lib/libdtrace/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/lib/libdtrace/Makefile
diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.24 src/external/cddl/osnet/lib/libdtrace/Makefile:1.25
--- src/external/cddl/osnet/lib/libdtrace/Makefile:1.24	Sun Oct 13 07:28:08 2019
+++ src/external/cddl/osnet/lib/libdtrace/Makefile	Sun Oct 13 10:07:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.24 2019/10/13 07:28:08 mrg Exp $
+#	$NetBSD: Makefile,v 1.25 2019/10/13 10:07:27 kre Exp $
 
 # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
 
@@ -107,7 +107,7 @@ CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/
 CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
 .PATH:		${.CURDIR}/../../dist/lib/libdtrace/arm
 .endif
-COPTS.dt_link.c		+= ${GCC_NO_STRINGOP_TRUNCATION}
+COPTS.dt_link.c		+= ${GCC_NO_FORMAT_TRUNCATION}
 
 LFLAGS+=-l
 



CVS commit: src/external/cddl/osnet/lib/libdtrace

2019-10-13 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Oct 13 10:07:27 UTC 2019

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
This previously had -Wno-format-truncation so I am presuming it should
have been converted to GCC_NO_FORMAT_TRUNCATION rather than
GCC_NO_STRINGOP_TRUNCATION which is what happened.   This might unbreak
the build (olr at least get it further).


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/external/cddl/osnet/lib/libdtrace/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/lib/libdtrace

2019-10-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Oct 10 02:35:45 UTC 2019

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
Only exclude gcc-8 warnings when the gcc we're using is gcc>=8


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/cddl/osnet/lib/libdtrace/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/lib/libdtrace/Makefile
diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.22 src/external/cddl/osnet/lib/libdtrace/Makefile:1.23
--- src/external/cddl/osnet/lib/libdtrace/Makefile:1.22	Wed Oct  9 21:49:50 2019
+++ src/external/cddl/osnet/lib/libdtrace/Makefile	Thu Oct 10 02:35:45 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2019/10/09 21:49:50 christos Exp $
+#	$NetBSD: Makefile,v 1.23 2019/10/10 02:35:45 kre Exp $
 
 # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
 
@@ -85,7 +85,7 @@ COPTS.dt_printf.c	+= -Wno-stack-protecto
 COPTS.dt_program.c	+= -Wno-stack-protector
 COPTS.dt_provider.c	+= -Wno-stack-protector
 COPTS.dt_subr.c		+= -Wno-stack-protector
-.if ${ACTIVE_CC} == "gcc"
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc"
 COPTS.dt_lex.c		+= -Wno-error=stringop-truncation
 COPTS.dt_pid.c		+= -Wno-error=stringop-truncation
 .endif



CVS commit: src/external/cddl/osnet/lib/libdtrace

2019-10-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Oct 10 02:35:45 UTC 2019

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
Only exclude gcc-8 warnings when the gcc we're using is gcc>=8


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/external/cddl/osnet/lib/libdtrace/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/lib/libdtrace

2019-10-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct  9 21:49:50 UTC 2019

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
no error for string truncation


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/cddl/osnet/lib/libdtrace/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/lib/libdtrace

2019-10-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct  9 21:49:50 UTC 2019

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
no error for string truncation


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/external/cddl/osnet/lib/libdtrace/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/lib/libdtrace/Makefile
diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.21 src/external/cddl/osnet/lib/libdtrace/Makefile:1.22
--- src/external/cddl/osnet/lib/libdtrace/Makefile:1.21	Mon Feb 11 12:49:37 2019
+++ src/external/cddl/osnet/lib/libdtrace/Makefile	Wed Oct  9 17:49:50 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2019/02/11 17:49:37 tnn Exp $
+#	$NetBSD: Makefile,v 1.22 2019/10/09 21:49:50 christos Exp $
 
 # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
 
@@ -85,6 +85,10 @@ COPTS.dt_printf.c	+= -Wno-stack-protecto
 COPTS.dt_program.c	+= -Wno-stack-protector
 COPTS.dt_provider.c	+= -Wno-stack-protector
 COPTS.dt_subr.c		+= -Wno-stack-protector
+.if ${ACTIVE_CC} == "gcc"
+COPTS.dt_lex.c		+= -Wno-error=stringop-truncation
+COPTS.dt_pid.c		+= -Wno-error=stringop-truncation
+.endif
 
 COPTS.dt_consume.c	+= -Wno-parentheses
 COPTS.dt_consume.c	+= ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}



Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2019-02-11 Thread maya
On Tue, Feb 12, 2019 at 04:59:33AM +1100, matthew green wrote:
> "Tobias Nygren" writes:
> > Module Name:src
> > Committed By:   tnn
> > Date:   Mon Feb 11 17:49:37 UTC 2019
> > 
> > Modified Files:
> > src/external/cddl/osnet/lib/libdtrace: Makefile
> > 
> > Log Message:
> > -Wno-format-truncation is only needed when using GCC
> 
> this probably should be restricted to GCC 7 only, as GCC 6
> doesn't support it either.
> 
> thanks.
> 
> 
> .mrg.

The few platforms building this file are already defaulting to GCC 7 :-)


Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2018-06-07 Thread Kamil Rytarowski
On 07.06.2018 15:08, Joerg Sonnenberger wrote:
> On Thu, Jun 07, 2018 at 10:07:27AM +0200, Kamil Rytarowski wrote:
>> On 07.06.2018 00:03, Joerg Sonnenberger wrote:
>>> On Wed, Jun 06, 2018 at 02:18:39PM +, Kamil Rytarowski wrote:
 Module Name:   src
 Committed By:  kamil
 Date:  Wed Jun  6 14:18:39 UTC 2018

 Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

 Log Message:
 Make cddl/osnet/lib/libdtrace buildable with MKLLVM=yes
>>>
>>> This is not the correct way to fix this. First of all, the flags are
>>> conditional even for GCC, but more importantly, HAVE_GCC does not mean
>>> that the compiler is GCC. See i.e. ah_regdomain.c handling in sys/conf.
>>>
>>> Joerg
>>>
>>
>> Do you mean to change the switch to: ${ACTIVE_CC} == "clang"?
> 
> == "gcc", but otherwise yes.
> 
> Joerg
> 

I'm test building a patch with ${ACTIVE_CC} for GCC and LLVM
distribution and I will commit it once it will build.



signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2018-06-07 Thread Joerg Sonnenberger
On Thu, Jun 07, 2018 at 10:07:27AM +0200, Kamil Rytarowski wrote:
> On 07.06.2018 00:03, Joerg Sonnenberger wrote:
> > On Wed, Jun 06, 2018 at 02:18:39PM +, Kamil Rytarowski wrote:
> >> Module Name:   src
> >> Committed By:  kamil
> >> Date:  Wed Jun  6 14:18:39 UTC 2018
> >>
> >> Modified Files:
> >>src/external/cddl/osnet/lib/libdtrace: Makefile
> >>
> >> Log Message:
> >> Make cddl/osnet/lib/libdtrace buildable with MKLLVM=yes
> > 
> > This is not the correct way to fix this. First of all, the flags are
> > conditional even for GCC, but more importantly, HAVE_GCC does not mean
> > that the compiler is GCC. See i.e. ah_regdomain.c handling in sys/conf.
> > 
> > Joerg
> > 
> 
> Do you mean to change the switch to: ${ACTIVE_CC} == "clang"?

== "gcc", but otherwise yes.

Joerg


Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2018-06-07 Thread Joerg Sonnenberger
On Thu, Jun 07, 2018 at 10:07:27AM +0200, Kamil Rytarowski wrote:
> On 07.06.2018 00:03, Joerg Sonnenberger wrote:
> > On Wed, Jun 06, 2018 at 02:18:39PM +, Kamil Rytarowski wrote:
> >> Module Name:   src
> >> Committed By:  kamil
> >> Date:  Wed Jun  6 14:18:39 UTC 2018
> >>
> >> Modified Files:
> >>src/external/cddl/osnet/lib/libdtrace: Makefile
> >>
> >> Log Message:
> >> Make cddl/osnet/lib/libdtrace buildable with MKLLVM=yes
> > 
> > This is not the correct way to fix this. First of all, the flags are
> > conditional even for GCC, but more importantly, HAVE_GCC does not mean
> > that the compiler is GCC. See i.e. ah_regdomain.c handling in sys/conf.
> > 
> > Joerg
> > 
> 
> Do you mean to change the switch to: ${ACTIVE_CC} == "clang"?
> 
> I've followed the approach in share/mk/bsd.sys.mk:
> 
> .if (defined(HAVE_GCC) \
>  && (${MACHINE_ARCH} == "coldfire" || \
>  ${MACHINE_CPU} == "sh3" || \
>  ${MACHINE_CPU} == "m68k"))
> # XXX GCC 4.5 for sh3 and m68k (which we compile with -Os) is extra
> noisy for
> # cases it should be better with
> CFLAGS+=-Wno-uninitialized
> CFLAGS+=-Wno-maybe-uninitialized
> .endif
> 
> And this works.

It only works because those architectures are (currently) GCC only.

Joerg


Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2018-06-07 Thread Kamil Rytarowski
On 07.06.2018 00:03, Joerg Sonnenberger wrote:
> On Wed, Jun 06, 2018 at 02:18:39PM +, Kamil Rytarowski wrote:
>> Module Name: src
>> Committed By:kamil
>> Date:Wed Jun  6 14:18:39 UTC 2018
>>
>> Modified Files:
>>  src/external/cddl/osnet/lib/libdtrace: Makefile
>>
>> Log Message:
>> Make cddl/osnet/lib/libdtrace buildable with MKLLVM=yes
> 
> This is not the correct way to fix this. First of all, the flags are
> conditional even for GCC, but more importantly, HAVE_GCC does not mean
> that the compiler is GCC. See i.e. ah_regdomain.c handling in sys/conf.
> 
> Joerg
> 

Do you mean to change the switch to: ${ACTIVE_CC} == "clang"?

I've followed the approach in share/mk/bsd.sys.mk:

.if (defined(HAVE_GCC) \
 && (${MACHINE_ARCH} == "coldfire" || \
 ${MACHINE_CPU} == "sh3" || \
 ${MACHINE_CPU} == "m68k"))
# XXX GCC 4.5 for sh3 and m68k (which we compile with -Os) is extra
noisy for
# cases it should be better with
CFLAGS+=-Wno-uninitialized
CFLAGS+=-Wno-maybe-uninitialized
.endif

And this works.



signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2018-06-06 Thread Joerg Sonnenberger
On Wed, Jun 06, 2018 at 02:18:39PM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Wed Jun  6 14:18:39 UTC 2018
> 
> Modified Files:
>   src/external/cddl/osnet/lib/libdtrace: Makefile
> 
> Log Message:
> Make cddl/osnet/lib/libdtrace buildable with MKLLVM=yes

This is not the correct way to fix this. First of all, the flags are
conditional even for GCC, but more importantly, HAVE_GCC does not mean
that the compiler is GCC. See i.e. ah_regdomain.c handling in sys/conf.

Joerg


Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2014-03-16 Thread Matt Thomas

On Mar 15, 2014, at 10:11 PM, Ryota Ozaki ozak...@netbsd.org wrote:

 Module Name:  src
 Committed By: ozaki-r
 Date: Sun Mar 16 05:11:19 UTC 2014
 
 Modified Files:
   src/external/cddl/osnet/lib/libdtrace: Makefile
 
 Log Message:
 Look up arm directory on MACHINE_ARCH=*arm*

Use MACHINE_CPU instead.


Re: CVS commit: src/external/cddl/osnet/lib/libdtrace

2014-03-16 Thread Ryota Ozaki
On Sun, Mar 16, 2014 at 3:02 PM, Matt Thomas m...@3am-software.com wrote:

 On Mar 15, 2014, at 10:11 PM, Ryota Ozaki ozak...@netbsd.org wrote:

 Module Name:  src
 Committed By: ozaki-r
 Date: Sun Mar 16 05:11:19 UTC 2014

 Modified Files:
   src/external/cddl/osnet/lib/libdtrace: Makefile

 Log Message:
 Look up arm directory on MACHINE_ARCH=*arm*

 Use MACHINE_CPU instead.

Oh, sorry. I forgot it. Thank you for pointing it out!

  ozaki-r


CVS commit: src/external/cddl/osnet/lib/libdtrace

2010-02-24 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Wed Feb 24 12:51:06 UTC 2010

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
Disable stack protection warnings for sources which use dynamically
sized stack buffers.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/lib/libdtrace/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/cddl/osnet/lib/libdtrace

2010-02-24 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Wed Feb 24 15:40:54 UTC 2010

Modified Files:
src/external/cddl/osnet/lib/libdtrace: Makefile

Log Message:
Disable stack protection warnings for more sources which use dynamically
sized stack buffers.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/lib/libdtrace/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.