Re: svn commit: r308181 - in head: . share/mk

2016-11-01 Thread Dimitry Andric
On 01 Nov 2016, at 22:27, Jonathan Anderson  wrote:
> 
> Author: jonathan
> Date: Tue Nov  1 21:27:42 2016
> New Revision: 308181
> URL: https://svnweb.freebsd.org/changeset/base/308181
> 
> Log:
>  Add rules to build LLVM IR binaries and libraries.
> 
>  Running `make libfoo.ll` or `make libfoo.bc` within a library directory
>  will now give us an LLVM IR version of the library, and `make foo.full.ll`
>  or `make foo.full.bc` will give us an IR version of a binary.

Please note, I reverted r307823 (which changed the suffixes from .bco
and .llo to .bc and .ll) in r308003, since it caused a number of ports
failures.  These ports were already using .ll as a suffix for C++ lex
scripts.


> Modified: head/share/mk/bsd.lib.mk
> ==
> --- head/share/mk/bsd.lib.mk  Tue Nov  1 21:08:37 2016(r308180)
> +++ head/share/mk/bsd.lib.mk  Tue Nov  1 21:27:42 2016(r308181)
> @@ -78,7 +78,7 @@ CTFFLAGS+= -g
> 
> # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
> # .pico used for PIC object files
> -.SUFFIXES: .out .o .po .pico .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln
> +.SUFFIXES: .out .o .bc .ll .po .pico .S .asm .s .c .cc .cpp .cxx .C .f .y .l 
> .ln

So here, please use .bco and .llo.


> @@ -199,6 +199,18 @@ lib${LIB_PRIVATE}${LIB}_p.a: ${POBJS}
>   ${RANLIB} ${RANLIBFLAGS} ${.TARGET}
> .endif
> 
> +.if defined(LLVM_LINK)
> +BCOBJS=  ${OBJS:.o=.bco} ${STATICOBJS:.o=.bco}
> +LLOBJS=  ${OBJS:.o=.llo} ${STATICOBJS:.o=.llo}

But apparently you already used those suffixes here.


> Modified: head/share/mk/bsd.prog.mk
> ==
> --- head/share/mk/bsd.prog.mk Tue Nov  1 21:08:37 2016(r308180)
> +++ head/share/mk/bsd.prog.mk Tue Nov  1 21:27:42 2016(r308181)
> @@ -4,7 +4,7 @@
> .include 
> .include 
> 
> -.SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .ln .s .S .asm
> +.SUFFIXES: .out .o .bc .c .cc .cpp .cxx .C .m .y .l .ll .ln .s .S .asm

But not here, these should also be changed.  Sorry for any confusion.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r308003 - head/share/mk

2016-10-27 Thread Dimitry Andric
Author: dim
Date: Thu Oct 27 18:46:52 2016
New Revision: 308003
URL: https://svnweb.freebsd.org/changeset/base/308003

Log:
  Revert r307823 (Use upstream suffixes for LLVM IR) for now.  It causes a
  number of ports to fail, which use bmake, and use .ll file extensions
  (usually for for C++-based lex input).
  
  Reported by:  antoine

Modified:
  head/share/mk/bsd.suffixes.mk
  head/share/mk/sys.mk

Modified: head/share/mk/bsd.suffixes.mk
==
--- head/share/mk/bsd.suffixes.mk   Thu Oct 27 15:51:39 2016
(r308002)
+++ head/share/mk/bsd.suffixes.mk   Thu Oct 27 18:46:52 2016
(r308003)
@@ -20,10 +20,10 @@
${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
 
-.c.bc:
+.c.bco:
${CC} -emit-llvm ${IR_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
-.c.ll:
+.c.llo:
${CC} -emit-llvm ${IR_CFLAGS} -S ${.IMPSRC} -o ${.TARGET}
 
 .cc .cpp .cxx .C:
@@ -32,10 +32,10 @@
 .cc.o .cpp.o .cxx.o .C.o:
${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
-.cc.bc .cpp.bc .cxx.bc .C.bc:
+.cc.bco .cpp.bco .cxx.bco .C.bco:
${CXX} -emit-llvm ${IR_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
-.cc.ll .cpp.ll .cxx.ll .C.ll:
+.cc.llo .cpp.llo .cxx.llo .C.llo:
${CXX} -emit-llvm ${IR_CXXFLAGS} -S ${.IMPSRC} -o ${.TARGET}
 
 .m.o:

Modified: head/share/mk/sys.mk
==
--- head/share/mk/sys.mkThu Oct 27 15:51:39 2016(r308002)
+++ head/share/mk/sys.mkThu Oct 27 18:46:52 2016(r308003)
@@ -121,7 +121,7 @@ META_MODE?= normal
 .if defined(%POSIX)
 .SUFFIXES: .o .c .y .l .a .sh .f
 .else
-.SUFFIXES: .out .a .ln .o .bc .ll .c .cc .cpp .cxx .C .m .F .f .e .r .y .l 
.S .asm .s .cl .p .h .sh
+.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y 
.l .S .asm .s .cl .p .h .sh
 .endif
 
 AR ?=  ar
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r307823 - head/share/mk

2016-10-23 Thread Dimitry Andric
Author: dim
Date: Sun Oct 23 14:28:29 2016
New Revision: 307823
URL: https://svnweb.freebsd.org/changeset/base/307823

Log:
  Use upstream suffixes for LLVM IR
  
  In r307676, several make rules were added for LLVM IR files, both in
  text and binary format.  Unfortunately these use different suffixes from
  what upstream uses:
  * Text IR has upstream suffix ".ll", while r307676 uses ".llo"
  * Binary IR has upstream suffix ".bc", while r307676 uses ".bco"
  
  Change these to what upstream uses instead.
  
  Reviewed by:  emaste
  Differential Revision: https://reviews.freebsd.org/D8326

Modified:
  head/share/mk/bsd.suffixes.mk
  head/share/mk/sys.mk

Modified: head/share/mk/bsd.suffixes.mk
==
--- head/share/mk/bsd.suffixes.mk   Sun Oct 23 12:48:09 2016
(r307822)
+++ head/share/mk/bsd.suffixes.mk   Sun Oct 23 14:28:29 2016
(r307823)
@@ -20,10 +20,10 @@
${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CTFCONVERT_CMD}
 
-.c.bco:
+.c.bc:
${CC} -emit-llvm ${IR_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
-.c.llo:
+.c.ll:
${CC} -emit-llvm ${IR_CFLAGS} -S ${.IMPSRC} -o ${.TARGET}
 
 .cc .cpp .cxx .C:
@@ -32,10 +32,10 @@
 .cc.o .cpp.o .cxx.o .C.o:
${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
-.cc.bco .cpp.bco .cxx.bco .C.bco:
+.cc.bc .cpp.bc .cxx.bc .C.bc:
${CXX} -emit-llvm ${IR_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
-.cc.llo .cpp.llo .cxx.llo .C.llo:
+.cc.ll .cpp.ll .cxx.ll .C.ll:
${CXX} -emit-llvm ${IR_CXXFLAGS} -S ${.IMPSRC} -o ${.TARGET}
 
 .m.o:

Modified: head/share/mk/sys.mk
==
--- head/share/mk/sys.mkSun Oct 23 12:48:09 2016(r307822)
+++ head/share/mk/sys.mkSun Oct 23 14:28:29 2016(r307823)
@@ -121,7 +121,7 @@ META_MODE?= normal
 .if defined(%POSIX)
 .SUFFIXES: .o .c .y .l .a .sh .f
 .else
-.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y 
.l .S .asm .s .cl .p .h .sh
+.SUFFIXES: .out .a .ln .o .bc .ll .c .cc .cpp .cxx .C .m .F .f .e .r .y .l 
.S .asm .s .cl .p .h .sh
 .endif
 
 AR ?=  ar
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r307756 - in head: include sys/sys

2016-10-22 Thread Dimitry Andric
On 22 Oct 2016, at 16:00, Dimitry Andric <d...@freebsd.org> wrote:
> 
> On 22 Oct 2016, at 02:00, Brooks Davis <bro...@freebsd.org> wrote:
...
>> Ideally I'd add a void * as well since that will support systems like
>> CHERI where pointers are the largest type.
> 
> Is void * larger than a struct with long long and long double?  I'd
> think this would be at least 128 bits on almost all architectures?
> 
> In any case, if you want to change this definition, it is probably best
> to first check it with upstream gcc, otherwise you'll end up with an
> incompatibility.

For some more historic context, see this LLVM commit:

http://llvm.org/viewvc/llvm-project?view=revision=201729

r201729 | chandlerc | 2014-02-19 23:35:01 +0100 (Wed, 19 Feb 2014) | 20 lines

Teach Clang to provide ::max_align_t in C11 and C++11 modes.

This definition is not chosen idly. There is an unfortunate reality with
max_align_t -- the specific nature of its definition leaks into the ABI
almost immediately. Because it is part of C11 and C++11 it becomes
essential for it to match with other systems on that ABI. There is an
effort to discourage any further use of this construct as a consequence
-- using max_align_t introduces an immediate ABI problem. We can never
update it to have larger alignment even as the microarchitecture changes
to necessitate higher alignment. =/

The particular definition here exactly matches the ABI of GCC's chosen
::max_align_t definition, for better or worse. This was written with the
help of Richard Smith who was decoding the exact ABI implications of the
selected definition in GCC. Notably, in-register arguments are impacted
by the particular definition chosen. =/

No one is under the illusion that this is a "good" or "useful"
definition of max_align_t, and we are working with the standards
committee to specify a more useful interface to address this need.


E.g., it is likely better to avoid using max_align_t altogether.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r307756 - in head: include sys/sys

2016-10-22 Thread Dimitry Andric
On 22 Oct 2016, at 02:00, Brooks Davis  wrote:
> 
> On Fri, Oct 21, 2016 at 11:50:02PM +, John Baldwin wrote:
>> Author: jhb
>> Date: Fri Oct 21 23:50:02 2016
>> New Revision: 307756
>> URL: https://svnweb.freebsd.org/changeset/base/307756
>> 
>> Log:
>>  Define max_align_t for C11.
>> 
>>  libc++'s stddef.h includes an existing definition of max_align_t for
>>  C++11, but it is only defined for C++, not for C.  In addition, GCC and
>>  clang both define an alternate version of max_align_t that uses a
>>  union of multiple types rather than a plain long double as in libc++.
>>  This adds a __max_align_t to  that matches the GCC and
>>  clang definition that is mapped to max_align_t in .
...
Modified: head/sys/sys/_types.h
>> ==
>> --- head/sys/sys/_types.hFri Oct 21 21:55:50 2016(r307755)
>> +++ head/sys/sys/_types.hFri Oct 21 23:50:02 2016(r307756)
>> @@ -100,6 +100,11 @@ typedef __uint_least32_t __char32_t;
>> #define  _CHAR32_T_DECLARED
>> #endif
>> 
>> +typedef struct {
> 
> Should this be union per the commit message?

You would be inclined to think so, but the strange way this is defined
is only to be compatible with gcc's definition, which was introduced
here in 2011:

https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/ginclude/stddef.h?r1=181048=181047=181048


> Ideally I'd add a void * as well since that will support systems like
> CHERI where pointers are the largest type.

Is void * larger than a struct with long long and long double?  I'd
think this would be at least 128 bits on almost all architectures?

In any case, if you want to change this definition, it is probably best
to first check it with upstream gcc, otherwise you'll end up with an
incompatibility.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r307754 - head/share/mk

2016-10-21 Thread Dimitry Andric
Author: dim
Date: Fri Oct 21 21:52:22 2016
New Revision: 307754
URL: https://svnweb.freebsd.org/changeset/base/307754

Log:
  Fix building of many ports that use make from base, such as devel/apr1,
  after r307676, which added transformation rules for .llo and .bco files.
  
  These suffixes also have to be added the the global .SUFFIXES target,
  otherwise the various suffix-transformation rules would be interpreted
  as literal targets.  E.g.,
  
  .c.bco:
... commands ...
  
  would actually to build a file named ".c.bco".

Modified:
  head/share/mk/sys.mk

Modified: head/share/mk/sys.mk
==
--- head/share/mk/sys.mkFri Oct 21 20:31:52 2016(r307753)
+++ head/share/mk/sys.mkFri Oct 21 21:52:22 2016(r307754)
@@ -121,7 +121,7 @@ META_MODE?= normal
 .if defined(%POSIX)
 .SUFFIXES: .o .c .y .l .a .sh .f
 .else
-.SUFFIXES: .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm 
.s .cl .p .h .sh
+.SUFFIXES: .out .a .ln .o .bco .llo .c .cc .cpp .cxx .C .m .F .f .e .r .y 
.l .S .asm .s .cl .p .h .sh
 .endif
 
 AR ?=  ar
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r307676 - head/share/mk

2016-10-21 Thread Dimitry Andric
On 20 Oct 2016, at 17:14, Jonathan Anderson  wrote:
> 
> Author: jonathan
> Date: Thu Oct 20 15:14:21 2016
> New Revision: 307676
> URL: https://svnweb.freebsd.org/changeset/base/307676
> 
> Log:
>  Add make rules to build LLVM IR from C/C++ sources.
> 
>  As a foundation for future work with LLVM's Intermediate Representation (IR),
>  add new suffix rules that can be used to build .llo (text) or .bco (bitcode)
>  files from C or C++ sources.

Hi,

Unfortunately I was not on the review list, but I object to using .llo
and .bco, which implies that these are "object" files, and they are not.

Can we please just use the upstream default extensions, .ll and .bc
instead?

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r307231 - head/lib/libgcc_s

2016-10-14 Thread Dimitry Andric
On 14 Oct 2016, at 04:06, Ed Maste  wrote:
> 
> Hi Bruce, thank you for the detailed response.
> 
> On 14 October 2016 at 01:53, Bruce Evans  wrote:
>>> compiler-rt's complex division support routines contain calls to
>>> compiler builtins such as `__builtin_scalbnl`.  Unfortunately Clang
>>> turns these back into a call to `scalbnl`.
>> 
>> gcc-4.2 has the same bug.
> 
> Oh, interesting. Do you know off hand if it's resolved in later GCC?

Not for x86, in any case (I think I talked about this with you on IRC
before).  For example, using the latest gcc 7.0.0 20160911 on this
program:

float f1(float x, int n)
{
return __builtin_scalbnf(x, n);
}

double f2(double x, int n)
{
return __builtin_scalbn(x, n);
}

long double f3(long double x, long n)
{
return __builtin_scalbnl(x, n);
}

gives this assembly:

.p2align 4,,15
.globl  f1
.type   f1, @function
f1:
.LFB0:
.cfi_startproc
jmp scalbnf
.cfi_endproc
.LFE0:
.size   f1, .-f1
.p2align 4,,15
.globl  f2
.type   f2, @function
f2:
.LFB1:
.cfi_startproc
jmp scalbn
.cfi_endproc
.LFE1:
.size   f2, .-f2
.p2align 4,,15
.globl  f3
.type   f3, @function
f3:
.LFB2:
.cfi_startproc
jmp scalbnl
.cfi_endproc
.LFE2:
.size   f3, .-f3

E.g., it looks like the __builtin_scalbn functions were always a red
herring. :-)


> It seems particularly unfortunate for the compiler to report (by
> whatever mechanism) that a builtin exists, and then just turn that
> builtin into a library call.

Yes, at best this is misleading.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r305430 - head/contrib/gcclibs/libcpp

2016-09-05 Thread Dimitry Andric
Author: dim
Date: Mon Sep  5 18:02:37 2016
New Revision: 305430
URL: https://svnweb.freebsd.org/changeset/base/305430

Log:
  Define libcpp's HAVE_DESIGNATED_INITIALIZERS in a defined and portable
  way.
  
  MFC after:3 days

Modified:
  head/contrib/gcclibs/libcpp/system.h

Modified: head/contrib/gcclibs/libcpp/system.h
==
--- head/contrib/gcclibs/libcpp/system.hMon Sep  5 17:56:52 2016
(r305429)
+++ head/contrib/gcclibs/libcpp/system.hMon Sep  5 18:02:37 2016
(r305430)
@@ -347,9 +347,12 @@ extern void abort (void);
??? C99 designated initializers are not supported by most C++
compilers, including G++.  -- gdr, 2005-05-18  */
 #if !defined(HAVE_DESIGNATED_INITIALIZERS)
-#define HAVE_DESIGNATED_INITIALIZERS \
-  ((!defined(__cplusplus) && (GCC_VERSION >= 2007)) \
-   || (__STDC_VERSION__ >= 199901L))
+# if (!defined(__cplusplus) && (GCC_VERSION >= 2007)) \
+ ||(__STDC_VERSION__ >= 199901L)
+#  define HAVE_DESIGNATED_INITIALIZERS 1
+# else
+#  define HAVE_DESIGNATED_INITIALIZERS 0
+# endif
 #endif
 
 /* Be conservative and only use enum bitfields with GCC.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305396 - head/contrib/libcxxrt

2016-09-04 Thread Dimitry Andric
Author: dim
Date: Sun Sep  4 21:48:58 2016
New Revision: 305396
URL: https://svnweb.freebsd.org/changeset/base/305396

Log:
  Add _US_ACTION_MASK to libcxxrt's arm-specific unwind header.  This
  value is used in newer versions of compiler-rt.
  
  MFC after:3 days

Modified:
  head/contrib/libcxxrt/unwind-arm.h

Modified: head/contrib/libcxxrt/unwind-arm.h
==
--- head/contrib/libcxxrt/unwind-arm.h  Sun Sep  4 20:55:27 2016
(r305395)
+++ head/contrib/libcxxrt/unwind-arm.h  Sun Sep  4 21:48:58 2016
(r305396)
@@ -28,7 +28,7 @@
 {
_URC_OK = 0,/* operation completed successfully */
_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
-_URC_END_OF_STACK = 5,
+   _URC_END_OF_STACK = 5,
_URC_HANDLER_FOUND = 6,
_URC_INSTALL_CONTEXT = 7,
_URC_CONTINUE_UNWIND = 8,
@@ -43,10 +43,12 @@ typedef uint32_t _Unwind_State;
 static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME  = 0;
 static const _Unwind_State _US_UNWIND_FRAME_STARTING = 1;
 static const _Unwind_State _US_UNWIND_FRAME_RESUME   = 2;
+static const _Unwind_State _US_ACTION_MASK   = 3;
 #else // GCC fails at knowing what a constant expression is
 #  define _US_VIRTUAL_UNWIND_FRAME  0
 #  define _US_UNWIND_FRAME_STARTING 1
-#  define _US_UNWIND_FRAME_RESUME 2
+#  define _US_UNWIND_FRAME_RESUME   2
+#  define _US_ACTION_MASK   3
 #endif
 
 typedef struct _Unwind_Context _Unwind_Context;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r305392 - head/sys/conf

2016-09-04 Thread Dimitry Andric
Not in this particular case, as the section is exclusively meant for
clang.  Most of these warning options are completely different from
gcc's.  The gcc related section is just below this part in kern.mk.

-Dimitry

> On 04 Sep 2016, at 22:03, Conrad Meyer <c...@freebsd.org> wrote:
> 
> Assuming we'd like to enable building with both compilers for now,
> isn't it better to use a form both accept?
> 
> Best,
> Conrad
> 
> On Sun, Sep 4, 2016 at 12:31 PM, Dimitry Andric <d...@freebsd.org> wrote:
>> On 04 Sep 2016, at 20:57, Conrad Meyer <c...@freebsd.org> wrote:
>>> 
>>> On Sun, Sep 4, 2016 at 10:55 AM, Dimitry Andric <d...@freebsd.org> wrote:
>>>> Author: dim
>>>> Date: Sun Sep  4 17:55:22 2016
>>>> New Revision: 305392
>>>> URL: https://svnweb.freebsd.org/changeset/base/305392
>>>> 
>>>> Log:
>>>> For kernel builds, instead of suppressing certain clang warnings, make
>>>> them non-fatal, so there is some incentive to fix them eventually.
>>>> 
>>>> Modified:
>>>> head/sys/conf/kern.mk
>>>> 
>>>> Modified: head/sys/conf/kern.mk
>>>> ==
>>>> --- head/sys/conf/kern.mk   Sun Sep  4 17:50:23 2016(r305391)
>>>> +++ head/sys/conf/kern.mk   Sun Sep  4 17:55:22 2016(r305392)
>>>> @@ -17,13 +17,13 @@ CWARNFLAGS?=-Wall -Wredundant-decls -Wn
>>>> # kernel where fixing them is more trouble than it is worth, or where 
>>>> there is
>>>> # a false positive.
>>>> .if ${COMPILER_TYPE} == "clang"
>>>> -NO_WCONSTANT_CONVERSION=   -Wno-constant-conversion
>>>> -NO_WSHIFT_COUNT_NEGATIVE=  -Wno-shift-count-negative
>>>> -NO_WSHIFT_COUNT_OVERFLOW=  -Wno-shift-count-overflow
>>>> -NO_WSELF_ASSIGN=   -Wno-self-assign
>>>> -NO_WUNNEEDED_INTERNAL_DECL=-Wno-unneeded-internal-declaration
>>>> +NO_WCONSTANT_CONVERSION=   -Wno-error-constant-conversion
>>>> +NO_WSHIFT_COUNT_NEGATIVE=  -Wno-error-shift-count-negative
>>>> +NO_WSHIFT_COUNT_OVERFLOW=  -Wno-error-shift-count-overflow
>>>> +NO_WSELF_ASSIGN=   -Wno-error-self-assign
>>>> +NO_WUNNEEDED_INTERNAL_DECL=-Wno-error-unneeded-internal-declaration
>>>> NO_WSOMETIMES_UNINITIALIZED=   -Wno-error-sometimes-uninitialized
>>>> -NO_WCAST_QUAL= -Wno-cast-qual
>>>> +NO_WCAST_QUAL= -Wno-error-cast-qual
>>> 
>>> I like goal of the change.  Shouldn't these be -Wno-error=cast-qual,
>>> etc., though?
>> 
>> That's how gcc spells them.  Clang accepts both forms, there is no
>> functional difference.
>> 
>> -Dimitry
>> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r305392 - head/sys/conf

2016-09-04 Thread Dimitry Andric
On 04 Sep 2016, at 20:57, Conrad Meyer <c...@freebsd.org> wrote:
> 
> On Sun, Sep 4, 2016 at 10:55 AM, Dimitry Andric <d...@freebsd.org> wrote:
>> Author: dim
>> Date: Sun Sep  4 17:55:22 2016
>> New Revision: 305392
>> URL: https://svnweb.freebsd.org/changeset/base/305392
>> 
>> Log:
>>  For kernel builds, instead of suppressing certain clang warnings, make
>>  them non-fatal, so there is some incentive to fix them eventually.
>> 
>> Modified:
>>  head/sys/conf/kern.mk
>> 
>> Modified: head/sys/conf/kern.mk
>> ==
>> --- head/sys/conf/kern.mk   Sun Sep  4 17:50:23 2016(r305391)
>> +++ head/sys/conf/kern.mk   Sun Sep  4 17:55:22 2016(r305392)
>> @@ -17,13 +17,13 @@ CWARNFLAGS?=-Wall -Wredundant-decls -Wn
>> # kernel where fixing them is more trouble than it is worth, or where there 
>> is
>> # a false positive.
>> .if ${COMPILER_TYPE} == "clang"
>> -NO_WCONSTANT_CONVERSION=   -Wno-constant-conversion
>> -NO_WSHIFT_COUNT_NEGATIVE=  -Wno-shift-count-negative
>> -NO_WSHIFT_COUNT_OVERFLOW=  -Wno-shift-count-overflow
>> -NO_WSELF_ASSIGN=   -Wno-self-assign
>> -NO_WUNNEEDED_INTERNAL_DECL=-Wno-unneeded-internal-declaration
>> +NO_WCONSTANT_CONVERSION=   -Wno-error-constant-conversion
>> +NO_WSHIFT_COUNT_NEGATIVE=  -Wno-error-shift-count-negative
>> +NO_WSHIFT_COUNT_OVERFLOW=  -Wno-error-shift-count-overflow
>> +NO_WSELF_ASSIGN=   -Wno-error-self-assign
>> +NO_WUNNEEDED_INTERNAL_DECL=-Wno-error-unneeded-internal-declaration
>> NO_WSOMETIMES_UNINITIALIZED=   -Wno-error-sometimes-uninitialized
>> -NO_WCAST_QUAL= -Wno-cast-qual
>> +NO_WCAST_QUAL= -Wno-error-cast-qual
> 
> I like goal of the change.  Shouldn't these be -Wno-error=cast-qual,
> etc., though?

That's how gcc spells them.  Clang accepts both forms, there is no
functional difference.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r305393 - in head/sys: conf modules/bwn

2016-09-04 Thread Dimitry Andric
Author: dim
Date: Sun Sep  4 17:56:55 2016
New Revision: 305393
URL: https://svnweb.freebsd.org/changeset/base/305393

Log:
  Make some additional -Wconstant-conversion warnings from clang 3.9.0 in
  bwn(4) non-fatal for now.

Modified:
  head/sys/conf/files
  head/sys/modules/bwn/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sun Sep  4 17:55:22 2016(r305392)
+++ head/sys/conf/files Sun Sep  4 17:56:55 2016(r305393)
@@ -1211,13 +1211,13 @@ dev/bwi/bwiphy.coptional bwi
 dev/bwi/bwirf.coptional bwi
 dev/bwi/if_bwi.c   optional bwi
 dev/bwi/if_bwi_pci.c   optional bwi pci
-# XXX Work around clang warning, until maintainer approves fix.
+# XXX Work around clang warnings, until maintainer approves fix.
 dev/bwn/if_bwn.c   optional bwn siba_bwn \
compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}"
 dev/bwn/if_bwn_pci.c   optional bwn pci bhnd
 dev/bwn/if_bwn_phy_common.coptional bwn siba_bwn
 dev/bwn/if_bwn_phy_g.c optional bwn siba_bwn \
-   compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}"
+   compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED} 
${NO_WCONSTANT_CONVERSION}"
 dev/bwn/if_bwn_phy_lp.coptional bwn siba_bwn \
compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}"
 dev/bwn/if_bwn_phy_n.c optional bwn siba_bwn

Modified: head/sys/modules/bwn/Makefile
==
--- head/sys/modules/bwn/Makefile   Sun Sep  4 17:55:22 2016
(r305392)
+++ head/sys/modules/bwn/Makefile   Sun Sep  4 17:56:55 2016
(r305393)
@@ -28,7 +28,7 @@ SRCS+=device_if.h bus_if.h pci_if.h opt
 
 .include 
 
-# XXX Work around clang warning, until maintainer approves fix.
+# XXX Work around clang warnings, until maintainer approves fix.
 CWARNFLAGS.if_bwn.c=   ${NO_WSOMETIMES_UNINITIALIZED}
-CWARNFLAGS.if_bwn_phy_g.c= ${NO_WSOMETIMES_UNINITIALIZED}
+CWARNFLAGS.if_bwn_phy_g.c= ${NO_WSOMETIMES_UNINITIALIZED} 
${NO_WCONSTANT_CONVERSION}
 CWARNFLAGS.if_bwn_phy_lp.c=${NO_WSOMETIMES_UNINITIALIZED}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305392 - head/sys/conf

2016-09-04 Thread Dimitry Andric
Author: dim
Date: Sun Sep  4 17:55:22 2016
New Revision: 305392
URL: https://svnweb.freebsd.org/changeset/base/305392

Log:
  For kernel builds, instead of suppressing certain clang warnings, make
  them non-fatal, so there is some incentive to fix them eventually.

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Sun Sep  4 17:50:23 2016(r305391)
+++ head/sys/conf/kern.mk   Sun Sep  4 17:55:22 2016(r305392)
@@ -17,13 +17,13 @@ CWARNFLAGS?=-Wall -Wredundant-decls -Wn
 # kernel where fixing them is more trouble than it is worth, or where there is
 # a false positive.
 .if ${COMPILER_TYPE} == "clang"
-NO_WCONSTANT_CONVERSION=   -Wno-constant-conversion
-NO_WSHIFT_COUNT_NEGATIVE=  -Wno-shift-count-negative
-NO_WSHIFT_COUNT_OVERFLOW=  -Wno-shift-count-overflow
-NO_WSELF_ASSIGN=   -Wno-self-assign
-NO_WUNNEEDED_INTERNAL_DECL=-Wno-unneeded-internal-declaration
+NO_WCONSTANT_CONVERSION=   -Wno-error-constant-conversion
+NO_WSHIFT_COUNT_NEGATIVE=  -Wno-error-shift-count-negative
+NO_WSHIFT_COUNT_OVERFLOW=  -Wno-error-shift-count-overflow
+NO_WSELF_ASSIGN=   -Wno-error-self-assign
+NO_WUNNEEDED_INTERNAL_DECL=-Wno-error-unneeded-internal-declaration
 NO_WSOMETIMES_UNINITIALIZED=   -Wno-error-sometimes-uninitialized
-NO_WCAST_QUAL= -Wno-cast-qual
+NO_WCAST_QUAL= -Wno-error-cast-qual
 # Several other warnings which might be useful in some cases, but not severe
 # enough to error out the whole kernel build.  Display them anyway, so there is
 # some incentive to fix them eventually.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305389 - head/sys/netinet

2016-09-04 Thread Dimitry Andric
Author: dim
Date: Sun Sep  4 17:23:10 2016
New Revision: 305389
URL: https://svnweb.freebsd.org/changeset/base/305389

Log:
  With clang 3.9.0, compiling sys/netinet/igmp.c results in the following
  warning:
  
  sys/netinet/igmp.c:546:21: error: implicit conversion from 'int' to 'char' 
changes value from 148 to -108 [-Werror,-Wconstant-conversion]
  p->ipopt_list[0] = IPOPT_RA;/* Router Alert Option */
   ~ ^~~~
  sys/netinet/ip.h:153:19: note: expanded from macro 'IPOPT_RA'
  #define IPOPT_RA148 /* router alert */
  ^~~
  
  This is because ipopt_list is an array of char, so IPOPT_RA is wrapped
  to a negative value.  It would be nice to change ipopt_list to an array
  of u_char, but it changes the signature of the public struct ipoption,
  so add an explicit cast to suppress the warning.
  
  Reviewed by:  imp
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D

Modified:
  head/sys/netinet/igmp.c

Modified: head/sys/netinet/igmp.c
==
--- head/sys/netinet/igmp.c Sun Sep  4 16:59:35 2016(r305388)
+++ head/sys/netinet/igmp.c Sun Sep  4 17:23:10 2016(r305389)
@@ -543,10 +543,10 @@ igmp_ra_alloc(void)
m = m_get(M_WAITOK, MT_DATA);
p = mtod(m, struct ipoption *);
p->ipopt_dst.s_addr = INADDR_ANY;
-   p->ipopt_list[0] = IPOPT_RA;/* Router Alert Option */
-   p->ipopt_list[1] = 0x04;/* 4 bytes long */
-   p->ipopt_list[2] = IPOPT_EOL;   /* End of IP option list */
-   p->ipopt_list[3] = 0x00;/* pad byte */
+   p->ipopt_list[0] = (char)IPOPT_RA;  /* Router Alert Option */
+   p->ipopt_list[1] = 0x04;/* 4 bytes long */
+   p->ipopt_list[2] = IPOPT_EOL;   /* End of IP option list */
+   p->ipopt_list[3] = 0x00;/* pad byte */
m->m_len = sizeof(p->ipopt_dst) + p->ipopt_list[1];
 
return (m);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305388 - head/sys/dev/usb/serial

2016-09-04 Thread Dimitry Andric
Author: dim
Date: Sun Sep  4 16:59:35 2016
New Revision: 305388
URL: https://svnweb.freebsd.org/changeset/base/305388

Log:
  With clang 3.9.0, compiling uplcom results in the following warnings:
  
  sys/dev/usb/serial/uplcom.c:543:29: error: implicit conversion from 'int' to 
'int8_t' (aka 'signed char') changes value from 192 to -64 
[-Werror,-Wconstant-conversion]
  if (uplcom_pl2303_do(udev, UT_READ_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 
0x8484, 0, 1)
     ^
  sys/dev/usb/usb.h:179:53: note: expanded from macro 'UT_READ_VENDOR_DEVICE'
  #define UT_READ_VENDOR_DEVICE   (UT_READ  | UT_VENDOR | UT_DEVICE)
   ~^~~
  
  This is because UT_READ is 0x80, so the int8_t argument is wrapped to a
  negative value.  Fix this by using uint8_t instead.
  
  Reviewed by:  imp, hselasky
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D7776

Modified:
  head/sys/dev/usb/serial/uplcom.c

Modified: head/sys/dev/usb/serial/uplcom.c
==
--- head/sys/dev/usb/serial/uplcom.cSun Sep  4 16:54:55 2016
(r305387)
+++ head/sys/dev/usb/serial/uplcom.cSun Sep  4 16:59:35 2016
(r305388)
@@ -166,7 +166,7 @@ struct uplcom_softc {
 /* prototypes */
 
 static usb_error_t uplcom_reset(struct uplcom_softc *, struct usb_device *);
-static usb_error_t uplcom_pl2303_do(struct usb_device *, int8_t, uint8_t,
+static usb_error_t uplcom_pl2303_do(struct usb_device *, uint8_t, uint8_t,
uint16_t, uint16_t, uint16_t);
 static int uplcom_pl2303_init(struct usb_device *, uint8_t);
 static voiduplcom_free(struct ucom_softc *);
@@ -514,7 +514,7 @@ uplcom_reset(struct uplcom_softc *sc, st
 }
 
 static usb_error_t
-uplcom_pl2303_do(struct usb_device *udev, int8_t req_type, uint8_t request,
+uplcom_pl2303_do(struct usb_device *udev, uint8_t req_type, uint8_t request,
 uint16_t value, uint16_t index, uint16_t length)
 {
struct usb_device_request req;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305360 - head/sys/dev/cxgb

2016-09-03 Thread Dimitry Andric
Author: dim
Date: Sat Sep  3 19:01:11 2016
New Revision: 305360
URL: https://svnweb.freebsd.org/changeset/base/305360

Log:
  With clang 3.9.0, compiling cxgb results in the following warning:
  
  sys/dev/cxgb/cxgb_sge.c:2873:44: error: implicit conversion from 'int'
  to 'char' changes value from 128 to -128 [-Werror,-Wconstant-conversion]
  *mtod(m, char *) = CPL_ASYNC_NOTIF;
   ~ ^~~
  
  This is because CPL_ASYNC_NOTIF is 0x80, so the plain char argument is
  wrapped to a negative value.  Fix this by using uint8_t instead.
  
  Reviewed by:  np
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D7772

Modified:
  head/sys/dev/cxgb/cxgb_sge.c

Modified: head/sys/dev/cxgb/cxgb_sge.c
==
--- head/sys/dev/cxgb/cxgb_sge.cSat Sep  3 18:54:26 2016
(r305359)
+++ head/sys/dev/cxgb/cxgb_sge.cSat Sep  3 19:01:11 2016
(r305360)
@@ -2870,7 +2870,7 @@ process_responses(adapter_t *adap, struc
 
 memcpy(mtod(m, char *), r, AN_PKT_SIZE);
m->m_len = m->m_pkthdr.len = AN_PKT_SIZE;
-*mtod(m, char *) = CPL_ASYNC_NOTIF;
+*mtod(m, uint8_t *) = CPL_ASYNC_NOTIF;
opcode = CPL_ASYNC_NOTIF;
eop = 1;
 rspq->async_notif++;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305345 - head/sys/dev/ppbus

2016-09-03 Thread Dimitry Andric
Author: dim
Date: Sat Sep  3 13:48:44 2016
New Revision: 305345
URL: https://svnweb.freebsd.org/changeset/base/305345

Log:
  With clang 3.9.0, compiling ppbus(4) results in the following warnings:
  
  sys/dev/ppbus/ppb_1284.c:296:46: error: implicit conversion from 'int'
  to 'char' changes value from 144 to -112 [-Werror,-Wconstant-conversion]
  if ((error = do_peripheral_wait(bus, SELECT | nBUSY, 0))) {
   ~~  ~~~^~~
  sys/dev/ppbus/ppb_1284.c:785:48: error: implicit conversion from 'int'
  to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion]
  if (do_1284_wait(bus, nACK | SELECT | PERROR | nBUSY,
    ~~~^~~
  sys/dev/ppbus/ppb_1284.c:786:29: error: implicit conversion from 'int'
  to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion]
  nACK | SELECT | PERROR | nBUSY)) {
  ~~~^~~
  
  This is because nBUSY is 0x80, so the plain char argument is wrapped to
  a negative value.  Fix this in a minimal fashion, by using uint8_t in a
  few places.
  
  Reviewed by:  emaste
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D7771

Modified:
  head/sys/dev/ppbus/ppb_1284.c
  head/sys/dev/ppbus/ppb_base.c
  head/sys/dev/ppbus/ppbconf.h

Modified: head/sys/dev/ppbus/ppb_1284.c
==
--- head/sys/dev/ppbus/ppb_1284.c   Sat Sep  3 13:33:28 2016
(r305344)
+++ head/sys/dev/ppbus/ppb_1284.c   Sat Sep  3 13:48:44 2016
(r305345)
@@ -57,13 +57,13 @@ __FBSDID("$FreeBSD$");
  * Wait for the peripherial up to 40ms
  */
 static int
-do_1284_wait(device_t bus, char mask, char status)
+do_1284_wait(device_t bus, uint8_t mask, uint8_t status)
 {
return (ppb_poll_bus(bus, 4, mask, status, PPB_NOINTR | PPB_POLL));
 }
 
 static int
-do_peripheral_wait(device_t bus, char mask, char status)
+do_peripheral_wait(device_t bus, uint8_t mask, uint8_t status)
 {
return (ppb_poll_bus(bus, 100, mask, status, PPB_NOINTR | PPB_POLL));
 }

Modified: head/sys/dev/ppbus/ppb_base.c
==
--- head/sys/dev/ppbus/ppb_base.c   Sat Sep  3 13:33:28 2016
(r305344)
+++ head/sys/dev/ppbus/ppb_base.c   Sat Sep  3 13:48:44 2016
(r305345)
@@ -54,11 +54,11 @@ MODULE_VERSION(ppbus, 1);
  */
 int
 ppb_poll_bus(device_t bus, int max,
-char mask, char status, int how)
+uint8_t mask, uint8_t status, int how)
 {
struct ppb_data *ppb = DEVTOSOFTC(bus);
int i, j, error;
-   char r;
+   uint8_t r;
 
ppb_assert_locked(bus);
 
@@ -186,7 +186,7 @@ ppb_ecp_sync(device_t bus)
 int
 ppb_get_status(device_t bus, struct ppb_status *status)
 {
-   register char r;
+   uint8_t r;
 
ppb_assert_locked(bus);
 

Modified: head/sys/dev/ppbus/ppbconf.h
==
--- head/sys/dev/ppbus/ppbconf.hSat Sep  3 13:33:28 2016
(r305344)
+++ head/sys/dev/ppbus/ppbconf.hSat Sep  3 13:48:44 2016
(r305345)
@@ -263,7 +263,7 @@ extern void _ppb_assert_locked(device_t,
 extern void ppb_init_callout(device_t, struct callout *, int);
 extern int ppb_sleep(device_t, void *, int, const char *, int);
 extern int ppb_get_status(device_t, struct ppb_status *);
-extern int ppb_poll_bus(device_t, int, char, char, int);
+extern int ppb_poll_bus(device_t, int, uint8_t, uint8_t, int);
 extern int ppb_reset_epp_timeout(device_t);
 extern int ppb_ecp_sync(device_t);
 extern int ppb_get_epp_protocol(device_t);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305344 - head/sys/dev/drm2

2016-09-03 Thread Dimitry Andric
Author: dim
Date: Sat Sep  3 13:33:28 2016
New Revision: 305344
URL: https://svnweb.freebsd.org/changeset/base/305344

Log:
  Define drmP.h's __OS_HAS_AGP and __OS_HAS_MTRR macros in a defined and
  portable way.
  
  Reviewed by:  dumbbell
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D7770

Modified:
  head/sys/dev/drm2/drmP.h

Modified: head/sys/dev/drm2/drmP.h
==
--- head/sys/dev/drm2/drmP.hSat Sep  3 13:01:37 2016(r305343)
+++ head/sys/dev/drm2/drmP.hSat Sep  3 13:33:28 2016(r305344)
@@ -103,8 +103,16 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && 
defined(MODULE)))
-#define __OS_HAS_MTRR (defined(CONFIG_MTRR))
+#if defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))
+#define __OS_HAS_AGP 1
+#else
+#define __OS_HAS_AGP 0
+#endif
+#if defined(CONFIG_MTRR)
+#define __OS_HAS_MTRR 1
+#else
+#define __OS_HAS_MTRR 0
+#endif
 
 struct drm_file;
 struct drm_device;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305218 - head/contrib/llvm/lib/Target/AArch64

2016-09-01 Thread Dimitry Andric
Author: dim
Date: Thu Sep  1 18:11:44 2016
New Revision: 305218
URL: https://svnweb.freebsd.org/changeset/base/305218

Log:
  Pull in r277331 from upstream llvm trunk (by Diana Picus):
  
[AArch64] Return the correct size for TLSDESC_CALLSEQ
  
The branch relaxation pass is computing the wrong offsets because it assumes
TLSDESC_CALLSEQ eats up 4 bytes, when in fact it is lowered to an 
instruction
sequence taking up 16 bytes. This can become a problem in huge files with 
lots
of TLS accesses, as it may slowly move branch targets out of the range 
computed
by the branch relaxation pass.
  
Fixes PR24234 https://llvm.org/bugs/show_bug.cgi?id=24234
  
Differential Revision: https://reviews.llvm.org/D22870
  
  This fixes "error in backend: fixup value out of range" when compiling
  the misc/talkfilters port for AArch64.
  
  Reported by:  sbruno
  PR:   201762
  MFC after:3 days

Modified:
  head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

Modified: head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
==
--- head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp   Thu Sep  1 
18:03:34 2016(r305217)
+++ head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp   Thu Sep  1 
18:11:44 2016(r305218)
@@ -52,6 +52,9 @@ unsigned AArch64InstrInfo::GetInstSizeIn
   case TargetOpcode::IMPLICIT_DEF:
   case TargetOpcode::KILL:
 return 0;
+  case AArch64::TLSDESC_CALLSEQ:
+// This gets lowered to an instruction sequence which takes 16 bytes
+return 16;
   }
 
   llvm_unreachable("GetInstSizeInBytes()- Unable to determin insn size");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r304510 - head/sys/dev/ixl

2016-08-31 Thread Dimitry Andric
On 31 Aug 2016, at 18:53, Ed Maste  wrote:
> 
> On 19 August 2016 at 20:08, Eric Joyner  wrote:
>> Author: erj
>> Date: Sat Aug 20 00:08:10 2016
>> New Revision: 304510
>> URL: https://svnweb.freebsd.org/changeset/base/304510
>> 
>> Log:
>>  ixlv(4): Fix ixlv(4) not loading when loaded as a kernel module and netmap 
>> is enabled.
> 
> I did not confirm it's this commit, but kernel builds currently have
> this warning:
> 
> if_ixlv.o: warning: common of `ixl_crcstrip' overridden by definition
> if_ixl.o: warning: defined here
> if_ixlv.o: warning: multiple common of `ixl_rx_miss'
> if_ixl.o: warning: previous common is here
> if_ixlv.o: warning: multiple common of `ixl_rx_miss_bufs'
> if_ixl.o: warning: previous common is here

Interestingly, with the external gcc build, it is even an error:

--- kernel.full ---
linking kernel.full
if_ixlv.o:(.bss+0x0): multiple definition of `ixl_crcstrip'
if_ixl.o:(.data+0xb8): first defined here
if_ixlv.o: In function `ixlv_media_change':
/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixlv.c:2252: multiple definition 
of `ixl_rx_miss_bufs'
if_ixl.o:/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixl.c:680: first defined 
here
if_ixlv.o: In function `ixlv_media_change':
/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixlv.c:2262: multiple definition 
of `ixl_rx_miss'
if_ixl.o:/builds/FreeBSD_HEAD_amd64_gcc/sys/dev/ixl/if_ixl.c:681: first defined 
here
*** [kernel.full] Error code 1

See e.g. https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/1505/console

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r305086 - head/contrib/telnet/telnet

2016-08-30 Thread Dimitry Andric
Author: dim
Date: Tue Aug 30 20:27:22 2016
New Revision: 305086
URL: https://svnweb.freebsd.org/changeset/base/305086

Log:
  Fix warnings in telnet about invalid constant conversions, e.g.:
  
  contrib/telnet/telnet/commands.c:2914:13: error: implicit conversion
  from 'int' to 'char' changes value from 137 to -119
  [-Werror,-Wconstant-conversion]
  *lsrp++ = IPOPT_SSRR;
  ~ ^~
  /usr/include/netinet/ip.h:152:21: note: expanded from macro 'IPOPT_SSRR'
  #define IPOPT_SSRR  137 /* strict source route */
  ^~~
  contrib/telnet/telnet/commands.c:2916:13: error: implicit conversion
  from 'int' to 'char' changes value from 131 to -125
  [-Werror,-Wconstant-conversion]
  *lsrp++ = IPOPT_LSRR;
  ~ ^~
  /usr/include/netinet/ip.h:148:21: note: expanded from macro 'IPOPT_LSRR'
  #define IPOPT_LSRR  131 /* loose source route */
  ^~~
  
  Use unsigned char buffers instead.
  
  MFC after:1 week

Modified:
  head/contrib/telnet/telnet/commands.c

Modified: head/contrib/telnet/telnet/commands.c
==
--- head/contrib/telnet/telnet/commands.c   Tue Aug 30 20:24:50 2016
(r305085)
+++ head/contrib/telnet/telnet/commands.c   Tue Aug 30 20:27:22 2016
(r305086)
@@ -112,7 +112,7 @@ static int send_tncmd(void (*)(int, int)
 static int setmod(int);
 static int clearmode(int);
 static int modehelp(void);
-static int sourceroute(struct addrinfo *, char *, char **, int *, int *, int 
*);
+static int sourceroute(struct addrinfo *, char *, unsigned char **, int *, int 
*, int *);
 
 typedef struct {
const char *name;   /* command name */
@@ -2171,7 +2171,7 @@ switch_af(struct addrinfo **aip)
 int
 tn(int argc, char *argv[])
 {
-char *srp = 0;
+unsigned char *srp = 0;
 int proto, opt;
 int srlen;
 int srcroute = 0, result;
@@ -2844,10 +2844,10 @@ cmdrc(char *m1, char *m2)
  * setsockopt, as socket protocol family.
  */
 static int
-sourceroute(struct addrinfo *ai, char *arg, char **cpp, int *lenp, int 
*protop, int *optp)
+sourceroute(struct addrinfo *ai, char *arg, unsigned char **cpp, int *lenp, 
int *protop, int *optp)
 {
static char buf[1024 + ALIGNBYTES]; /*XXX*/
-   char *cp, *cp2, *lsrp, *ep;
+   unsigned char *cp, *cp2, *lsrp, *ep;
struct sockaddr_in *_sin;
 #ifdef INET6
struct sockaddr_in6 *sin6;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305085 - head/contrib/tnftp/src

2016-08-30 Thread Dimitry Andric
Author: dim
Date: Tue Aug 30 20:24:50 2016
New Revision: 305085
URL: https://svnweb.freebsd.org/changeset/base/305085

Log:
  Fix warnings in tnftp about invalid constant conversions, e.g.:
  
  contrib/tnftp/src/ftp.c:2067:11: error: implicit conversion from 'int'
  to 'char' changes value from 255 to -1 [-Werror,-Wconstant-conversion]
  buf[0] = IAC;
 ~ ^~~
  /usr/include/arpa/telnet.h:39:13: note: expanded from macro 'IAC'
  #define IAC 255 /* interpret as command: */
  ^~~
  contrib/tnftp/src/ftp.c:2068:11: error: implicit conversion from 'int'
  to 'char' changes value from 244 to -12 [-Werror,-Wconstant-conversion]
  buf[1] = IP;
 ~ ^~
  /usr/include/arpa/telnet.h:50:12: note: expanded from macro 'IP'
  #define IP  244 /* interrupt process--permanently */
  ^~~
  
  Use an unsigned char buffer instead.
  
  MFC after:1 week

Modified:
  head/contrib/tnftp/src/ftp.c

Modified: head/contrib/tnftp/src/ftp.c
==
--- head/contrib/tnftp/src/ftp.cTue Aug 30 19:58:41 2016
(r305084)
+++ head/contrib/tnftp/src/ftp.cTue Aug 30 20:24:50 2016
(r305085)
@@ -2050,7 +2050,7 @@ abort_squared(int dummy)
 void
 abort_remote(FILE *din)
 {
-   char buf[BUFSIZ];
+   unsigned char buf[BUFSIZ];
int nfnd;
 
if (cout == NULL) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305077 - in head: contrib/telnet/libtelnet usr.bin/newkey

2016-08-30 Thread Dimitry Andric
Author: dim
Date: Tue Aug 30 19:02:15 2016
New Revision: 305077
URL: https://svnweb.freebsd.org/changeset/base/305077

Log:
  Squelch clang 3.9.0 warnings about BASE (which is 32768) being converted
  to -32768 when it is used as an argument to mp_itom(), in both libtelnet
  and newkey.  This code has been wrong since r26238 (!), so after almost
  20 years it is rather useless to try to correct it.
  
  MFC after:1 week

Modified:
  head/contrib/telnet/libtelnet/pk.c
  head/usr.bin/newkey/generic.c

Modified: head/contrib/telnet/libtelnet/pk.c
==
--- head/contrib/telnet/libtelnet/pk.c  Tue Aug 30 18:27:31 2016
(r305076)
+++ head/contrib/telnet/libtelnet/pk.c  Tue Aug 30 19:02:15 2016
(r305077)
@@ -164,7 +164,7 @@ genkeys(char *public, char *secret)
 MINT *pk = mp_itom(0);
 MINT *sk = mp_itom(0);
 MINT *tmp;
-MINT *base = mp_itom(BASE);
+MINT *base = mp_itom((short)BASE);
 MINT *root = mp_itom(PROOT);
 MINT *modulus = mp_xtom(HEXMODULUS);
 short r;

Modified: head/usr.bin/newkey/generic.c
==
--- head/usr.bin/newkey/generic.c   Tue Aug 30 18:27:31 2016
(r305076)
+++ head/usr.bin/newkey/generic.c   Tue Aug 30 19:02:15 2016
(r305077)
@@ -82,7 +82,7 @@ genkeys(char *public, char *secret, char
MINT *pk = mp_itom(0);
MINT *sk = mp_itom(0);
MINT *tmp;
-   MINT *base = mp_itom(BASE);
+   MINT *base = mp_itom((short)BASE);
MINT *root = mp_itom(PROOT);
MINT *modulus = mp_xtom(HEXMODULUS);
short r;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305023 - head/usr.sbin/bluetooth/btpand

2016-08-29 Thread Dimitry Andric
Author: dim
Date: Mon Aug 29 19:40:46 2016
New Revision: 305023
URL: https://svnweb.freebsd.org/changeset/base/305023

Log:
  Avoid undefined behavior when calling va_start() in bnep_send_control(),
  by making the 'type' parameter a plain unsigned.
  
  MFC after:3 days

Modified:
  head/usr.sbin/bluetooth/btpand/bnep.c
  head/usr.sbin/bluetooth/btpand/btpand.h

Modified: head/usr.sbin/bluetooth/btpand/bnep.c
==
--- head/usr.sbin/bluetooth/btpand/bnep.c   Mon Aug 29 19:33:07 2016
(r305022)
+++ head/usr.sbin/bluetooth/btpand/bnep.c   Mon Aug 29 19:40:46 2016
(r305023)
@@ -574,7 +574,7 @@ bnep_recv_filter_multi_addr_rsp(channel_
 }
 
 void
-bnep_send_control(channel_t *chan, uint8_t type, ...)
+bnep_send_control(channel_t *chan, unsigned type, ...)
 {
packet_t *pkt;
uint8_t *p;
@@ -590,7 +590,7 @@ bnep_send_control(channel_t *chan, uint8
va_start(ap, type);
 
*p++ = BNEP_CONTROL;
-   *p++ = type;
+   *p++ = (uint8_t)type;
 
switch(type) {
case BNEP_CONTROL_COMMAND_NOT_UNDERSTOOD:

Modified: head/usr.sbin/bluetooth/btpand/btpand.h
==
--- head/usr.sbin/bluetooth/btpand/btpand.h Mon Aug 29 19:33:07 2016
(r305022)
+++ head/usr.sbin/bluetooth/btpand/btpand.h Mon Aug 29 19:40:46 2016
(r305023)
@@ -183,7 +183,7 @@ b2eaddr(void *dst, bdaddr_t *src)
 /* bnep.c */
 bool   bnep_send(channel_t *, packet_t *);
 bool   bnep_recv(packet_t *);
-void   bnep_send_control(channel_t *, uint8_t, ...);
+void   bnep_send_control(channel_t *, unsigned, ...);
 
 /* channel.c */
 void   channel_init(void);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r305016 - head/cddl/usr.sbin/zfsd/tests

2016-08-29 Thread Dimitry Andric
Author: dim
Date: Mon Aug 29 18:55:06 2016
New Revision: 305016
URL: https://svnweb.freebsd.org/changeset/base/305016

Log:
  Fix the zfsd unittest:
  * TESTSDIR is supposed to be under cddl/usr.sbin, not cddl/sbin
  * DevdCtl::EventBuffer no longer exists, so remove its forward
declaration
  
  MFC after:3 days
  X-MFC-With:   r305013

Modified:
  head/cddl/usr.sbin/zfsd/tests/Makefile
  head/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc

Modified: head/cddl/usr.sbin/zfsd/tests/Makefile
==
--- head/cddl/usr.sbin/zfsd/tests/Makefile  Mon Aug 29 18:53:51 2016
(r305015)
+++ head/cddl/usr.sbin/zfsd/tests/Makefile  Mon Aug 29 18:55:06 2016
(r305016)
@@ -4,7 +4,7 @@ SRCDIR=${.CURDIR}/../../../..
 .include "${.CURDIR}/../Makefile.common"
 .PATH: ${.CURDIR}/..
 
-TESTSDIR?= ${TESTSBASE}/cddl/sbin/zfsd
+TESTSDIR?= ${TESTSBASE}/cddl/usr.sbin/zfsd
 
 PLAIN_TESTS_CXX=   zfsd_unittest
 SRCS.zfsd_unittest:=   ${SRCS:Nzfsd_main.cc}

Modified: head/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc
==
--- head/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc  Mon Aug 29 18:53:51 
2016(r305015)
+++ head/cddl/usr.sbin/zfsd/tests/zfsd_unittest.cc  Mon Aug 29 18:55:06 
2016(r305016)
@@ -72,7 +72,6 @@ using std::string;
 using std::stringstream;
 
 using DevdCtl::Event;
-using DevdCtl::EventBuffer;
 using DevdCtl::EventFactory;
 using DevdCtl::EventList;
 using DevdCtl::Guid;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r304969 - head/sbin/hastd

2016-08-28 Thread Dimitry Andric
Author: dim
Date: Sun Aug 28 21:26:11 2016
New Revision: 304969
URL: https://svnweb.freebsd.org/changeset/base/304969

Log:
  Define hastd's STRICT_ALIGN macro in a defined and portable way.
  
  MFC after:3 days

Modified:
  head/sbin/hastd/lzf.h

Modified: head/sbin/hastd/lzf.h
==
--- head/sbin/hastd/lzf.h   Sun Aug 28 20:53:31 2016(r304968)
+++ head/sbin/hastd/lzf.h   Sun Aug 28 21:26:11 2016(r304969)
@@ -132,7 +132,11 @@ lzf_decompress (const void *const in_dat
  * Unconditionally aligning does not cost very much, so do it if unsure
  */
 #ifndef STRICT_ALIGN
-# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
+# if !(defined(__i386) || defined (__amd64))
+#  define STRICT_ALIGN 1
+# else
+#  define STRICT_ALIGN 0
+# endif
 #endif
 
 /*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r304953 - head/sys/contrib/ipfilter/netinet

2016-08-28 Thread Dimitry Andric
On 28 Aug 2016, at 18:27, Ngie Cooper (yaneurabeya) <yaneurab...@gmail.com> 
wrote:
> 
>> On Aug 28, 2016, at 4:51 AM, Dimitry Andric <d...@freebsd.org> wrote:
>> 
>> Author: dim
>> Date: Sun Aug 28 11:51:46 2016
>> New Revision: 304953
>> URL: https://svnweb.freebsd.org/changeset/base/304953
>> 
>> Log:
>>  Define ipfilter's SOLARIS macro in a defined and portable way.
>> 
>>  Reviewed by:cy
>>  MFC after:  3 days
>>  Differential Revision: https://reviews.freebsd.org/D7671
> 
> This broke the build with DTrace/ZFS— could you please fix it or back it out? 
> https://jenkins.freebsd.org/job/FreeBSD_HEAD_i386/3802/console

Sorry about that, it hould now be fixed by r304959 and r304964.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r304964 - in head: contrib/ipfilter sys/contrib/ipfilter/netinet

2016-08-28 Thread Dimitry Andric
Author: dim
Date: Sun Aug 28 19:35:29 2016
New Revision: 304964
URL: https://svnweb.freebsd.org/changeset/base/304964

Log:
  Follow-up to r304953, in which I broke the build: apparently the SOLARIS
  macro is defined in lots of different places in ipfilter, so replace all
  of the nonportable definitions with portable ones.
  
  Pointy hat to:dim
  X-MFC-With:   r304959, r304953
  MFC after:3 days

Modified:
  head/contrib/ipfilter/opts.h
  head/sys/contrib/ipfilter/netinet/ip_compat.h
  head/sys/contrib/ipfilter/netinet/ip_fil.h
  head/sys/contrib/ipfilter/netinet/ip_log.c
  head/sys/contrib/ipfilter/netinet/ip_nat.h
  head/sys/contrib/ipfilter/netinet/ip_proxy.h

Modified: head/contrib/ipfilter/opts.h
==
--- head/contrib/ipfilter/opts.hSun Aug 28 19:34:22 2016
(r304963)
+++ head/contrib/ipfilter/opts.hSun Aug 28 19:35:29 2016
(r304964)
@@ -12,7 +12,11 @@
 #define__OPTS_H__
 
 #ifndefSOLARIS
-#defineSOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+#  define  SOLARIS 1
+# else
+#  define  SOLARIS 0
+# endif
 #endif
 #defineOPT_REMOVE  0x01
 #defineOPT_DEBUG   0x02

Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
==
--- head/sys/contrib/ipfilter/netinet/ip_compat.h   Sun Aug 28 19:34:22 
2016(r304963)
+++ head/sys/contrib/ipfilter/netinet/ip_compat.h   Sun Aug 28 19:35:29 
2016(r304964)
@@ -32,10 +32,12 @@
 # define   __KERNEL__
 #endif
 
-#if defined(sun) && (defined(__svr4__) || defined(__SVR4))
-# define   SOLARIS 1
-#else
-# define   SOLARIS 0
+#ifndefSOLARIS
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+#  define  SOLARIS 1
+# else
+#  define  SOLARIS 0
+# endif
 #endif
 
 

Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h
==
--- head/sys/contrib/ipfilter/netinet/ip_fil.h  Sun Aug 28 19:34:22 2016
(r304963)
+++ head/sys/contrib/ipfilter/netinet/ip_fil.h  Sun Aug 28 19:35:29 2016
(r304964)
@@ -29,7 +29,11 @@
 #endif
 
 #ifndefSOLARIS
-# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+#  define  SOLARIS 1
+# else
+#  define  SOLARIS 0
+# endif
 #endif
 
 #ifndef__P

Modified: head/sys/contrib/ipfilter/netinet/ip_log.c
==
--- head/sys/contrib/ipfilter/netinet/ip_log.c  Sun Aug 28 19:34:22 2016
(r304963)
+++ head/sys/contrib/ipfilter/netinet/ip_log.c  Sun Aug 28 19:35:29 2016
(r304964)
@@ -19,11 +19,11 @@
 # include 
 #endif
 #ifndef SOLARIS
-#if defined(sun) && (defined(__svr4__) || defined(__SVR4))
-# define   SOLARIS 1
-#else
-# define   SOLARIS 0
-#endif
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+#  define  SOLARIS 1
+# else
+#  define  SOLARIS 0
+# endif
 #endif
 #include 
 #include 

Modified: head/sys/contrib/ipfilter/netinet/ip_nat.h
==
--- head/sys/contrib/ipfilter/netinet/ip_nat.h  Sun Aug 28 19:34:22 2016
(r304963)
+++ head/sys/contrib/ipfilter/netinet/ip_nat.h  Sun Aug 28 19:35:29 2016
(r304964)
@@ -13,8 +13,12 @@
 #ifndef__IP_NAT_H__
 #define__IP_NAT_H__
 
-#ifndef SOLARIS
-#defineSOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+#ifndefSOLARIS
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+#  define  SOLARIS 1
+# else
+#  define  SOLARIS 0
+# endif
 #endif
 
 #if defined(__STDC__) || defined(__GNUC__) || defined(_AIX51)

Modified: head/sys/contrib/ipfilter/netinet/ip_proxy.h
==
--- head/sys/contrib/ipfilter/netinet/ip_proxy.hSun Aug 28 19:34:22 
2016(r304963)
+++ head/sys/contrib/ipfilter/netinet/ip_proxy.hSun Aug 28 19:35:29 
2016(r304964)
@@ -12,8 +12,12 @@
 #ifndef__IP_PROXY_H__
 #define__IP_PROXY_H__
 
-#ifndef SOLARIS
-#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+#ifndefSOLARIS
+# if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+#  define  SOLARIS 1
+# else
+#  define  SOLARIS 0
+# endif
 #endif
 
 #if defined(__STDC__) || defined(__GNUC__) || defined(_AIX51)
___
svn-src-head@freebsd.org mailing list

svn commit: r304953 - head/sys/contrib/ipfilter/netinet

2016-08-28 Thread Dimitry Andric
Author: dim
Date: Sun Aug 28 11:51:46 2016
New Revision: 304953
URL: https://svnweb.freebsd.org/changeset/base/304953

Log:
  Define ipfilter's SOLARIS macro in a defined and portable way.
  
  Reviewed by:  cy
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D7671

Modified:
  head/sys/contrib/ipfilter/netinet/ip_compat.h

Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
==
--- head/sys/contrib/ipfilter/netinet/ip_compat.h   Sun Aug 28 07:40:11 
2016(r304952)
+++ head/sys/contrib/ipfilter/netinet/ip_compat.h   Sun Aug 28 11:51:46 
2016(r304953)
@@ -32,7 +32,11 @@
 # define   __KERNEL__
 #endif
 
-#defineSOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
+#if defined(sun) && (defined(__svr4__) || defined(__SVR4))
+# define   SOLARIS 1
+#else
+# define   SOLARIS 0
+#endif
 
 
 #if defined(__SVR4) || defined(__svr4__) || defined(__sgi)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r304920 - head/contrib/ncurses/ncurses/tinfo

2016-08-27 Thread Dimitry Andric
Author: dim
Date: Sat Aug 27 20:33:19 2016
New Revision: 304920
URL: https://svnweb.freebsd.org/changeset/base/304920

Log:
  In ncurses baudrate definitions, avoid warnings about implicit
  conversions from int to short changing the values.  This applies to
  B38400 and higher, since their values do not fit into a short.
  
  However, since the wrapped values are still unique, and they only serve
  as keys, there is no problem in adding a cast to silence the warnings.
  This also avoids changing the ABI, which would happen if we changed
  NCURSES_OSPEED to int.
  
  Discussed with:   Thomas Dickey
  MFC after:1 week

Modified:
  head/contrib/ncurses/ncurses/tinfo/lib_baudrate.c

Modified: head/contrib/ncurses/ncurses/tinfo/lib_baudrate.c
==
--- head/contrib/ncurses/ncurses/tinfo/lib_baudrate.c   Sat Aug 27 20:08:34 
2016(r304919)
+++ head/contrib/ncurses/ncurses/tinfo/lib_baudrate.c   Sat Aug 27 20:33:19 
2016(r304920)
@@ -94,7 +94,7 @@ struct speed {
 int sp;/* the actual speed */
 };
 
-#define DATA(number) { B##number, number }
+#define DATA(number) { (NCURSES_OSPEED)B##number, number }
 
 static struct speed const speeds[] =
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r304696 - head/share/mk

2016-08-23 Thread Dimitry Andric
Author: dim
Date: Tue Aug 23 19:31:43 2016
New Revision: 304696
URL: https://svnweb.freebsd.org/changeset/base/304696

Log:
  In addition to creating subdirectories under .OBJDIR for SRCS with
  relative paths, also create them for DPSRCS.  This is needed for builds
  that generate files during the depend stage, which cannot be compiled by
  themselves, since those have to be put in DPSRCS.

Modified:
  head/share/mk/bsd.obj.mk

Modified: head/share/mk/bsd.obj.mk
==
--- head/share/mk/bsd.obj.mkTue Aug 23 19:29:37 2016(r304695)
+++ head/share/mk/bsd.obj.mkTue Aug 23 19:31:43 2016(r304696)
@@ -102,7 +102,7 @@ obj: .PHONY
fi; \
${ECHO} "${CANONICALOBJDIR} created for ${.CURDIR}"; \
fi
-.for dir in ${SRCS:H:O:u}
+.for dir in ${SRCS:H:O:u} ${DPSRCS:H:O:u}
@if ! test -d ${CANONICALOBJDIR}/${dir}/; then \
mkdir -p ${CANONICALOBJDIR}/${dir}; \
if ! test -d ${CANONICALOBJDIR}/${dir}/; then \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r304530 - in head: contrib/llvm/lib/Target/ARM/MCTargetDesc lib/clang

2016-08-20 Thread Dimitry Andric
Author: dim
Date: Sat Aug 20 14:04:51 2016
New Revision: 304530
URL: https://svnweb.freebsd.org/changeset/base/304530

Log:
  Pull in r265122 from upstream llvm trunk (by James Molloy):
  
Fix for pr24346: arm asm label calculation error in sub
  
Some ARM instructions encode 32-bit immediates as a 8-bit integer
(0-255) and a 4-bit rotation (0-30, even) in its least significant 12
bits. The original fixup, FK_Data_4, patches the instruction by the
value bit-to-bit, regardless of the encoding. For example, assuming
the label L1 and L2 are 0x0 and 0x104 respectively, the following
instruction:
  
  add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260
  
would be assembled to the following, which adds 1 to r0, instead of
260:
  
  e2800104 add r0, r0, #4, 2 ; equivalently 1
  
The new fixup kind fixup_arm_mod_imm takes care of the encoding:
  
  e2800f41 add r0, r0, #260
  
Patch by Ting-Yuan Huang!
  
  This fixes label calculation for ARM assembly, and is needed to enable
  ARM assembly sources for OpenSSL.
  
  Requested by: jkim
  MFC after:3 days

Modified:
  head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
  head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h
  head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
  head/lib/clang/freebsd_cc_version.h

Modified: head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
==
--- head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Sat Aug 
20 13:29:58 2016(r304529)
+++ head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Sat Aug 
20 14:04:51 2016(r304530)
@@ -90,6 +90,7 @@ const MCFixupKindInfo ::ge
   {"fixup_arm_movw_lo16", 0, 20, 0},
   {"fixup_t2_movt_hi16", 0, 20, 0},
   {"fixup_t2_movw_lo16", 0, 20, 0},
+  {"fixup_arm_mod_imm", 0, 12, 0},
   };
   const static MCFixupKindInfo InfosBE[ARM::NumTargetFixupKinds] = {
   // This table *must* be in the order that the fixup_* kinds are defined 
in
@@ -133,6 +134,7 @@ const MCFixupKindInfo ::ge
   {"fixup_arm_movw_lo16", 12, 20, 0},
   {"fixup_t2_movt_hi16", 12, 20, 0},
   {"fixup_t2_movw_lo16", 12, 20, 0},
+  {"fixup_arm_mod_imm", 20, 12, 0},
   };
 
   if (Kind < FirstTargetFixupKind)
@@ -624,6 +626,13 @@ unsigned ARMAsmBackend::adjustFixupValue
 
 return Value;
   }
+  case ARM::fixup_arm_mod_imm:
+Value = ARM_AM::getSOImmVal(Value);
+if (Ctx && Value >> 12) {
+  Ctx->reportError(Fixup.getLoc(), "out of range immediate fixup value");
+  return 0;
+}
+return Value;
   }
 }
 
@@ -690,6 +699,7 @@ static unsigned getFixupKindNumBytes(uns
   case FK_Data_2:
   case ARM::fixup_arm_thumb_br:
   case ARM::fixup_arm_thumb_cb:
+  case ARM::fixup_arm_mod_imm:
 return 2;
 
   case ARM::fixup_arm_pcrel_10_unscaled:
@@ -766,6 +776,7 @@ static unsigned getFixupKindContainerSiz
   case ARM::fixup_arm_movw_lo16:
   case ARM::fixup_t2_movt_hi16:
   case ARM::fixup_t2_movw_lo16:
+  case ARM::fixup_arm_mod_imm:
 // Instruction size is 4 bytes.
 return 4;
   }

Modified: head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h
==
--- head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h   Sat Aug 
20 13:29:58 2016(r304529)
+++ head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h   Sat Aug 
20 14:04:51 2016(r304530)
@@ -100,6 +100,9 @@ enum Fixups {
   fixup_t2_movt_hi16, // :upper16:
   fixup_t2_movw_lo16, // :lower16:
 
+  // fixup_arm_mod_imm - Fixup for mod_imm
+  fixup_arm_mod_imm,
+
   // Marker
   LastTargetFixupKind,
   NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind

Modified: head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
==
--- head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp  Sat Aug 
20 13:29:58 2016(r304529)
+++ head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp  Sat Aug 
20 14:04:51 2016(r304530)
@@ -312,12 +312,8 @@ public:
 // Support for fixups (MCFixup)
 if (MO.isExpr()) {
   const MCExpr *Expr = MO.getExpr();
-  // In instruction code this value always encoded as lowest 12 bits,
-  // so we don't have to perform any specific adjustments.
-  // Due to requirements of relocatable records we have to use FK_Data_4.
-  // See ARMELFObjectWriter::ExplicitRelSym and
-  // ARMELFObjectWriter::GetRelocTypeInner for more details.
-  MCFixupKind Kind = MCFixupKind(FK_Data_4);
+  // Fixups resolve to plain values that need to be encoded.
+  MCFixupKind Kind = MCFixupKind(ARM::fixup_arm_mod_imm);
   Fixups.push_back(MCFixup::create(0, Expr, Kind, MI.getLoc()));
   return 0;
 }

Modified: 

svn commit: r304319 - in head: contrib/llvm/lib/Target/X86 contrib/llvm/tools/clang/lib/Basic lib/clang

2016-08-17 Thread Dimitry Andric
Author: dim
Date: Wed Aug 17 21:57:11 2016
New Revision: 304319
URL: https://svnweb.freebsd.org/changeset/base/304319

Log:
  Pull in r262772 from upstream clang trunk (by Simon Pilgrim):
  
[X86] AMD Bobcat CPU (btver1) doesn't support XSAVE
  
btver1 is a SSSE3/SSE4a only CPU - it doesn't have AVX and doesn't
support XSAVE.
  
Differential Revision: http://reviews.llvm.org/D17682
  
  Pull in r262782 from upstream llvm trunk (by Simon Pilgrim):
  
[X86] AMD Bobcat CPU (btver1) doesn't support XSAVE
  
btver1 is a SSSE3/SSE4a only CPU - it doesn't have AVX and doesn't
support XSAVE.
  
Differential Revision: http://reviews.llvm.org/D17683
  
  This ensures clang does not emit AVX instructions for CPUTYPE=btver1.
  
  Reported by:  Michel Depeige 
  PR:   211864
  MFC after:3 days

Modified:
  head/contrib/llvm/lib/Target/X86/X86.td
  head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
  head/lib/clang/freebsd_cc_version.h

Modified: head/contrib/llvm/lib/Target/X86/X86.td
==
--- head/contrib/llvm/lib/Target/X86/X86.td Wed Aug 17 21:44:02 2016
(r304318)
+++ head/contrib/llvm/lib/Target/X86/X86.td Wed Aug 17 21:57:11 2016
(r304319)
@@ -576,7 +576,6 @@ def : Proc<"btver1", [
   FeaturePRFCHW,
   FeatureLZCNT,
   FeaturePOPCNT,
-  FeatureXSAVE,
   FeatureSlowSHLD,
   FeatureLAHFSAHF
 ]>;

Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
==
--- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Wed Aug 17 21:44:02 
2016(r304318)
+++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Wed Aug 17 21:57:11 
2016(r304319)
@@ -2731,7 +2731,6 @@ bool X86TargetInfo::initFeatureMap(
 setFeatureEnabledImpl(Features, "prfchw", true);
 setFeatureEnabledImpl(Features, "cx16", true);
 setFeatureEnabledImpl(Features, "fxsr", true);
-setFeatureEnabledImpl(Features, "xsave", true);
 break;
   case CK_BDVER4:
 setFeatureEnabledImpl(Features, "avx2", true);

Modified: head/lib/clang/freebsd_cc_version.h
==
--- head/lib/clang/freebsd_cc_version.h Wed Aug 17 21:44:02 2016
(r304318)
+++ head/lib/clang/freebsd_cc_version.h Wed Aug 17 21:57:11 2016
(r304319)
@@ -1,3 +1,3 @@
 /* $FreeBSD$ */
 
-#defineFREEBSD_CC_VERSION  120
+#defineFREEBSD_CC_VERSION  121
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r303676 - head/usr.bin/grep/regex

2016-08-02 Thread Dimitry Andric
Author: dim
Date: Tue Aug  2 20:25:22 2016
New Revision: 303676
URL: https://svnweb.freebsd.org/changeset/base/303676

Log:
  Fix a segfault in bsdgrep when parsing the invalid extended regexps "?"
  or "+" (these are invalid, because there is no preceding operand).
  
  When bsdgrep attempts to emulate GNU grep in discarding and ignoring the
  invalid ? or + operators, some later logic in tre_compile_fast() goes
  beyond the end of the buffer, leading to a crash.
  
  Fix this by bailing out, and reporting a bad pattern instead.
  
  Reported by:  Steve Kargl
  MFC after:1 week

Modified:
  head/usr.bin/grep/regex/tre-fastmatch.c

Modified: head/usr.bin/grep/regex/tre-fastmatch.c
==
--- head/usr.bin/grep/regex/tre-fastmatch.c Tue Aug  2 20:18:43 2016
(r303675)
+++ head/usr.bin/grep/regex/tre-fastmatch.c Tue Aug  2 20:25:22 2016
(r303676)
@@ -621,7 +621,7 @@ tre_compile_fast(fastmatch_t *fg, const 
  case TRE_CHAR('+'):
  case TRE_CHAR('?'):
if ((cflags & REG_EXTENDED) && (i == 0))
- continue;
+ goto badpat;
else if ((cflags & REG_EXTENDED) ^ !escaped)
  STORE_CHAR;
else
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r303631 - head/usr.sbin/bsdinstall/scripts

2016-08-01 Thread Dimitry Andric
Author: dim
Date: Mon Aug  1 19:49:42 2016
New Revision: 303631
URL: https://svnweb.freebsd.org/changeset/base/303631

Log:
  Fix non-functional bsdinstall services dialog.
  
  The most recent version of bsdinstall does not seem to respect any of
  the checkboxes in the "Choose the services you would like to be started
  at boot" dialog.  None of the chosen services end up in the rc.conf file
  that is installed onto the target system.
  
  This is caused by the bsdinstall/scripts/hardening script, which
  implements the new hardening options dialog.  The script starts by
  overwriting the previously written rc.conf.services file:
  
  echo -n > $BSDINSTALL_TMPETC/rc.conf.services
  
  which is obviously incorrect.  It should clear out rc.conf.hardening
  instead.
  
  Reviewed by:  allanjude
  PR:   211506
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D7387

Modified:
  head/usr.sbin/bsdinstall/scripts/hardening

Modified: head/usr.sbin/bsdinstall/scripts/hardening
==
--- head/usr.sbin/bsdinstall/scripts/hardening  Mon Aug  1 19:37:43 2016
(r303630)
+++ head/usr.sbin/bsdinstall/scripts/hardening  Mon Aug  1 19:49:42 2016
(r303631)
@@ -28,7 +28,7 @@
 
 : ${DIALOG_OK=0}
 
-echo -n > $BSDINSTALL_TMPETC/rc.conf.services
+echo -n > $BSDINSTALL_TMPETC/rc.conf.hardening
 
 exec 3>&1
 FEATURES=$( dialog --backtitle "FreeBSD Installer" \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r303456 - head

2016-07-28 Thread Dimitry Andric
Author: dim
Date: Thu Jul 28 18:40:43 2016
New Revision: 303456
URL: https://svnweb.freebsd.org/changeset/base/303456

Log:
  Add tblgen to ObsoleteFiles.inc, as it was renamed to llvm-tblgen.
  
  Noticed by:   pluknet
  MFC after:3 days

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Thu Jul 28 18:39:30 2016(r303455)
+++ head/ObsoleteFiles.inc  Thu Jul 28 18:40:43 2016(r303456)
@@ -229,6 +229,7 @@ OLD_LIBS+=usr/lib/libdevinfo.so.5
 OLD_LIBS+=usr/lib32/libdevinfo.so.5
 # 20160305: new clang import which bumps version from 3.7.1 to 3.8.0.
 OLD_FILES+=usr/bin/macho-dump
+OLD_FILES+=usr/bin/tblgen
 OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/allocator_interface.h
 OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/asan_interface.h
 OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/common_interface_defs.h
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r302784 - head/sys/netinet6

2016-07-13 Thread Dimitry Andric
Author: dim
Date: Wed Jul 13 19:41:19 2016
New Revision: 302784
URL: https://svnweb.freebsd.org/changeset/base/302784

Log:
  Fix a page fault in ip6_setpktopt(), occurring when the pflog module is
  loaded, and syncthing is started, which uses setsockopt(IPV6_PKGINFO).
  
  This is because pflog interfaces do not normally have an IPv6 address,
  causing the ND_IFINFO() macro to dereference a NULL pointer.
  
  Reviewed by:  ae
  PR:   210943
  MFC after:3 days

Modified:
  head/sys/netinet6/ip6_output.c

Modified: head/sys/netinet6/ip6_output.c
==
--- head/sys/netinet6/ip6_output.c  Wed Jul 13 19:19:18 2016
(r302783)
+++ head/sys/netinet6/ip6_output.c  Wed Jul 13 19:41:19 2016
(r302784)
@@ -2659,8 +2659,8 @@ ip6_setpktopt(int optname, u_char *buf, 
if (ifp == NULL)
return (ENXIO);
}
-   if (ifp != NULL && (
-   ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED))
+   if (ifp != NULL && (ifp->if_afdata[AF_INET6] == NULL ||
+   (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) != 0))
return (ENETDOWN);
 
if (ifp != NULL &&
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r301277 - in head: . lib/clang lib/clang/include/clang/Basic lib/clang/libclangbasic

2016-06-03 Thread Dimitry Andric
Author: dim
Date: Fri Jun  3 16:17:36 2016
New Revision: 301277
URL: https://svnweb.freebsd.org/changeset/base/301277

Log:
  For clang, move the definition of FREEBSD_CC_VERSION into its own header
  file, lib/clang/freebsd_cc_version.h, instead of reusing Version.inc.
  The header is only included from one .cpp file in the clang tree.
  
  This minimizes the number of .cpp files that need to be rebuilt if the
  version is bumped.
  
  Discussed with:   bdrewery

Added:
  head/lib/clang/freebsd_cc_version.h   (contents, props changed)
Modified:
  head/Makefile.inc1
  head/lib/clang/include/clang/Basic/Version.inc
  head/lib/clang/libclangbasic/Makefile

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Jun  3 15:33:21 2016(r301276)
+++ head/Makefile.inc1  Fri Jun  3 16:17:36 2016(r301277)
@@ -99,7 +99,7 @@ _expected_compiler_type=  gcc
 .if ${_expected_compiler_type} == "clang"
 CROSS_COMPILER_FREEBSD_VERSION!= \
awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \
-   ${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown
+   ${SRCDIR}/lib/clang/freebsd_cc_version.h || echo unknown
 CROSS_COMPILER_VERSION!= \
awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 1 + 
a[2] * 100 + a[3]}' \
${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown

Added: head/lib/clang/freebsd_cc_version.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/clang/freebsd_cc_version.h Fri Jun  3 16:17:36 2016
(r301277)
@@ -0,0 +1,3 @@
+/* $FreeBSD$ */
+
+#defineFREEBSD_CC_VERSION  114

Modified: head/lib/clang/include/clang/Basic/Version.inc
==
--- head/lib/clang/include/clang/Basic/Version.inc  Fri Jun  3 15:33:21 
2016(r301276)
+++ head/lib/clang/include/clang/Basic/Version.inc  Fri Jun  3 16:17:36 
2016(r301277)
@@ -8,5 +8,3 @@
 #defineCLANG_VENDOR"FreeBSD "
 
 #defineSVN_REVISION"262564"
-
-#defineFREEBSD_CC_VERSION  114U

Modified: head/lib/clang/libclangbasic/Makefile
==
--- head/lib/clang/libclangbasic/Makefile   Fri Jun  3 15:33:21 2016
(r301276)
+++ head/lib/clang/libclangbasic/Makefile   Fri Jun  3 16:17:36 2016
(r301277)
@@ -50,3 +50,6 @@ TGHDRS=   AttrHasAttributeImpl \
 
 # XX: work around GCC bug 67888
 CFLAGS.gcc += -fpermissive
+
+# Ensure FREEBSD_CC_VERSION is defined for Targets.cpp
+CFLAGS.Targets.cpp+= -include ../freebsd_cc_version.h
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r301227 - in head: contrib/llvm/lib/Target/X86 lib/clang/include/clang/Basic

2016-06-02 Thread Dimitry Andric
Author: dim
Date: Thu Jun  2 19:54:38 2016
New Revision: 301227
URL: https://svnweb.freebsd.org/changeset/base/301227

Log:
  Pull in r271548 from upstream llvm trunk (by me):
  
Only attempt to detect AVG if SSE2 is available
  
Summary:
In PR29973 Sanjay Patel reported an assertion failure when a certain
loop was optimized, for a target without SSE2 support.  It turned out
this was because of the AVG pattern detection introduced in rL253952.
  
Prevent the assertion failure by bailing out early in
`detectAVGPattern()`, if the target does not support SSE2.
  
Also add a minimized test case.
  
Reviewers: congh, eli.friedman, spatel
  
Subscribers: emaste, llvm-commits
  
Differential Revision: http://reviews.llvm.org/D20905
  
  This should fix assertion failures ("Requires at least SSE2!") when
  building the games/0ad port with CPUTYPE=pentium3.
  
  Reported by:  madpilot

Modified:
  head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
  head/lib/clang/include/clang/Basic/Version.inc

Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
==
--- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppThu Jun  2 
19:06:04 2016(r301226)
+++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppThu Jun  2 
19:54:38 2016(r301227)
@@ -26159,6 +26159,8 @@ static SDValue detectAVGPattern(SDValue 
   if (InScalarVT.getSizeInBits() <= ScalarVT.getSizeInBits())
 return SDValue();
 
+  if (!Subtarget->hasSSE2())
+return SDValue();
   if (Subtarget->hasAVX512()) {
 if (VT.getSizeInBits() > 512)
   return SDValue();

Modified: head/lib/clang/include/clang/Basic/Version.inc
==
--- head/lib/clang/include/clang/Basic/Version.inc  Thu Jun  2 19:06:04 
2016(r301226)
+++ head/lib/clang/include/clang/Basic/Version.inc  Thu Jun  2 19:54:38 
2016(r301227)
@@ -9,4 +9,4 @@
 
 #defineSVN_REVISION"262564"
 
-#defineFREEBSD_CC_VERSION  113U
+#defineFREEBSD_CC_VERSION  114U
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r300984 - head/lib/clang/include/clang/Basic

2016-05-30 Thread Dimitry Andric
Author: dim
Date: Mon May 30 06:44:10 2016
New Revision: 300984
URL: https://svnweb.freebsd.org/changeset/base/300984

Log:
  Bump __FreeBSD_cc_version after r300974.

Modified:
  head/lib/clang/include/clang/Basic/Version.inc

Modified: head/lib/clang/include/clang/Basic/Version.inc
==
--- head/lib/clang/include/clang/Basic/Version.inc  Mon May 30 05:21:24 
2016(r300983)
+++ head/lib/clang/include/clang/Basic/Version.inc  Mon May 30 06:44:10 
2016(r300984)
@@ -9,4 +9,4 @@
 
 #defineSVN_REVISION"262564"
 
-#defineFREEBSD_CC_VERSION  112U
+#defineFREEBSD_CC_VERSION  113U
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r300974 - head/contrib/llvm/lib/Transforms/Vectorize

2016-05-29 Thread Dimitry Andric
Author: dim
Date: Sun May 29 20:54:16 2016
New Revision: 300974
URL: https://svnweb.freebsd.org/changeset/base/300974

Log:
  Pull in r269908 from upstream llvm trunk (by James Molloy):
  
[VectorUtils] Fix nasty use-after-free
  
In truncateToMinimalBitwidths() we were RAUW'ing an instruction then
erasing it. However, that intruction could be cached in the map we're
iterating over. The first check is "I->use_empty()" which in most
cases would return true, as the (deleted) object was RAUW'd first so
would have zero use count. However in some cases the object could
have been polluted or written over and this wouldn't be the case.
Also it makes valgrind, asan and traditionalists who don't like their
compiler to crash sad.
  
No testcase as there are no externally visible symptoms apart from a
crash if the stars align.
  
Fixes PR26509.
  
  This should fix crashes when building a number of ports on arm64.
  
  Reported by:  andrew

Modified:
  head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Modified: head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
==
--- head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cppSun May 
29 20:28:01 2016(r300973)
+++ head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cppSun May 
29 20:54:16 2016(r300974)
@@ -3161,10 +3161,11 @@ void InnerLoopVectorizer::truncateToMini
   // truncated version of `I` and reextend its result. InstCombine runs
   // later and will remove any ext/trunc pairs.
   //
+  SmallPtrSet Erased;
   for (auto  : MinBWs) {
 VectorParts  = WidenMap.get(KV.first);
 for (Value * : Parts) {
-  if (I->use_empty())
+  if (Erased.count(I) || I->use_empty())
 continue;
   Type *OriginalTy = I->getType();
   Type *ScalarTruncatedTy = IntegerType::get(OriginalTy->getContext(),
@@ -3238,6 +3239,7 @@ void InnerLoopVectorizer::truncateToMini
   Value *Res = B.CreateZExtOrTrunc(NewI, OriginalTy);
   I->replaceAllUsesWith(Res);
   cast(I)->eraseFromParent();
+  Erased.insert(I);
   I = Res;
 }
   }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r300967 - head/sys/sys

2016-05-29 Thread Dimitry Andric
Author: dim
Date: Sun May 29 17:32:19 2016
New Revision: 300967
URL: https://svnweb.freebsd.org/changeset/base/300967

Log:
  Stop exposing the C11 _Atomic() macro in , when compiling
  for C++.  It clashes with the one in libc++'s  header.
  
  (Previously, the _Atomic() macro was defined in , which is
  only for use with C11, but for various reasons it was moved to its
  current location in r251804.)
  
  Discussed with:   bdrewery, ed
  MFC after:2 weeks

Modified:
  head/sys/sys/cdefs.h

Modified: head/sys/sys/cdefs.h
==
--- head/sys/sys/cdefs.hSun May 29 17:26:40 2016(r300966)
+++ head/sys/sys/cdefs.hSun May 29 17:32:19 2016(r300967)
@@ -275,7 +275,8 @@
 #define_Alignof(x) __alignof(x)
 #endif
 
-#if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
+#if !defined(__cplusplus) && !__has_extension(c_atomic) && \
+!__has_extension(cxx_atomic)
 /*
  * No native support for _Atomic(). Place object in structure to prevent
  * most forms of direct non-atomic access.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r300873 - in head/lib: libc++ libcxxrt

2016-05-27 Thread Dimitry Andric
Author: dim
Date: Fri May 27 20:45:32 2016
New Revision: 300873
URL: https://svnweb.freebsd.org/changeset/base/300873

Log:
  After r300770, for libc++ and libcxxrt, use -isystem instead of -I.
  This should fix builds with external gcc toolchains from ports, which
  also use -isystem to work around problems with gcc's --sysroot
  implementation.  Thanks to Bryan Drewery for this workaround.

Modified:
  head/lib/libc++/Makefile
  head/lib/libcxxrt/Makefile

Modified: head/lib/libc++/Makefile
==
--- head/lib/libc++/MakefileFri May 27 20:43:46 2016(r300872)
+++ head/lib/libc++/MakefileFri May 27 20:45:32 2016(r300873)
@@ -63,7 +63,7 @@ cxxrt_${_S}: ${_LIBCXXRTDIR}/${_S} .NOME
 .endfor
 
 WARNS= 0
-CFLAGS+=   -I${HDRDIR} -I${_LIBCXXRTDIR} -nostdinc++ -nostdlib -DLIBCXXRT
+CFLAGS+=   -isystem ${HDRDIR} -isystem ${_LIBCXXRTDIR} -nostdinc++ 
-nostdlib -DLIBCXXRT
 .if empty(CXXFLAGS:M-std=*)
 CXXFLAGS+= -std=c++11
 .endif

Modified: head/lib/libcxxrt/Makefile
==
--- head/lib/libcxxrt/Makefile  Fri May 27 20:43:46 2016(r300872)
+++ head/lib/libcxxrt/Makefile  Fri May 27 20:45:32 2016(r300873)
@@ -21,7 +21,7 @@ SRCS+=libelftc_dem_gnu3.c\
guard.cc
 
 WARNS= 0
-CFLAGS+=   -I${SRCDIR} -nostdinc++
+CFLAGS+=   -isystem ${SRCDIR} -nostdinc++
 .if empty(CXXFLAGS:M-std=*)
 CXXFLAGS+= -std=c++11
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r300770 - in head: . contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libc++/src/include contrib/libc++/src/support lib/

2016-05-27 Thread Dimitry Andric
On 27 May 2016, at 18:01, Alan Somers <asom...@freebsd.org> wrote:
> 
> On Fri, May 27, 2016 at 9:42 AM, Dimitry Andric <d...@freebsd.org> wrote:
...
>> My guess is that either ${MAKEOBJDIRPREFIX}/usr/include/c++/v1 needs to
>> be added to the C++ include path, or some other path in the list is
>> missing, at least for C++ compilation.
>> 
>> -Dimitry
> 
> Here it is.  It looks right to me;
> $MAKEOBJDIRPREFIX/home/asomers/freebsd/head/lib32/usr/include/c++/v1
> is in the path, and stddef.h exists in that directory.
> 
> $ c++ -v -m32 -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2
> -L/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/lib32
> --sysroot=/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32
> -B/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/lib32
> -isystem /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include
>  -O2 -pipe -MD -MF.depend.consumer.o -MTconsumer.o
> -fstack-protector-strong -Wsystem-headers -Werror -Wall
> -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith
> -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int
> -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value
> -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion
> -Wno-unused-local-typedef -Qunused-arguments  -Wno-c++11-extensions
> -c /home/asomers/freebsd/head/lib/libdevdctl/consumer.cc -o consumer.o
> FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on
> LLVM 3.8.0)
> Target: i386-unknown-freebsd11.0
> Thread model: posix
> InstalledDir: /scratch/tmp/asomers/obj/home/asomers/freebsd/head/tmp/usr/bin
> "/scratch/tmp/asomers/obj/home/asomers/freebsd/head/tmp/usr/bin/c++"
> -cc1 -triple i386-unknown-freebsd11.0 -emit-obj -disable-free
> -main-file-name consumer.cc -mrelocation-model static -mthread-model
> posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases
> -target-cpu i686 -target-feature +mmx -target-feature +sse
> -target-feature +sse2 -v -dwarf-column-info -debugger-tuning=gdb
> -coverage-file 
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/world32/home/asomers/freebsd/head/lib/libdevdctl/consumer.o
> -resource-dir 
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/tmp/usr/bin/../lib/clang/3.8.0
> -dependency-file .depend.consumer.o -sys-header-deps -MT consumer.o
> -isystem /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include
> -D COMPAT_32BIT -isysroot
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32
> -internal-isystem
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1
> -O2 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
> -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized
> -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable
> -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality
> -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef
> -Wno-c++11-extensions -fdeprecated-macro -fdebug-compilation-dir
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/world32/home/asomers/freebsd/head/lib/libdevdctl
> -ferror-limit 19 -fmessage-length 80 -stack-protector 2
> -fobjc-runtime=gnustep -fcxx-exceptions -fexceptions
> -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
> -vectorize-slp -o consumer.o -x c++
> /home/asomers/freebsd/head/lib/libdevdctl/consumer.cc
> clang -cc1 version 3.8.0 based upon LLVM 3.8.0 default target
> x86_64-unknown-freebsd11.0
> ignoring duplicate directory
> "/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include"
> #include "..." search starts here:
> #include <...> search starts here:
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/tmp/usr/bin/../lib/clang/3.8.0/include
> End of search list.

The problem appears to be that the .../usr/include/c++/v1 directory
should come *before* the .../usr/include directory, otherwise the
#include_next<> logic will not work as expected.

This is most likely caused by the option:

  -isystem /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include

because that forces this path to become before any auto-detected system
include directory.  Note that this option is not needed, since the other
option:

  --sysroot=/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32

is already taking care of adding the right include directories.  It even
warns about the duplicate directory:

  ignoring duplicate directory
  "/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include"

So what happens if you delete the -isystem option and its argument?

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r300770 - in head: . contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libc++/src/include contrib/libc++/src/support lib/

2016-05-27 Thread Dimitry Andric
On 27 May 2016, at 17:32, Alan Somers <asom...@freebsd.org> wrote:
> 
> On Fri, May 27, 2016 at 9:28 AM, Dimitry Andric <d...@freebsd.org> wrote:
>> On 27 May 2016, at 16:49, Alan Somers <asom...@freebsd.org> wrote:
>>> 
>>> I think this change is breaking the build of C++ applications.  Below
>>> is a snippet of my amd64 buildworld, with the changes in D6564.  it
>>> built fine a few days ago.
...
>> It shouldn't, it passed a full make universe.  Do you have any special
>> settings in either make.conf or src.conf?  Or something other about your
>> build environment that is non-standard?
...
> 
> Ahh, but when you ran "make universe" there were not yet any C++
> things in lib/.  My patch adds a C++ library, and it fails when
> building the 32-bit version.  Here's the actual command that failed.
> I don't know why it failed, because
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/stddef.h
> _does_ exist.
> 
> c++ -m32 -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2
> -L/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/lib32
> --sysroot=/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32
> -B/scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/lib32
> -isystem /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include
>  -O2 -pipe -MD -MF.depend.consumer.o -MTconsumer.o
> -fstack-protector-strong -Wsystem-headers -Werror -Wall
> -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith
> -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int
> -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value
> -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion
> -Wno-unused-local-typedef -Qunused-arguments  -Wno-c++11-extensions
> -c /home/asomers/freebsd/head/lib/libdevdctl/consumer.cc -o consumer.o
> ...
> --- all_subdir_lib/libdevdctl ---
> In file included from /home/asomers/freebsd/head/lib/libdevdctl/event.cc:55:
> In file included from
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/iostream:38:
> In file included from
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/ios:216:
> In file included from
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/__locale:15:
> In file included from
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/string:439:
> In file included from
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/algorithm:624:
> In file included from
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/initializer_list:47:
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/cstddef:43:15:
> fatal error: 'stddef.h' file not found
> #include_next 
>  ^

I think what happens is the same what happened with some ports.  For
various reasons, the include path needs to be modified, and this causes
the header lookup to fail, when using #include_next<>.

Can you run the above command manually, but adding -v so it will print
out the full include paths it searches, and the order?

My guess is that either ${MAKEOBJDIRPREFIX}/usr/include/c++/v1 needs to
be added to the C++ include path, or some other path in the list is
missing, at least for C++ compilation.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r300770 - in head: . contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libc++/src/include contrib/libc++/src/support lib/

2016-05-27 Thread Dimitry Andric
On 27 May 2016, at 16:49, Alan Somers  wrote:
> 
> I think this change is breaking the build of C++ applications.  Below
> is a snippet of my amd64 buildworld, with the changes in D6564.  it
> built fine a few days ago.
> 
> ===> lib/libdevdctl (all)
> In file included from 
> /home/asomers/freebsd/head/lib/libdevdctl/consumer.cc:50:
> In file included from
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/list:173:
> In file included from
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/memory:599:
> In file included from
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/type_traits:363:
> /scratch/tmp/asomers/obj/home/asomers/freebsd/head/lib32/usr/include/c++/v1/cstddef:43:15:
> fatal error: 'stddef.h' file not found
> #include_next 
>  ^
> 1 error generated.
> --- consumer.o ---
> *** [consumer.o] Error code 1

It shouldn't, it passed a full make universe.  Do you have any special
settings in either make.conf or src.conf?  Or something other about your
build environment that is non-standard?

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r300770 - in head: . contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libc++/src/include contrib/libc++/src/support lib/l...

2016-05-26 Thread Dimitry Andric
Author: dim
Date: Thu May 26 18:52:49 2016
New Revision: 300770
URL: https://svnweb.freebsd.org/changeset/base/300770

Log:
  Update libc++ to 3.8.0.  Excerpted list of fixes (with upstream revision
  numbers):
  
  r242679 Implement the plugin-based version of std::search. There are no
  searchers yet; those are coming soon.
  r242682 Implement the default searcher for std::experimental::search.
  r243728 Add  v2.
  r245330 implement more of N4258 - Cleaning up noexcept in the standard
  library. Specifically add new noexcept stuff to vector and
string's move-assignment operations
  r245334 Fix PR22606 - Leak pthread_key with static storage duration to
  ensure all of thread-local destructors are called.
  r245335 Fix PR23589: std::function doesn't recognize null pointer to
  varargs function.
  r247036 Implementation of Boyer-Moore and Boyer-Moore-Horspool
  searchers for the LFTS.
  r249325 Implement LWG#2063, and update the issues links to point to the
  github generated pages
  r249738 Split  out of .
  r249739 Split  out of .
  r249740 Split  out of .
  r249741 Split  out of .
  r249742 Split  out of .
  r249743 Split  out of .
  r249761 Split  out of .
  r249798 Split  out of .
  r249800 Split  out of .
  r249889 Split  out of .
  r249890 Split  out of .
  r249929 Split  out of .
  r250254 ABI versioning macros for libc++.
  r251246 Fix LWG#2244: basic_istream::seekg
  r251247 Fix LWG#2127: Move-construction with raw_storage_iterator.
  r251253 Fix LWG#2476: scoped_allocator_adaptor is not assignable
  r251257 Fix LWG#2489: mem_fn() should be noexcept
  r251618 Implement P0004R1 'Remove Deprecated iostreams aliases'
  r251766 Implement the first part of P0006R0: Adopt Type Traits Variable
  Templates for C++17.
  r252195 Implement P0092R1 for C++1z
  r252350 Allow deque to handle incomplete types.
  r252406 More of P0006R0: type traits variable aliases for C++17.
  r252407 Implement LWG#2353: std::next is over-constrained
  r252905 Implement P0074: Making owner_less more flexible
  r253215 Implement P0013R1: Logical Operator Type Traits.
  r253274 Implement P0007: Constant View: A proposal for a std::as_const
  helper function template.
  r254119 Add static_assert to set/multiset/map/multimap/forward_list/deque
  that the allocator's value_type match the container's value_type.
  r254283 Implement more of P0006; Type Traits Variable Templates.
  r255941 LWG2485: get() should be overloaded for const tuple&&.
  r256325 Fix LWG Issue #2367 - Fixing std::tuple and std::pair's default
  constructors.
  r256652 Fix for ALL undefined behavior in .
  r256859 First half of LWG#2354: 'Unnecessary copying when inserting
  into maps with braced-init syntax'
  
  Exp-run:  antoine
  Relnotes: yes

Added:
  head/contrib/libc++/include/__nullptr
 - copied unchanged from r298146, vendor/libc++/dist/include/__nullptr
  head/contrib/libc++/include/ctype.h
 - copied unchanged from r298146, vendor/libc++/dist/include/ctype.h
  head/contrib/libc++/include/errno.h
 - copied unchanged from r298146, vendor/libc++/dist/include/errno.h
  head/contrib/libc++/include/experimental/any
 - copied unchanged from r298146, 
vendor/libc++/dist/include/experimental/any
  head/contrib/libc++/include/experimental/functional
 - copied unchanged from r298146, 
vendor/libc++/dist/include/experimental/functional
  head/contrib/libc++/include/float.h
 - copied unchanged from r298146, vendor/libc++/dist/include/float.h
  head/contrib/libc++/include/inttypes.h
 - copied unchanged from r298146, vendor/libc++/dist/include/inttypes.h
  head/contrib/libc++/include/math.h
 - copied unchanged from r298146, vendor/libc++/dist/include/math.h
  head/contrib/libc++/include/setjmp.h
 - copied unchanged from r298146, vendor/libc++/dist/include/setjmp.h
  head/contrib/libc++/include/stddef.h
 - copied unchanged from r298146, vendor/libc++/dist/include/stddef.h
  head/contrib/libc++/include/stdio.h
 - copied unchanged from r298146, vendor/libc++/dist/include/stdio.h
  head/contrib/libc++/include/stdlib.h
 - copied unchanged from r298146, vendor/libc++/dist/include/stdlib.h
  head/contrib/libc++/include/wchar.h
 - copied unchanged from r298146, vendor/libc++/dist/include/wchar.h
  head/contrib/libc++/include/wctype.h
 - copied unchanged from r298146, vendor/libc++/dist/include/wctype.h
  head/contrib/libc++/src/any.cpp
 - copied unchanged from r298146, vendor/libc++/dist/src/any.cpp
  head/contrib/libc++/src/include/
 - copied from r298146, vendor/libc++/dist/src/include/
Deleted:
  head/contrib/libc++/src/config_elast.h
  head/contrib/libc++/src/support/
Modified:
  head/Makefile.inc1
  head/contrib/libc++/include/__config
  head/contrib/libc++/include/__functional_03
  head/contrib/libc++/include/__functional_base
  head/contrib/libc++/include/__functional_base_03
  

svn commit: r300314 - head/contrib/llvm/tools/clang/lib/Basic

2016-05-20 Thread Dimitry Andric
Author: dim
Date: Fri May 20 17:38:45 2016
New Revision: 300314
URL: https://svnweb.freebsd.org/changeset/base/300314

Log:
  Pull in r270240 from upstream clang trunk (by me):
  
Make __FreeBSD_cc_version predefined macro configurable at build time
  
The `FreeBSDTargetInfo` class has always set the `__FreeBSD_cc_version`
predefined macro to a rather static value, calculated from the major OS
version.
  
In the FreeBSD base system, we will start incrementing the value of this
macro whenever we make any signifant change to clang, so we need a way
to configure the macro's value at build time.
  
Use `FREEBSD_CC_VERSION` for this, which we can define in the FreeBSD
build system using either the `-D` command line option, or an include
file.  Stock builds will keep the earlier value.
  
Differential Revision: http://reviews.llvm.org/D20037
  
  Follow-up commits will start using the __FreeBSD_cc_version to determine
  whether a bootstrap compiler has to be built during buildworld.

Modified:
  head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp

Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
==
--- head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Fri May 20 17:35:39 
2016(r300313)
+++ head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Fri May 20 17:38:45 
2016(r300314)
@@ -296,6 +296,10 @@ public:
   }
 };
 
+#ifndef FREEBSD_CC_VERSION
+#define FREEBSD_CC_VERSION 0U
+#endif
+
 // FreeBSD Target
 template
 class FreeBSDTargetInfo : public OSTargetInfo {
@@ -306,10 +310,13 @@ protected:
 
 unsigned Release = Triple.getOSMajorVersion();
 if (Release == 0U)
-  Release = 8;
+  Release = 8U;
+unsigned CCVersion = FREEBSD_CC_VERSION;
+if (CCVersion == 0U)
+  CCVersion = Release * 10U + 1U;
 
 Builder.defineMacro("__FreeBSD__", Twine(Release));
-Builder.defineMacro("__FreeBSD_cc_version", Twine(Release * 10U + 1U));
+Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
 Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
 DefineStd(Builder, "unix", Opts);
 Builder.defineMacro("__ELF__");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r299684 - head/sys/conf

2016-05-13 Thread Dimitry Andric
Author: dim
Date: Fri May 13 16:35:37 2016
New Revision: 299684
URL: https://svnweb.freebsd.org/changeset/base/299684

Log:
  After r299241, which added bhnd(4), use sh to run the shell scripts for
  generating nvram maps, to allow a noexec-mounted source directory.
  
  Reported by:  Johan Hendriks 
  PR:   209435

Modified:
  head/sys/conf/files
  head/sys/conf/kmod.mk

Modified: head/sys/conf/files
==
--- head/sys/conf/files Fri May 13 16:03:50 2016(r299683)
+++ head/sys/conf/files Fri May 13 16:35:37 2016(r299684)
@@ -10,13 +10,13 @@ acpi_quirks.h   optional acpi   
   \
no-obj no-implicit-rule before-depend  \
clean   "acpi_quirks.h"
 bhnd_nvram_map.h   optional bhndbus | bhnd\
-   dependency  "$S/dev/bhnd/tools/nvram_map_gen.sh 
$S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \
-   compile-with"$S/dev/bhnd/tools/nvram_map_gen.sh 
$S/dev/bhnd/nvram/nvram_map -h" \
+   dependency  "sh $S/dev/bhnd/tools/nvram_map_gen.sh 
$S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \
+   compile-with"sh $S/dev/bhnd/tools/nvram_map_gen.sh 
$S/dev/bhnd/nvram/nvram_map -h" \
no-obj no-implicit-rule before-depend  \
clean   "bhnd_nvram_map.h"
 bhnd_nvram_map_data.h  optional bhndbus | bhnd\
-   dependency  "$S/dev/bhnd/tools/nvram_map_gen.sh 
$S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \
-   compile-with"$S/dev/bhnd/tools/nvram_map_gen.sh 
$S/dev/bhnd/nvram/nvram_map -d" \
+   dependency  "sh $S/dev/bhnd/tools/nvram_map_gen.sh 
$S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \
+   compile-with"sh $S/dev/bhnd/tools/nvram_map_gen.sh 
$S/dev/bhnd/nvram/nvram_map -d" \
no-obj no-implicit-rule before-depend  \
clean   "bhnd_nvram_map_data.h"
 #

Modified: head/sys/conf/kmod.mk
==
--- head/sys/conf/kmod.mk   Fri May 13 16:03:50 2016(r299683)
+++ head/sys/conf/kmod.mk   Fri May 13 16:35:37 2016(r299684)
@@ -417,7 +417,7 @@ bhnd_nvram_map.h: ${SYSDIR}/dev/bhnd/too
 ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
 ${SYSDIR}/dev/bhnd/nvram/nvram_map
 bhnd_nvram_map.h:
-   ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
+   sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
${SYSDIR}/dev/bhnd/nvram/nvram_map -h
 .endif
 
@@ -427,7 +427,7 @@ bhnd_nvram_map_data.h: ${SYSDIR}/dev/bhn
 ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
 ${SYSDIR}/dev/bhnd/nvram/nvram_map
 bhnd_nvram_map_data.h:
-   ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
+   sh ${SYSDIR}/dev/bhnd/tools/nvram_map_gen.sh \
${SYSDIR}/dev/bhnd/nvram/nvram_map -d
 .endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r299144 - head/contrib/libcxxrt

2016-05-05 Thread Dimitry Andric
Author: dim
Date: Thu May  5 22:40:07 2016
New Revision: 299144
URL: https://svnweb.freebsd.org/changeset/base/299144

Log:
  Import libcxxrt master 516a65c109eb0a01e5e95fbef455eb3215135cef.
  
  Interesting fixes:
  3adaa2e Fix _Unwind_Exception cleanup functions
  286776c Check exception cleanup function ptr before calling
  edda626 Correct exception specifications on new and delete operators

Modified:
  head/contrib/libcxxrt/exception.cc
  head/contrib/libcxxrt/memory.cc
Directory Properties:
  head/contrib/libcxxrt/   (props changed)

Modified: head/contrib/libcxxrt/exception.cc
==
--- head/contrib/libcxxrt/exception.cc  Thu May  5 22:30:00 2016
(r299143)
+++ head/contrib/libcxxrt/exception.cc  Thu May  5 22:40:07 2016
(r299144)
@@ -304,13 +304,17 @@ static pthread_key_t eh_key;
 static void exception_cleanup(_Unwind_Reason_Code reason, 
   struct _Unwind_Exception *ex)
 {
-   __cxa_free_exception(static_cast(ex));
+   // Exception layout:
+   // [__cxa_exception [_Unwind_Exception]] [exception object]
+   //
+   // __cxa_free_exception expects a pointer to the exception object
+   __cxa_free_exception(static_cast(ex + 1));
 }
 static void dependent_exception_cleanup(_Unwind_Reason_Code reason, 
   struct _Unwind_Exception *ex)
 {
 
-   __cxa_free_dependent_exception(static_cast(ex));
+   __cxa_free_dependent_exception(static_cast(ex + 1));
 }
 
 /**
@@ -340,7 +344,8 @@ static void thread_cleanup(void* thread_
if (info->foreign_exception_state != __cxa_thread_info::none)
{
_Unwind_Exception *e = 
reinterpret_cast<_Unwind_Exception*>(info->globals.caughtExceptions);
-   e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e);
+   if (e->exception_cleanup)
+   
e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e);
}
else
{
@@ -1282,12 +1287,13 @@ extern "C" void __cxa_end_catch()

if (ti->foreign_exception_state != __cxa_thread_info::none)
{
-   globals->caughtExceptions = 0;
if (ti->foreign_exception_state != __cxa_thread_info::rethrown)
{
_Unwind_Exception *e = 
reinterpret_cast<_Unwind_Exception*>(ti->globals.caughtExceptions);
-   e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e);
+   if (e->exception_cleanup)
+   
e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e);
}
+   globals->caughtExceptions = 0;
ti->foreign_exception_state = __cxa_thread_info::none;
return;
}

Modified: head/contrib/libcxxrt/memory.cc
==
--- head/contrib/libcxxrt/memory.cc Thu May  5 22:30:00 2016
(r299143)
+++ head/contrib/libcxxrt/memory.cc Thu May  5 22:40:07 2016
(r299144)
@@ -71,8 +71,17 @@ namespace std
 }
 
 
+#if __cplusplus < 201103L
+#define NOEXCEPT throw()
+#define BADALLOC throw(std::bad_alloc)
+#else
+#define NOEXCEPT noexcept
+#define BADALLOC
+#endif
+
+
 __attribute__((weak))
-void* operator new(size_t size)
+void* operator new(size_t size) BADALLOC
 {
if (0 == size)
{
@@ -97,7 +106,7 @@ void* operator new(size_t size)
 }
 
 __attribute__((weak))
-void* operator new(size_t size, const std::nothrow_t &) throw()
+void* operator new(size_t size, const std::nothrow_t &) NOEXCEPT
 {
try {
return :: operator new(size);
@@ -110,27 +119,21 @@ void* operator new(size_t size, const st
 
 
 __attribute__((weak))
-void operator delete(void * ptr)
-#if __cplusplus < 201000L
-throw()
-#endif
+void operator delete(void * ptr) NOEXCEPT
 {
free(ptr);
 }
 
 
 __attribute__((weak))
-void * operator new[](size_t size)
-#if __cplusplus < 201000L
-throw(std::bad_alloc)
-#endif
+void * operator new[](size_t size) BADALLOC
 {
return ::operator new(size);
 }
 
 
 __attribute__((weak))
-void * operator new[](size_t size, const std::nothrow_t &) throw()
+void * operator new[](size_t size, const std::nothrow_t &) NOEXCEPT
 {
try {
return ::operator new[](size);
@@ -143,10 +146,7 @@ void * operator new[](size_t size, const
 
 
 __attribute__((weak))
-void operator delete[](void * ptr)
-#if __cplusplus < 201000L
-throw()
-#endif
+void operator delete[](void * ptr) NOEXCEPT
 {
::operator delete(ptr);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r299143 - head/contrib/libcxxrt

2016-05-05 Thread Dimitry Andric
Author: dim
Date: Thu May  5 22:30:00 2016
New Revision: 299143
URL: https://svnweb.freebsd.org/changeset/base/299143

Log:
  Since contrib/libcxxrt's ancestry was never correct, subversion 1.8 and
  higher cannot merge to it from the vendor area.
  
  Re-bootstrap the ancestry by doing (apologies to your retinas):
  * svn pg svn:mergeinfo contrib/libcxxrt > mergeinfo.txt
  * svn rm contrib/libcxxrt
  * svn cp ^/vendor/libcxxrt/dist@297299 contrib/libcxxrt
  * svn rm CMakeLists.txt doxygen_config
  * svn cp ^/head/contrib/libcxxrt/FREEBSD-upgrade@297299 contrib/libcxxrt
  * svn cp ^/head/contrib/libcxxrt/exception.cc@297299 contrib/libcxxrt
  * svn cp ^/head/contrib/libcxxrt/unwind-arm.h@297299 contrib/libcxxrt
  * svn pd -R svn:mergeinfo contrib/libcxxrt
  * svn ps -F mergeinfo.txt svn:mergeinfo contrib/libcxxrt

Added:
  head/contrib/libcxxrt/FREEBSD-upgrade
 - copied unchanged from r297299, head/contrib/libcxxrt/FREEBSD-upgrade
Replaced:
 - copied from r297299, vendor/libcxxrt/dist/
  head/contrib/libcxxrt/exception.cc
 - copied unchanged from r297299, head/contrib/libcxxrt/exception.cc
  head/contrib/libcxxrt/unwind-arm.h
 - copied unchanged from r297299, head/contrib/libcxxrt/unwind-arm.h
Directory Properties:
  head/contrib/libcxxrt/   (props changed)
Deleted:
  head/contrib/libcxxrt/CMakeLists.txt
  head/contrib/libcxxrt/doxygen_config

Copied: head/contrib/libcxxrt/FREEBSD-upgrade (from r297299, 
head/contrib/libcxxrt/FREEBSD-upgrade)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/libcxxrt/FREEBSD-upgrade   Thu May  5 22:30:00 2016
(r299143, copy of r297299, head/contrib/libcxxrt/FREEBSD-upgrade)
@@ -0,0 +1,6 @@
+$FreeBSD$
+
+This is the FreeBSD copy of libcxxrt.  It contains the src directory from the 
+upstream repository.
+
+When updating, copy *.{c,cc,h} from the upstream src/.

Copied: head/contrib/libcxxrt/exception.cc (from r297299, 
head/contrib/libcxxrt/exception.cc)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/libcxxrt/exception.cc  Thu May  5 22:30:00 2016
(r299143, copy of r297299, head/contrib/libcxxrt/exception.cc)
@@ -0,0 +1,1544 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *this list of conditions and the following disclaimer in the documentation
+ *and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "typeinfo.h"
+#include "dwarf_eh.h"
+#include "atomic.h"
+#include "cxxabi.h"
+
+#pragma weak pthread_key_create
+#pragma weak pthread_setspecific
+#pragma weak pthread_getspecific
+#pragma weak pthread_once
+#ifdef LIBCXXRT_WEAK_LOCKS
+#pragma weak pthread_mutex_lock
+#define pthread_mutex_lock(mtx) do {\
+   if (pthread_mutex_lock) pthread_mutex_lock(mtx);\
+   } while(0)
+#pragma weak pthread_mutex_unlock
+#define pthread_mutex_unlock(mtx) do {\
+   if (pthread_mutex_unlock) pthread_mutex_unlock(mtx);\
+   } while(0)
+#pragma weak pthread_cond_signal
+#define pthread_cond_signal(cv) do {\
+   if (pthread_cond_signal) pthread_cond_signal(cv);\
+   } while(0)
+#pragma weak pthread_cond_wait
+#define pthread_cond_wait(cv, mtx) do {\
+   if (pthread_cond_wait) pthread_cond_wait(cv, mtx);\
+   } while(0)
+#endif
+
+using namespace ABI_NAMESPACE;
+
+/**
+ * Saves the result of the landing pad that we have found.  For ARM, this is
+ * stored in the generic unwind structure, while on other platforms it is
+ * stored in the C++ exception.
+ */
+static void saveLandingPad(struct _Unwind_Context *context,
+   

svn commit: r298996 - head/contrib/subversion/subversion/svn

2016-05-03 Thread Dimitry Andric
Author: dim
Date: Tue May  3 18:06:42 2016
New Revision: 298996
URL: https://svnweb.freebsd.org/changeset/base/298996

Log:
  Re-sync the FreeBSD-specific Subversion template with the one from
  ports.
  
  MFC after:11 days
  X-MFC-With:   r298845

Modified:
  head/contrib/subversion/subversion/svn/util.c

Modified: head/contrib/subversion/subversion/svn/util.c
==
--- head/contrib/subversion/subversion/svn/util.c   Tue May  3 18:05:43 
2016(r298995)
+++ head/contrib/subversion/subversion/svn/util.c   Tue May  3 18:06:42 
2016(r298996)
@@ -343,6 +343,7 @@ truncate_buffer_at_prefix(apr_size_t *ne
 static const char *prefixes[] = {
   "PR:",
   "Submitted by:",
+  "Reported by:",
   "Reviewed by:",
   "Approved by:",
   "Obtained from:",
@@ -420,6 +421,7 @@ svn_cl__get_log_message(const char **log
   svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "PR:\t\t" APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "Submitted by:\t" APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, "Reported by:\t" APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "Reviewed by:\t" APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "Approved by:\t" APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "Obtained from:\t" APR_EOL_STR);
@@ -445,8 +447,9 @@ svn_cl__get_log_message(const char **log
   svn_stringbuf_appendcstr(default_msg, EDITOR_EOF_PREFIX);
   svn_stringbuf_appendcstr(default_msg, APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "> Description of fields to fill in 
above: 76 columns --|" APR_EOL_STR);
-  svn_stringbuf_appendcstr(default_msg, "> PR:   If a 
GNATS PR is affected by the change." APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, "> PR:   If and 
which Problem Report is related." APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "> Submitted by: If 
someone else sent in the change." APR_EOL_STR);
+  svn_stringbuf_appendcstr(default_msg, "> Reported by:  If 
someone else reported the issue." APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "> Reviewed by:  If 
someone else reviewed your modification." APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "> Approved by:  If you 
needed approval for this commit." APR_EOL_STR);
   svn_stringbuf_appendcstr(default_msg, "> Obtained from:If the 
change is from a third party." APR_EOL_STR);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r298845 - in head: contrib/subversion contrib/subversion/subversion/include contrib/subversion/subversion/libsvn_client contrib/subversion/subversion/libsvn_diff contrib/subversion/subv...

2016-04-30 Thread Dimitry Andric
Author: dim
Date: Sat Apr 30 10:35:42 2016
New Revision: 298845
URL: https://svnweb.freebsd.org/changeset/base/298845

Log:
  Update from subversion 1.9.2 to 1.9.4.
  
  This contains only bug fixes, no new features.  The repository format is
  also unchanged from 1.9.2.  Full list of changes between 1.9.4 and
  earlier versions:
  
https://svn.apache.org/repos/asf/subversion/tags/1.9.4/CHANGES
  
  Note that the two security issues fixed in 1.9.4 (CVE-2016-2167 and
  CVE-2016-2168) do not affect the version of Subversion in the FreeBSD
  base system, since neither SASL nor Apache modules are enabled.
  
  Relnotes: yes
  MFC after:2 weeks

Modified:
  head/contrib/subversion/CHANGES
  head/contrib/subversion/INSTALL
  head/contrib/subversion/Makefile.in
  head/contrib/subversion/NOTICE
  head/contrib/subversion/build-outputs.mk
  head/contrib/subversion/configure
  head/contrib/subversion/subversion/include/svn_client.h
  head/contrib/subversion/subversion/include/svn_config.h
  head/contrib/subversion/subversion/include/svn_fs.h
  head/contrib/subversion/subversion/include/svn_version.h
  head/contrib/subversion/subversion/libsvn_client/externals.c
  head/contrib/subversion/subversion/libsvn_client/merge.c
  head/contrib/subversion/subversion/libsvn_client/patch.c
  head/contrib/subversion/subversion/libsvn_diff/binary_diff.c
  head/contrib/subversion/subversion/libsvn_fs_base/dag.c
  head/contrib/subversion/subversion/libsvn_fs_base/fs.h
  head/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c
  head/contrib/subversion/subversion/libsvn_fs_fs/dag.c
  head/contrib/subversion/subversion/libsvn_fs_fs/fs.h
  head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c
  head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.h
  head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h
  head/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
  head/contrib/subversion/subversion/libsvn_fs_fs/tree.c
  head/contrib/subversion/subversion/libsvn_fs_x/rep-cache-db.h
  head/contrib/subversion/subversion/libsvn_ra_local/ra_plugin.c
  head/contrib/subversion/subversion/libsvn_ra_serf/commit.c
  head/contrib/subversion/subversion/libsvn_ra_serf/inherited_props.c
  head/contrib/subversion/subversion/libsvn_ra_serf/merge.c
  head/contrib/subversion/subversion/libsvn_ra_serf/multistatus.c
  head/contrib/subversion/subversion/libsvn_ra_serf/ra_serf.h
  head/contrib/subversion/subversion/libsvn_ra_serf/replay.c
  head/contrib/subversion/subversion/libsvn_ra_serf/serf.c
  head/contrib/subversion/subversion/libsvn_ra_serf/util.c
  head/contrib/subversion/subversion/libsvn_ra_svn/client.c
  head/contrib/subversion/subversion/libsvn_ra_svn/deprecated.c
  head/contrib/subversion/subversion/libsvn_ra_svn/marshal.c
  head/contrib/subversion/subversion/libsvn_repos/dump.c
  head/contrib/subversion/subversion/libsvn_repos/log.c
  head/contrib/subversion/subversion/libsvn_repos/repos.c
  head/contrib/subversion/subversion/libsvn_subr/auth.c
  head/contrib/subversion/subversion/libsvn_subr/cache-membuffer.c
  head/contrib/subversion/subversion/libsvn_subr/eol.c
  head/contrib/subversion/subversion/libsvn_subr/gpg_agent.c
  head/contrib/subversion/subversion/libsvn_subr/internal_statements.h
  head/contrib/subversion/subversion/libsvn_subr/prompt.c
  head/contrib/subversion/subversion/libsvn_subr/sqlite.c
  head/contrib/subversion/subversion/libsvn_subr/string.c
  head/contrib/subversion/subversion/libsvn_subr/utf_validate.c
  head/contrib/subversion/subversion/libsvn_subr/version.c
  head/contrib/subversion/subversion/libsvn_wc/deprecated.c
  head/contrib/subversion/subversion/libsvn_wc/wc-checks.h
  head/contrib/subversion/subversion/libsvn_wc/wc-metadata.h
  head/contrib/subversion/subversion/libsvn_wc/wc-queries.h
  head/contrib/subversion/subversion/libsvn_wc/wc-queries.sql
  head/contrib/subversion/subversion/libsvn_wc/wc_db_pristine.c
  head/contrib/subversion/subversion/svn/conflict-callbacks.c
  head/contrib/subversion/subversion/svn/diff-cmd.c
  head/contrib/subversion/subversion/svn/lock-cmd.c
  head/contrib/subversion/subversion/svn/unlock-cmd.c
  head/contrib/subversion/subversion/svnlook/svnlook.c
  head/contrib/subversion/subversion/svnserve/cyrus_auth.c
  head/contrib/subversion/win-tests.py
  head/usr.bin/svn/Makefile.inc
  head/usr.bin/svn/svn_private_config.h
Directory Properties:
  head/contrib/subversion/   (props changed)

Modified: head/contrib/subversion/CHANGES
==
--- head/contrib/subversion/CHANGES Sat Apr 30 09:50:08 2016
(r298844)
+++ head/contrib/subversion/CHANGES Sat Apr 30 10:35:42 2016
(r298845)
@@ -1,3 +1,91 @@
+Version 1.9.4
+(28 Apr 2016, from /branches/1.9.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.9.4
+
+ User-visible changes:
+  - Client-side bugfixes:
+* diff: support '--summarize --ignore-properties' (part of issue #4567)
+* checkout: fix performance 

svn commit: r298147 - head/contrib/llvm/tools/clang/tools/driver

2016-04-17 Thread Dimitry Andric
Author: dim
Date: Sun Apr 17 15:48:19 2016
New Revision: 298147
URL: https://svnweb.freebsd.org/changeset/base/298147

Log:
  Until it has been properly fixed upstream, apply a temporary workaround
  for LLVM PR 26999 (in some cases, -save-temps can cause an assertion
  failure in clang's -cc1as stage).

Modified:
  head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp

Modified: head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp
==
--- head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp   Sun Apr 17 
12:12:25 2016(r298146)
+++ head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp   Sun Apr 17 
15:48:19 2016(r298147)
@@ -200,7 +200,7 @@ bool AssemblerInvocation::CreateFromArgs
   // Any DebugInfoKind implies GenDwarfForAssembly.
   Opts.GenDwarfForAssembly = Args.hasArg(OPT_debug_info_kind_EQ);
   Opts.CompressDebugSections = Args.hasArg(OPT_compress_debug_sections);
-  Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 0, Diags);
+  Opts.DwarfVersion = getLastArgIntValue(Args, OPT_dwarf_version_EQ, 2, Diags);
   Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
   Opts.DwarfDebugProducer = Args.getLastArgValue(OPT_dwarf_debug_producer);
   Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r297334 - head/sys/dev/vt/hw/vga

2016-03-28 Thread Dimitry Andric
On 28 Mar 2016, at 09:36, Sepherosa Ziehau  wrote:
> 
> Author: sephe
> Date: Mon Mar 28 07:36:54 2016
> New Revision: 297334
> URL: https://svnweb.freebsd.org/changeset/base/297334
> 
> Log:
>  vt: Use textmode when we're running on hypervisors
> 
>  The graphic mode is noticeably slow on hypervisors, especially
>  on Hyper-V (1 second to each line).
> 
>  Submitted by:Dexuan Cui 
>  Reviewed by: kib, sephe, royger (early loader version)
>  MFC after:   1 week
>  Sponsored by:Microsoft OSTC
>  Differential Revision:   https://reviews.freebsd.org/D5739

Ah yes, this is very nice, thanks.  The graphical console was also
*extremely* slow on VMware guests.  It could take 15 minutes to reach
the login prompt!

That said, it would be still be interesting to see if it is possible to
speed up the graphical console somehow.  The Linux kernel can also use
a graphical console, but it isn't nearly as slow as that of FreeBSD...

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r297322 - head/contrib/libc++/include

2016-03-27 Thread Dimitry Andric
Author: dim
Date: Sun Mar 27 21:20:43 2016
New Revision: 297322
URL: https://svnweb.freebsd.org/changeset/base/297322

Log:
  Pull in r255683 from upstream libc++ trunk (by Eric Fiselier):
  
[libcxx] Enable noexcept for GCC 4.6 and greater
  
Summary:
This patch allows GCC 4.6 and above to use `noexcept` as opposed to
`throw()`.
  
Is it an ABI safe change to suddenly switch on `noexcept`? I imagine
it must be because it's disabled in w/ clang in C++03 but not C++11.
  
Reviewers: danalbert, jroelofs, mclow.lists
  
Subscribers: cfe-commits
  
Differential Revision: http://reviews.llvm.org/D15516
  
  This should fix errors from gcc 4.6 and higher when compiling llvm-cov
  and/or other llvm tools.
  
  Reported by:  bdrewery

Modified:
  head/contrib/libc++/include/__config

Modified: head/contrib/libc++/include/__config
==
--- head/contrib/libc++/include/__configSun Mar 27 20:02:21 2016
(r297321)
+++ head/contrib/libc++/include/__configSun Mar 27 21:20:43 2016
(r297322)
@@ -364,14 +364,8 @@ typedef __char32_t char32_t;
 #endif
 #endif
 
-#if (__has_feature(cxx_noexcept))
-#  define _NOEXCEPT noexcept
-#  define _NOEXCEPT_(x) noexcept(x)
-#  define _NOEXCEPT_OR_FALSE(x) noexcept(x)
-#else
-#  define _NOEXCEPT throw()
-#  define _NOEXCEPT_(x)
-#  define _NOEXCEPT_OR_FALSE(x) false
+#if !(__has_feature(cxx_noexcept))
+#define _LIBCPP_HAS_NO_NOEXCEPT
 #endif
 
 #if __has_feature(underlying_type)
@@ -439,10 +433,6 @@ namespace std {
 #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
 #endif
 
-#define _NOEXCEPT throw()
-#define _NOEXCEPT_(x)
-#define _NOEXCEPT_OR_FALSE(x) false
-
 #ifndef __GXX_EXPERIMENTAL_CXX0X__
 
 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
@@ -456,6 +446,7 @@ namespace std {
 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES
 #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
 #define _LIBCPP_HAS_NO_STRONG_ENUMS
+#define _LIBCPP_HAS_NO_NOEXCEPT
 
 #else  // __GXX_EXPERIMENTAL_CXX0X__
 
@@ -479,6 +470,7 @@ namespace std {
 #endif  // _GNUC_VER < 404
 
 #if _GNUC_VER < 406
+#define _LIBCPP_HAS_NO_NOEXCEPT
 #define _LIBCPP_HAS_NO_NULLPTR
 #endif
 
@@ -513,15 +505,14 @@ using namespace _LIBCPP_NAMESPACE __attr
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
 #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+#define _LIBCPP_HAS_NO_NOEXCEPT
 #define __alignof__ __alignof
 #define _LIBCPP_NORETURN __declspec(noreturn)
 #define _LIBCPP_UNUSED
 #define _ALIGNAS(x) __declspec(align(x))
 #define _LIBCPP_HAS_NO_VARIADICS
 
-#define _NOEXCEPT throw ()
-#define _NOEXCEPT_(x)
-#define _NOEXCEPT_OR_FALSE(x) false
+
 
 #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
 #define _LIBCPP_END_NAMESPACE_STD  }
@@ -541,14 +532,11 @@ namespace std {
 #define _LIBCPP_NORETURN __attribute__((noreturn))
 #define _LIBCPP_UNUSED
 
-#define _NOEXCEPT throw()
-#define _NOEXCEPT_(x)
-#define _NOEXCEPT_OR_FALSE(x) false
-
 #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
 #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+#define _LIBCPP_HAS_NO_NOEXCEPT
 #define _LIBCPP_HAS_NO_NULLPTR
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
 #define _LIBCPP_HAS_IS_BASE_OF
@@ -572,6 +560,14 @@ namespace std {
 
 #endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__
 
+#ifndef _LIBCPP_HAS_NO_NOEXCEPT
+#  define _NOEXCEPT noexcept
+#  define _NOEXCEPT_(x) noexcept(x)
+#else
+#  define _NOEXCEPT throw()
+#  define _NOEXCEPT_(x)
+#endif
+
 #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
 typedef unsigned short char16_t;
 typedef unsigned int   char32_t;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297299 - in head: contrib/libcxxrt lib/libcxxrt

2016-03-26 Thread Dimitry Andric
Author: dim
Date: Sun Mar 27 00:37:54 2016
New Revision: 297299
URL: https://svnweb.freebsd.org/changeset/base/297299

Log:
  Compile libcxxrt as C++11, since it is only really used in combination
  with libc++, which is also C++11.  Also change one _Static_assert (which
  is really C11) back into static_assert, like upstream.
  
  This should help when compiling libcxxrt with newer versions of gcc,
  which refuse to recognize any form of static assertions, if not
  compiling for C++11 or higher.
  
  While here, add -nostdinc++ to CFLAGS, to prevent picking up any C++
  headers outside the source tree.

Modified:
  head/contrib/libcxxrt/guard.cc
  head/lib/libcxxrt/Makefile

Modified: head/contrib/libcxxrt/guard.cc
==
--- head/contrib/libcxxrt/guard.cc  Sat Mar 26 23:39:53 2016
(r297298)
+++ head/contrib/libcxxrt/guard.cc  Sun Mar 27 00:37:54 2016
(r297299)
@@ -101,7 +101,7 @@ typedef struct {
uint32_t init_half;
uint32_t lock_half;
 } guard_t;
-_Static_assert(sizeof(guard_t) == sizeof(uint64_t), "");
+static_assert(sizeof(guard_t) == sizeof(uint64_t), "");
 static const uint32_t LOCKED = 1;
 static const uint32_t INITIALISED = static_cast(1) << 24;
 #  endif

Modified: head/lib/libcxxrt/Makefile
==
--- head/lib/libcxxrt/Makefile  Sat Mar 26 23:39:53 2016(r297298)
+++ head/lib/libcxxrt/Makefile  Sun Mar 27 00:37:54 2016(r297299)
@@ -20,7 +20,10 @@ SRCS+=   libelftc_dem_gnu3.c\
guard.cc
 
 WARNS= 0
-CFLAGS+=   -I${SRCDIR}
+CFLAGS+=   -I${SRCDIR} -nostdinc++
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++11
+.endif
 VERSION_MAP=   ${.CURDIR}/Version.map
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297294 - head/contrib/llvm/lib/Target/X86

2016-03-26 Thread Dimitry Andric
Author: dim
Date: Sat Mar 26 17:38:15 2016
New Revision: 297294
URL: https://svnweb.freebsd.org/changeset/base/297294

Log:
  Pull in r264465 from upstream llvm trunk (by David Majnemer):
  
[X86] Emit a proper ADJCALLSTACKDOWN in EmitLoweredTLSAddr
  
We forgot to add the second machine operand to our ADJCALLSTACKDOWN,
resulting in crashes in PEI.
  
This fixes PR27071.
  
  This should fix an assertion failure during buildworld, when using -Os,
  and targeting either i386 directly, or building the 32-bit libraries on
  amd64.
  
  Reported by:  Eric Camachat 

Modified:
  head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp

Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
==
--- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppSat Mar 26 
15:39:48 2016(r297293)
+++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppSat Mar 26 
17:38:15 2016(r297294)
@@ -22242,7 +22242,7 @@ X86TargetLowering::EmitLoweredTLSAddr(Ma
   // Emit CALLSEQ_START right before the instruction.
   unsigned AdjStackDown = TII.getCallFrameSetupOpcode();
   MachineInstrBuilder CallseqStart =
-BuildMI(MF, DL, TII.get(AdjStackDown)).addImm(0);
+BuildMI(MF, DL, TII.get(AdjStackDown)).addImm(0).addImm(0);
   BB->insert(MachineBasicBlock::iterator(MI), CallseqStart);
 
   // Emit CALLSEQ_END right after the instruction.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297244 - head/contrib/llvm/include/llvm/Support

2016-03-24 Thread Dimitry Andric
Author: dim
Date: Thu Mar 24 20:55:23 2016
New Revision: 297244
URL: https://svnweb.freebsd.org/changeset/base/297244

Log:
  Pull in r264335 from upstream llvm trunk:
  
Add  to ThreadPool.h, since std::atomic is used
  
Summary:
Apparently, when compiling with gcc 5.3.2 for powerpc64, the order of
headers is such that it gets an error about std::atomic<> use in
ThreadPool.h, since this header is not included explicitly.  See also:
  
https://llvm.org/bugs/show_bug.cgi?id=27058
  
Fix this by including .  Patch by Bryan Drewery.
  
Reviewers: chandlerc, joker.eph
  
Subscribers: bdrewery, llvm-commits
  
Differential Revision: http://reviews.llvm.org/D18460

Modified:
  head/contrib/llvm/include/llvm/Support/ThreadPool.h

Modified: head/contrib/llvm/include/llvm/Support/ThreadPool.h
==
--- head/contrib/llvm/include/llvm/Support/ThreadPool.h Thu Mar 24 20:52:35 
2016(r297243)
+++ head/contrib/llvm/include/llvm/Support/ThreadPool.h Thu Mar 24 20:55:23 
2016(r297244)
@@ -33,6 +33,7 @@
 #pragma warning(pop)
 #endif
 
+#include 
 #include 
 #include 
 #include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297212 - head/include

2016-03-23 Thread Dimitry Andric
Author: dim
Date: Wed Mar 23 19:17:12 2016
New Revision: 297212
URL: https://svnweb.freebsd.org/changeset/base/297212

Log:
  For C++, expose long long types and functions (lldiv_t, llabs, lldiv,
  etc) in stdlib.h.  These will be needed for newer versions of libc++,
  which uses them for defining overloaded versions of abs() and div().
  
  MFC after:1 week

Modified:
  head/include/stdlib.h

Modified: head/include/stdlib.h
==
--- head/include/stdlib.h   Wed Mar 23 18:21:26 2016(r297211)
+++ head/include/stdlib.h   Wed Mar 23 19:17:12 2016(r297212)
@@ -125,7 +125,7 @@ size_t   wcstombs(char * __restrict, cons
  *
  * (The only other extension made by C99 in thie header is _Exit().)
  */
-#if __ISO_C_VISIBLE >= 1999
+#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus)
 #ifdef __LONG_LONG_SUPPORTED
 /* LONGLONG */
 typedef struct {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296735 - head/sys/dev/cxgbe

2016-03-12 Thread Dimitry Andric
Author: dim
Date: Sat Mar 12 18:38:51 2016
New Revision: 296735
URL: https://svnweb.freebsd.org/changeset/base/296735

Log:
  Fix the following gcc warnings on sparc64, when TCP_OFFLOAD is not
  defined:
  
  sys/dev/cxgbe/t4_main.c:7474: warning: 'sysctl_tp_tick' defined but not 
used
  sys/dev/cxgbe/t4_main.c:7505: warning: 'sysctl_tp_dack_timer' defined but 
not used
  sys/dev/cxgbe/t4_main.c:7519: warning: 'sysctl_tp_timer' defined but not 
used
  
  This just adds a bunch of #ifdef TCP_OFFLOAD in the right places.
  
  Reviewed by:  np
  Differential Revision: https://reviews.freebsd.org/D5620

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cSat Mar 12 18:38:13 2016
(r296734)
+++ head/sys/dev/cxgbe/t4_main.cSat Mar 12 18:38:51 2016
(r296735)
@@ -491,9 +491,11 @@ static int sysctl_tx_rate(SYSCTL_HANDLER
 static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS);
 static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS);
 #endif
+#ifdef TCP_OFFLOAD
 static int sysctl_tp_tick(SYSCTL_HANDLER_ARGS);
 static int sysctl_tp_dack_timer(SYSCTL_HANDLER_ARGS);
 static int sysctl_tp_timer(SYSCTL_HANDLER_ARGS);
+#endif
 static uint32_t fconf_iconf_to_mode(uint32_t, uint32_t);
 static uint32_t mode_to_fconf(uint32_t);
 static uint32_t mode_to_iconf(uint32_t);
@@ -7455,6 +7457,7 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS)
 }
 #endif
 
+#ifdef TCP_OFFLOAD
 static void
 unit_conv(char *buf, size_t len, u_int val, u_int factor)
 {
@@ -7538,6 +7541,7 @@ sysctl_tp_timer(SYSCTL_HANDLER_ARGS)
 
return (sysctl_handle_long(oidp, , 0, req));
 }
+#endif
 
 static uint32_t
 fconf_iconf_to_mode(uint32_t fconf, uint32_t iconf)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296724 - head/usr.sbin/gpioctl

2016-03-12 Thread Dimitry Andric
Author: dim
Date: Sat Mar 12 15:10:30 2016
New Revision: 296724
URL: https://svnweb.freebsd.org/changeset/base/296724

Log:
  Fix gcc warnings about possibly uninitialized variables in gpioctl.c.
  
  Noticed by:   bz

Modified:
  head/usr.sbin/gpioctl/gpioctl.c

Modified: head/usr.sbin/gpioctl/gpioctl.c
==
--- head/usr.sbin/gpioctl/gpioctl.c Sat Mar 12 14:54:34 2016
(r296723)
+++ head/usr.sbin/gpioctl/gpioctl.c Sat Mar 12 15:10:30 2016
(r296724)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#define PIN_TYPE_UNKNOWN   0
 #define PIN_TYPE_NUMBER1
 #define PIN_TYPE_NAME  2
 
@@ -271,7 +270,7 @@ main(int argc, char **argv)
 
/* Find the pin number by the name */
switch (pin_type) {
-   case PIN_TYPE_UNKNOWN:
+   default:
/* First test if it is a pin number */
pinn = str2int(argv[0], );
if (ok) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296687 - head/contrib/libc++/include

2016-03-11 Thread Dimitry Andric
Author: dim
Date: Fri Mar 11 22:56:16 2016
New Revision: 296687
URL: https://svnweb.freebsd.org/changeset/base/296687

Log:
  Pull in r250279 from upstream libc++ trunk (by Eric Fiselier):
  
Fix GCC atomic implementation in C++03
  
  Pull in r250802 from upstream libc++ trunk (by Eric Fiselier):
  
Detect relaxed constexpr rules for gcc versions
  
  Pull in r255585 from upstream libc++ trunk (by Eric Fiselier):
  
Fix various GCC mis-configurations for newer versions.
  
This patch goes through and enables C++11 and C++14 features for newer 
GCC's.
The main changes are:
  
1. Turn on variable templates. (Uses __cpp_variable_templates)
2. Assert atomic is trivially copyable (Uses _GNUC_VER >= 501).
3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.
  
  Together, these should fix building clang 3.8.0 as part of building
  world with recent versions of gcc (e.g. the devel/*-xtoolchain-gcc
  ports).

Modified:
  head/contrib/libc++/include/__config
  head/contrib/libc++/include/atomic

Modified: head/contrib/libc++/include/__config
==
--- head/contrib/libc++/include/__configFri Mar 11 22:45:23 2016
(r296686)
+++ head/contrib/libc++/include/__configFri Mar 11 22:56:16 2016
(r296687)
@@ -429,10 +429,15 @@ namespace std {
 #define _LIBCPP_HAS_NO_CONSTEXPR
 #endif
 
-// No version of GCC supports relaxed constexpr rules
+// Determine if GCC supports relaxed constexpr
+#if !defined(__cpp_constexpr) || __cpp_constexpr < 201304L
 #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR
+#endif
+
 // GCC 5 will support variable templates
+#if !defined(__cpp_variable_templates) || __cpp_variable_templates < 201304L
 #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
+#endif
 
 #define _NOEXCEPT throw()
 #define _NOEXCEPT_(x)
@@ -454,7 +459,6 @@ namespace std {
 
 #else  // __GXX_EXPERIMENTAL_CXX0X__
 
-#define _LIBCPP_HAS_NO_TRAILING_RETURN
 #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
 
 #if _GNUC_VER < 403
@@ -468,6 +472,7 @@ namespace std {
 #if _GNUC_VER < 404
 #define _LIBCPP_HAS_NO_DECLTYPE
 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
+#define _LIBCPP_HAS_NO_TRAILING_RETURN
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
 #define _LIBCPP_HAS_NO_VARIADICS
 #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS

Modified: head/contrib/libc++/include/atomic
==
--- head/contrib/libc++/include/atomic  Fri Mar 11 22:45:23 2016
(r296686)
+++ head/contrib/libc++/include/atomic  Fri Mar 11 22:56:16 2016
(r296687)
@@ -553,7 +553,18 @@ typedef enum memory_order
 namespace __gcc_atomic {
 template 
 struct __gcc_atomic_t {
-  __gcc_atomic_t() _NOEXCEPT {}
+
+#if _GNUC_VER >= 501
+static_assert(is_trivially_copyable<_Tp>::value,
+  "std::atomic requires that 'Tp' be a trivially copyable type");
+#endif
+
+  _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+__gcc_atomic_t() _NOEXCEPT = default;
+#else
+__gcc_atomic_t() _NOEXCEPT : __a_value() {}
+#endif // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
   _LIBCPP_CONSTEXPR explicit __gcc_atomic_t(_Tp value) _NOEXCEPT
 : __a_value(value) {}
   _Tp __a_value;
@@ -574,7 +585,7 @@ struct __can_assign {
   sizeof(__test_atomic_assignable<_Tp, _Td>(1)) == sizeof(char);
 };
 
-static inline constexpr int __to_gcc_order(memory_order __order) {
+static inline _LIBCPP_CONSTEXPR int __to_gcc_order(memory_order __order) {
   // Avoid switch statement to make this a constexpr.
   return __order == memory_order_relaxed ? __ATOMIC_RELAXED:
  (__order == memory_order_acquire ? __ATOMIC_ACQUIRE:
@@ -584,7 +595,7 @@ static inline constexpr int __to_gcc_ord
   __ATOMIC_CONSUME;
 }
 
-static inline constexpr int __to_gcc_failure_order(memory_order __order) {
+static inline _LIBCPP_CONSTEXPR int __to_gcc_failure_order(memory_order 
__order) {
   // Avoid switch statement to make this a constexpr.
   return __order == memory_order_relaxed ? __ATOMIC_RELAXED:
  (__order == memory_order_acquire ? __ATOMIC_ACQUIRE:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296679 - head/contrib/libc++/include

2016-03-11 Thread Dimitry Andric
Author: dim
Date: Fri Mar 11 20:30:06 2016
New Revision: 296679
URL: https://svnweb.freebsd.org/changeset/base/296679

Log:
  Pull in r246280 from upstream libc++ trunk (by Eric Fiselier):
  
Fix most GCC warnings during build. Only -Wattribute left.
  
  This helps to fix a number of -Werror warnings when building world with
  recent versions of gcc (e.g. the devel/*-xtoolchain-gcc ports).

Modified:
  head/contrib/libc++/include/string
  head/contrib/libc++/include/system_error

Modified: head/contrib/libc++/include/string
==
--- head/contrib/libc++/include/string  Fri Mar 11 20:26:45 2016
(r296678)
+++ head/contrib/libc++/include/string  Fri Mar 11 20:30:06 2016
(r296679)
@@ -1445,7 +1445,8 @@ public:
 _LIBCPP_INLINE_VISIBILITY size_type length() const _NOEXCEPT {return 
size();}
 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT;
 _LIBCPP_INLINE_VISIBILITY size_type capacity() const _NOEXCEPT
-{return (__is_long() ? __get_long_cap() : __min_cap) - 1;}
+{return (__is_long() ? __get_long_cap()
+ : static_cast(__min_cap)) - 1;}
 
 void resize(size_type __n, value_type __c);
 _LIBCPP_INLINE_VISIBILITY void resize(size_type __n) {resize(__n, 
value_type());}
@@ -1785,11 +1786,11 @@ private:
 template  static
 _LIBCPP_INLINE_VISIBILITY
 size_type __align_it(size_type __s) _NOEXCEPT
-{return __s + (__a-1) & ~(__a-1);}
+{return (__s + (__a-1)) & ~(__a-1);}
 enum {__alignment = 16};
 static _LIBCPP_INLINE_VISIBILITY
 size_type __recommend(size_type __s) _NOEXCEPT
-{return (__s < __min_cap ? __min_cap :
+{return (__s < __min_cap ? static_cast(__min_cap) :
  __align_it (__s+1)) - 1;}
 

Modified: head/contrib/libc++/include/system_error
==
--- head/contrib/libc++/include/system_errorFri Mar 11 20:26:45 2016
(r296678)
+++ head/contrib/libc++/include/system_errorFri Mar 11 20:30:06 2016
(r296679)
@@ -371,7 +371,7 @@ public:
 error_category() _NOEXCEPT;
 #else
 _LIBCPP_ALWAYS_INLINE
-_LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT _LIBCPP_DEFAULT;
+_LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT _LIBCPP_DEFAULT
 #endif
 private:
 error_category(const error_category&);// = delete;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296672 - head/sbin/nvmecontrol

2016-03-11 Thread Dimitry Andric
Author: dim
Date: Fri Mar 11 17:25:18 2016
New Revision: 296672
URL: https://svnweb.freebsd.org/changeset/base/296672

Log:
  In nvmecontrol, fix gcc warnings about the local 'power' variables
  shadowing a global declaration.

Modified:
  head/sbin/nvmecontrol/power.c

Modified: head/sbin/nvmecontrol/power.c
==
--- head/sbin/nvmecontrol/power.c   Fri Mar 11 17:21:27 2016
(r296671)
+++ head/sbin/nvmecontrol/power.c   Fri Mar 11 17:25:18 2016
(r296672)
@@ -87,7 +87,7 @@ power_list(struct nvme_controller_data *
 }
 
 static void
-power_set(int fd, int power, int workload, int perm)
+power_set(int fd, int power_val, int workload, int perm)
 {
struct nvme_pt_command  pt;
uint32_t p;
@@ -96,7 +96,7 @@ power_set(int fd, int power, int workloa
memset(, 0, sizeof(pt));
pt.cmd.opc = NVME_OPC_SET_FEATURES;
pt.cmd.cdw10 = NVME_FEAT_POWER_MANAGEMENT | p;
-   pt.cmd.cdw11 = power | (workload << 5);
+   pt.cmd.cdw11 = power_val | (workload << 5);
 
if (ioctl(fd, NVME_PASSTHROUGH_CMD, ) < 0)
err(1, "set feature power mgmt request failed");
@@ -127,7 +127,7 @@ void
 power(int argc, char *argv[])
 {
struct nvme_controller_data cdata;
-   int ch, listflag = 0, powerflag = 0, power 
= 0, fd;
+   int ch, listflag = 0, powerflag = 0, 
power_val = 0, fd;
int workload = 0;
char*end;
 
@@ -138,7 +138,7 @@ power(int argc, char *argv[])
break;
case 'p':
powerflag = 1;
-   power = strtol(optarg, , 0);
+   power_val = strtol(optarg, , 0);
if (*end != '\0') {
fprintf(stderr, "Invalid power state number: 
%s\n", optarg);
power_usage();
@@ -174,7 +174,7 @@ power(int argc, char *argv[])
}
 
if (powerflag) {
-   power_set(fd, power, workload, 0);
+   power_set(fd, power_val, workload, 0);
goto out;
}
power_show(fd);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296428 - head/sys/boot/common

2016-03-07 Thread Dimitry Andric
On 07 Mar 2016, at 19:50, Warner Losh <i...@bsdimp.com> wrote:
> 
>> On Mar 7, 2016, at 10:41 AM, Dimitry Andric <d...@freebsd.org> wrote:
>> 
>> On 07 Mar 2016, at 17:28, Warner Losh <i...@bsdimp.com> wrote:
>> ...
>>> Alternatively, is there a switch to clang 3.8 that says 'Don't generate the 
>>> new
>>> relocation, use the old one instead" which would also be safe and allow a
>>> less-bumpy transition?
>> 
>> On amd64, we actually compile source files for the kernel with
>> -fno-asynchronous-unwind-tables, which is the flag that ensures object
>> files do not end up with a .eh_frame section, because the compiler will
>> refrain from inserting CFI directives into the assembler.
> 
> Excellent.
> 
>> However, this only affects C source files, and we have a number of
>> hand-written assembler sources in the tree, with CFI directives in them.
>> These will always result in .eh_frame sections, unless there is another
>> assembler-specific flag of suppressing that.
> 
> what are the odds of fixing this? Since the vast majority of assembler code
> is going to be in the base kernel. The AESNI stuff is the only exception
> that I can think of…
> 
> Are the CFI directives so that DTRACE works, or is there some other reason?

You could comment out the directives, but these are really the standard
way to do unwinding on amd64, without having to follow stack frames
'manually'.

It would even be better to drop the -fno-asynchronous-unwind-tables
option, and actually start making use of the unwind information in e.g.
the kernel debugger, or even for producing crash backtraces.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r296428 - head/sys/boot/common

2016-03-07 Thread Dimitry Andric
On 07 Mar 2016, at 17:28, Warner Losh  wrote:
...
> Alternatively, is there a switch to clang 3.8 that says 'Don't generate the 
> new
> relocation, use the old one instead" which would also be safe and allow a
> less-bumpy transition?

On amd64, we actually compile source files for the kernel with
-fno-asynchronous-unwind-tables, which is the flag that ensures object
files do not end up with a .eh_frame section, because the compiler will
refrain from inserting CFI directives into the assembler.

However, this only affects C source files, and we have a number of
hand-written assembler sources in the tree, with CFI directives in them.
These will always result in .eh_frame sections, unless there is another
assembler-specific flag of suppressing that.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r296428 - head/sys/boot/common

2016-03-06 Thread Dimitry Andric
On 07 Mar 2016, at 02:11, Julian Elischer <jul...@freebsd.org> wrote:
> 
> On 6/03/2016 7:57 AM, Dimitry Andric wrote:
>> Author: dim
>> Date: Sun Mar  6 15:57:43 2016
>> New Revision: 296428
>> URL: https://svnweb.freebsd.org/changeset/base/296428
>> 
>> Log:
>>   Since kernel modules can now contain sections of type SHT_AMD64_UNWIND,
>>   the boot loader should not skip over these anymore while loading images.
>>   Otherwise the kernel can still panic when it doesn't find the .eh_frame
>>   section belonging to the .rela.eh_frame section.
>>  Unfortunately this will require installing boot loaders from sys/boot
>>   before attempting to boot with a new kernel.
> 
> what happens to someone who doesn't replace their bootblocks?
> Or is this just the loader?

This just about the loaders, e.g. loader, loader.efi and zfsloader.


> The general way we have handled this sort of thing in the past is that we do 
> something
> that produces a nagging message for a decent time before it becomes mandatory.
> 
> I don't like the idea of people being caught unaware by this..
> 
> Can you please give a more detailed description of what happens?

If you preload modules with .eh_frame sections in them (such as
aesni.ko) from your loader.conf, your kernel will panic very early in
the boot.

If you don't preload any modules, or load only modules without .eh_frame
sections (most of of them), there is no issue at all.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r296428 - head/sys/boot/common

2016-03-06 Thread Dimitry Andric
On 06 Mar 2016, at 20:57, Nikolai Lifanov <lifa...@mail.lifanov.com> wrote:
> 
> On 2016-03-06 11:17, Dimitry Andric wrote:
>> On 06 Mar 2016, at 17:00, Oliver Pinter <oliver.pin...@hardenedbsd.org> 
>> wrote:
>>> On 3/6/16, Dimitry Andric <d...@freebsd.org> wrote:
>>>> Author: dim
>>>> Date: Sun Mar  6 15:57:43 2016
>>>> New Revision: 296428
>>>> URL: https://svnweb.freebsd.org/changeset/base/296428
>>>> Log:
>>>> Since kernel modules can now contain sections of type SHT_AMD64_UNWIND,
>>>> the boot loader should not skip over these anymore while loading images.
>>>> Otherwise the kernel can still panic when it doesn't find the .eh_frame
>>>> section belonging to the .rela.eh_frame section.
>>>> Unfortunately this will require installing boot loaders from sys/boot
>>>> before attempting to boot with a new kernel.
>>> Could you please add a note about this to UPDATING file?
>> I am a bit torn on this, because normally we always tell people to
>> install the kernel first, reboot, then run make installworld (which also
>> installs the boot loaders).
>> However, in this case, people might depend on their boot loader loading
>> modules which are required to make the system boot at all.  So if they
>> happened to forget updating their boot loader first, a panic might be
>> the result.
>> I wonder what a failsafe and acceptable upgrade scenario is, in this
>> case.  Normally the procedure is something like:
>>  make buildworld
>>  make buildkernel (with KERNCONF=whatever, if needed)
>>  make installkernel (again with KERNCONF, if needed)
>>  reboot (to single user, but cheating is possible usually)
>>  mergemaster -p
>>  make installworld
>> This could maybe be modified to:
>>  make buildworld
>>  make buildkernel (with KERNCONF=whatever, if needed)
>>  make installkernel (again with KERNCONF, if needed)
>>  make -C sys/boot install
>>  reboot (to single user, but cheating is possible usually)
>>  mergemaster -p
>>  make installworld
>> E.g. insert the step which installs the boot loaders just after (or
>> before) the step which installs the kernel.
>> Is something like this acceptable as a one-time workaround, or maybe it
>> is better in general, in case we ever add other new features to the boot
>> loaders?
>> -Dimitry
> 
> In my opinion, boot *blocks* (boot1) should be updated seldomly and not on 
> every install.
> All (?) instances of not updating these resulting in a failed boot have an 
> UPDATING
> entry or a similar warning (like the one during "zpool upgrade").

Well, each time you run make installworld, almost all the files in /boot
(except for configuration) get reinstalled.  For e.g. mbr, boot1 and
such, this has no consequences at all, until you install them into some
partition using gpart, but changes to loader, loader.efi or zfsloader
*will* affect the next startup.

Per a suggestion from Kostik, maybe it would be nice to have a separate
"make installboot" target, which installs just the components in /boot.
This could then be used before or after "make installkernel".

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r296430 - head

2016-03-06 Thread Dimitry Andric
Author: dim
Date: Sun Mar  6 17:34:21 2016
New Revision: 296430
URL: https://svnweb.freebsd.org/changeset/base/296430

Log:
  Add an UPDATING entry about installing the boot loaders after installing
  the kernel, on amd64.

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Sun Mar  6 17:24:02 2016(r296429)
+++ head/UPDATING   Sun Mar  6 17:34:21 2016(r296430)
@@ -31,6 +31,20 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20160306:
+   On amd64, clang 3.8.0 can now insert sections of type AMD64_UNWIND into
+   kernel modules.  Therefore, if you load any kernel modules at boot time,
+   please install the boot loaders after you install the kernel, but before
+   rebooting, e.g.:
+
+   make buildworld
+   make kernel KERNCONF=YOUR_KERNEL_HERE
+   make -C sys/boot install
+   
+
+   Then follow the usual steps, described in the General Notes section,
+   below.
+
 20160305:
Clang, llvm, lldb and compiler-rt have been upgraded to 3.8.0.  Please
see the 20141231 entry below for information about prerequisites and
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296428 - head/sys/boot/common

2016-03-06 Thread Dimitry Andric
On 06 Mar 2016, at 17:00, Oliver Pinter <oliver.pin...@hardenedbsd.org> wrote:
> 
> On 3/6/16, Dimitry Andric <d...@freebsd.org> wrote:
>> Author: dim
>> Date: Sun Mar  6 15:57:43 2016
>> New Revision: 296428
>> URL: https://svnweb.freebsd.org/changeset/base/296428
>> 
>> Log:
>>  Since kernel modules can now contain sections of type SHT_AMD64_UNWIND,
>>  the boot loader should not skip over these anymore while loading images.
>>  Otherwise the kernel can still panic when it doesn't find the .eh_frame
>>  section belonging to the .rela.eh_frame section.
>> 
>>  Unfortunately this will require installing boot loaders from sys/boot
>>  before attempting to boot with a new kernel.
> 
> Could you please add a note about this to UPDATING file?

I am a bit torn on this, because normally we always tell people to
install the kernel first, reboot, then run make installworld (which also
installs the boot loaders).

However, in this case, people might depend on their boot loader loading
modules which are required to make the system boot at all.  So if they
happened to forget updating their boot loader first, a panic might be
the result.

I wonder what a failsafe and acceptable upgrade scenario is, in this
case.  Normally the procedure is something like:

  make buildworld
  make buildkernel (with KERNCONF=whatever, if needed)
  make installkernel (again with KERNCONF, if needed)
  reboot (to single user, but cheating is possible usually)
  mergemaster -p
  make installworld

This could maybe be modified to:

  make buildworld
  make buildkernel (with KERNCONF=whatever, if needed)
  make installkernel (again with KERNCONF, if needed)
  make -C sys/boot install
  reboot (to single user, but cheating is possible usually)
  mergemaster -p
  make installworld

E.g. insert the step which installs the boot loaders just after (or
before) the step which installs the kernel.

Is something like this acceptable as a one-time workaround, or maybe it
is better in general, in case we ever add other new features to the boot
loaders?

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r296428 - head/sys/boot/common

2016-03-06 Thread Dimitry Andric
Author: dim
Date: Sun Mar  6 15:57:43 2016
New Revision: 296428
URL: https://svnweb.freebsd.org/changeset/base/296428

Log:
  Since kernel modules can now contain sections of type SHT_AMD64_UNWIND,
  the boot loader should not skip over these anymore while loading images.
  Otherwise the kernel can still panic when it doesn't find the .eh_frame
  section belonging to the .rela.eh_frame section.
  
  Unfortunately this will require installing boot loaders from sys/boot
  before attempting to boot with a new kernel.
  
  Reviewed by:  kib
  MFC after:2 weeks
  X-MFC-With:   r296419

Modified:
  head/sys/boot/common/load_elf_obj.c

Modified: head/sys/boot/common/load_elf_obj.c
==
--- head/sys/boot/common/load_elf_obj.c Sun Mar  6 14:37:49 2016
(r296427)
+++ head/sys/boot/common/load_elf_obj.c Sun Mar  6 15:57:43 2016
(r296428)
@@ -221,6 +221,9 @@ __elfN(obj_loadimage)(struct preloaded_f
switch (shdr[i].sh_type) {
case SHT_PROGBITS:
case SHT_NOBITS:
+#if defined(__i386__) || defined(__amd64__)
+   case SHT_AMD64_UNWIND:
+#endif
lastaddr = roundup(lastaddr, shdr[i].sh_addralign);
shdr[i].sh_addr = (Elf_Addr)lastaddr;
lastaddr += shdr[i].sh_size;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296427 - head

2016-03-06 Thread Dimitry Andric
Author: dim
Date: Sun Mar  6 14:37:49 2016
New Revision: 296427
URL: https://svnweb.freebsd.org/changeset/base/296427

Log:
  Add another libclang_rt library to ObsoleteFiles, so the enclosing
  directory can be removed completely.
  
  Noticed by:   Oliver Hartmann 

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sun Mar  6 11:41:08 2016(r296426)
+++ head/ObsoleteFiles.inc  Sun Mar  6 14:37:49 2016(r296427)
@@ -106,6 +106,8 @@ OLD_FILES+=usr/lib/clang/3.7.1/include/x
 OLD_FILES+=usr/lib/clang/3.7.1/include/xtestintrin.h
 OLD_DIRS+=usr/lib/clang/3.7.1/include
 OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-i386.a
+OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-i386.a
+OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
 OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan-x86_64.a
 OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-i386.a
 OLD_FILES+=usr/lib/clang/3.7.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296418 - in head/contrib/llvm: include/llvm/DebugInfo/DWARF lib/DebugInfo/DWARF

2016-03-05 Thread Dimitry Andric
Author: dim
Date: Sat Mar  5 21:10:34 2016
New Revision: 296418
URL: https://svnweb.freebsd.org/changeset/base/296418

Log:
  Convert two llvm source files to native line ending, which was also done
  upstream.  Merging doesn't automatically do this, unfortunately.

Modified:
  head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h   (contents, 
props changed)
  head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp   (contents, props 
changed)

Modified: head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h
==
--- head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.hSat Mar 
 5 20:24:31 2016(r296417)
+++ head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.hSat Mar 
 5 21:10:34 2016(r296418)
@@ -1,59 +1,59 @@
-//===-- DWARFDebugMacro.h ---*- C++ 
-*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===--===//
-
-#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGMACRO_H
-#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGMACRO_H
-
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/DataExtractor.h"
-#include "llvm/Support/Dwarf.h"
-
-namespace llvm {
-
-class raw_ostream;
-
-class DWARFDebugMacro {
-  /// A single macro entry within a macro list.
-  struct Entry {
-/// The type of the macro entry.
-uint32_t Type;
-union {
-  /// The source line where the macro is defined.
-  uint64_t Line;
-  /// Vendor extension constant value.
-  uint64_t ExtConstant;
-};
-
-union {
-  /// The string (name, value) of the macro entry.
-  const char *MacroStr;
-  // An unsigned integer indicating the identity of the source file.
-  uint64_t File;
-  /// Vendor extension string.
-  const char *ExtStr;
-};
-  };
-
-  typedef SmallVector MacroList;
-
-  /// A list of all the macro entries in the debug_macinfo section.
-  MacroList Macros;
-
-public:
-  DWARFDebugMacro() {}
-  /// Print the macro list found within the debug_macinfo section.
-  void dump(raw_ostream ) const;
-  /// Parse the debug_macinfo section accessible via the 'data' parameter.
-  void parse(DataExtractor data);
-};
-
-}
-
-#endif
+//===-- DWARFDebugMacro.h ---*- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGMACRO_H
+#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGMACRO_H
+
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/DataExtractor.h"
+#include "llvm/Support/Dwarf.h"
+
+namespace llvm {
+
+class raw_ostream;
+
+class DWARFDebugMacro {
+  /// A single macro entry within a macro list.
+  struct Entry {
+/// The type of the macro entry.
+uint32_t Type;
+union {
+  /// The source line where the macro is defined.
+  uint64_t Line;
+  /// Vendor extension constant value.
+  uint64_t ExtConstant;
+};
+
+union {
+  /// The string (name, value) of the macro entry.
+  const char *MacroStr;
+  // An unsigned integer indicating the identity of the source file.
+  uint64_t File;
+  /// Vendor extension string.
+  const char *ExtStr;
+};
+  };
+
+  typedef SmallVector MacroList;
+
+  /// A list of all the macro entries in the debug_macinfo section.
+  MacroList Macros;
+
+public:
+  DWARFDebugMacro() {}
+  /// Print the macro list found within the debug_macinfo section.
+  void dump(raw_ostream ) const;
+  /// Parse the debug_macinfo section accessible via the 'data' parameter.
+  void parse(DataExtractor data);
+};
+
+}
+
+#endif

Modified: head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp
==
--- head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp   Sat Mar  5 
20:24:31 2016(r296417)
+++ head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp   Sat Mar  5 
21:10:34 2016(r296418)
@@ -1,103 +1,103 @@
-//===-- DWARFDebugMacro.cpp 
---===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===--===//
-
-#include "SyntaxHighlighting.h"
-#include "llvm/DebugInfo/DWARF/DWARFDebugMacro.h"
-#include "llvm/Support/Compiler.h"
-#include 

Re: svn commit: r295768 - head/usr.sbin/iostat

2016-02-22 Thread Dimitry Andric
On 22 Feb 2016, at 10:56, David Chisnall <thera...@freebsd.org> wrote:
> 
> On 19 Feb 2016, at 23:23, Dimitry Andric <d...@freebsd.org> wrote:
>> 
>> This warning is only produced when you use -Wall -W, and then initialize
>> structs partially, i.e. you initialize some fields but not others.  I
>> think this is a quite reasonable warning for a high warning level.
> 
> The warning is annoying in many ways.  You ought to be able to zero 
> initialise any struct with {0}, but clang objects if you do this and requires 
> every field to be filled in.  This warning really shouldn’t be enabled with 
> -Wall, because it has too hight a false positive rate.

It isn't, it is in -W (a.k.a -Wextra).  But gcc also warns in this case.  E.g. 
if I use this example:

struct foo {
int i;
int j;
} bar[] = {
{ 42 },
{ 43 }
};

I get the following warnings from gcc -Wextra:

$ gcc -Wextra -c initializers.c
initializers.c:5:2: warning: missing initializer for field 'j' of 'struct foo' 
[-Wmissing-field-initializers]
  { 42 },
  ^
initializers.c:3:6: note: 'j' declared here
  int j;
  ^
initializers.c:6:2: warning: missing initializer for field 'j' of 'struct foo' 
[-Wmissing-field-initializers]
  { 43 }
  ^
initializers.c:3:6: note: 'j' declared here
  int j;
  ^

Note that the warnings disappear if C99 initializers are used.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r295901 - head/contrib/binutils/bfd

2016-02-22 Thread Dimitry Andric
Author: dim
Date: Mon Feb 22 22:16:32 2016
New Revision: 295901
URL: https://svnweb.freebsd.org/changeset/base/295901

Log:
  Fix a problem in ld, causing it to sometimes print messages similar to
  "invalid string offset 65521 >= 27261 for section `.strtab'". for object
  files produced by recent versions of clang.
  
  In BFD's elf_create_symbuf() function, the size of the symbol buffer
  ('ssymbuf') is not calculated correctly, and the initial value for the
  'ssym' variable is off by one, since 'ssymbuf' has shndx_count + 1
  members.
  
  MFC after:1 week

Modified:
  head/contrib/binutils/bfd/elf.c

Modified: head/contrib/binutils/bfd/elf.c
==
--- head/contrib/binutils/bfd/elf.c Mon Feb 22 21:40:53 2016
(r295900)
+++ head/contrib/binutils/bfd/elf.c Mon Feb 22 22:16:32 2016
(r295901)
@@ -8934,14 +8934,14 @@ elf_create_symbuf (bfd_size_type symcoun
shndx_count++;
 
   ssymbuf = bfd_malloc ((shndx_count + 1) * sizeof (*ssymbuf)
-   + (indbufend - indbuf) * sizeof (*ssymbuf));
+   + (indbufend - indbuf) * sizeof (*ssym));
   if (ssymbuf == NULL)
 {
   free (indbuf);
   return NULL;
 }
 
-  ssym = (struct elf_symbuf_symbol *) (ssymbuf + shndx_count);
+  ssym = (struct elf_symbuf_symbol *) (ssymbuf + shndx_count + 1);
   ssymbuf->ssym = NULL;
   ssymbuf->count = shndx_count;
   ssymbuf->st_shndx = 0;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r295844 - in head/cddl/contrib/opensolaris/cmd: zfs zpool

2016-02-21 Thread Dimitry Andric
Author: dim
Date: Sun Feb 21 13:03:58 2016
New Revision: 295844
URL: https://svnweb.freebsd.org/changeset/base/295844

Log:
  Fix "invalid type '(null)'" usage messages in zfs(8) and zpool(8).
  
  Currently, zfs(8) and zpool(8) print "invalid type '(null)'" or similar
  messages, if you pass in invalid types, sources or column names for "zfs
  get", "zfs list" and "zpool get".  This is because the commands use
  getsubopt(3), and in case of failure, they print 'value', which is NULL
  when sub options don't match.
  
  They should print 'suboptarg' instead, which is the documented way to
  get at the non-matching sub option value.
  
  Reviewed by:  smh
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D5365

Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
  head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cSat Feb 20 22:58:33 
2016(r295843)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cSun Feb 21 13:03:58 
2016(r295844)
@@ -1713,7 +1713,7 @@ zfs_do_get(int argc, char **argv)
default:
(void) fprintf(stderr,
gettext("invalid column name "
-   "'%s'\n"), value);
+   "'%s'\n"), suboptarg);
usage(B_FALSE);
}
}
@@ -1750,7 +1750,7 @@ zfs_do_get(int argc, char **argv)
default:
(void) fprintf(stderr,
gettext("invalid source "
-   "'%s'\n"), value);
+   "'%s'\n"), suboptarg);
usage(B_FALSE);
}
}
@@ -1786,7 +1786,7 @@ zfs_do_get(int argc, char **argv)
default:
(void) fprintf(stderr,
gettext("invalid type '%s'\n"),
-   value);
+   suboptarg);
usage(B_FALSE);
}
}
@@ -3156,7 +3156,7 @@ zfs_do_list(int argc, char **argv)
default:
(void) fprintf(stderr,
gettext("invalid type '%s'\n"),
-   value);
+   suboptarg);
usage(B_FALSE);
}
}

Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
==
--- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.cSat Feb 20 
22:58:33 2016(r295843)
+++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.cSun Feb 21 
13:03:58 2016(r295844)
@@ -5431,7 +5431,7 @@ zpool_do_get(int argc, char **argv)
default:
(void) fprintf(stderr,
gettext("invalid column name "
-   "'%s'\n"), value);
+   "'%s'\n"), suboptarg);
usage(B_FALSE);
}
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r295768 - head/usr.sbin/iostat

2016-02-19 Thread Dimitry Andric
On 19 Feb 2016, at 16:49, Alan Somers  wrote:
> 
> On Fri, Feb 19, 2016 at 5:24 AM, Sergey Kandaurov  wrote:
...
>>> -struct nlist namelist[] = {
>>> +static struct nlist namelist[] = {
>>> #define X_TTY_NIN  0
>>> -   { "_tty_nin" },
>>> +   { .n_name = "_tty_nin",
>>> + .n_type = 0, .n_other = 0, .n_desc = 0, .n_value = 0 },
>>> [...]
>> 
>> You unlikely need this excessive explicit zeroization.
>> In this case it is implicitly prezeroed.
...
> Yeah, it was being implicitly zeroized before.  But Clang complained
> about the structures being only partially initialized.  Since the
> whole point of my commit was to increase the WARNS level, I explicitly
> zeroed the zero fields to silence Clang.

You got this warning, most likely:

usr.sbin/iostat/iostat.c:122:15: error: missing field 'n_type' initializer 
[-Werror,-Wmissing-field-initializers]
{ "_tty_nin" },
 ^

This warning is only produced when you use -Wall -W, and then initialize
structs partially, i.e. you initialize some fields but not others.  I
think this is a quite reasonable warning for a high warning level.

On the other hand, if this kind of construct is used throughout the
tree, and it is not seen as a big problem, we can simply silence this
particular warning using -Wno-missing-field -initializers.  There is
already quite a list of warnings which are suppressed by default, even
at WARNS=6, namely:

-Wno-empty-body
-Wno-format-y2k
-Wno-pointer-sign
-Wno-string-plus-int
-Wno-unused-const-variable
-Wno-unused-parameter

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r294199 - head

2016-01-16 Thread Dimitry Andric
Author: dim
Date: Sun Jan 17 00:52:28 2016
New Revision: 294199
URL: https://svnweb.freebsd.org/changeset/base/294199

Log:
  Remove leading slashes added to ObsoleteFiles.inc in r294113.

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sun Jan 17 00:52:21 2016(r294198)
+++ head/ObsoleteFiles.inc  Sun Jan 17 00:52:28 2016(r294199)
@@ -39,9 +39,9 @@
 # done
 
 # 20160116: Update mandoc to cvs snapshot 20160116
-OLD_FILES+=/usr/share/mdocml/example.style.css
-OLD_FILES+=/usr/share/mdocml/style.css
-OLD_DIRS+=/usr/share/mdocml
+OLD_FILES+=usr/share/mdocml/example.style.css
+OLD_FILES+=usr/share/mdocml/style.css
+OLD_DIRS+=usr/share/mdocml
 # 20151225: new clang import which bumps version from 3.7.0 to 3.7.1.
 OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/allocator_interface.h
 OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/asan_interface.h
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r294168 - head/sys/cddl/contrib/opensolaris

2016-01-16 Thread Dimitry Andric
Author: dim
Date: Sat Jan 16 17:28:37 2016
New Revision: 294168
URL: https://svnweb.freebsd.org/changeset/base/294168

Log:
  Fix up mergeinfo after r294102.

Modified:
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r294102 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2016-01-15 Thread Dimitry Andric
Author: dim
Date: Fri Jan 15 21:45:53 2016
New Revision: 294102
URL: https://svnweb.freebsd.org/changeset/base/294102

Log:
  MFV r294101: 6527 Possible access beyond end of string in zpool comment
  
  Reviewed by: George Wilson 
  Reviewed by: Matthew Ahrens 
  Reviewed by: Dan McDonald 
  Approved by: Gordon Ross 
  
  illumos/illumos-gate@2bd7a8d078223b122d65fea49bb8641f858b1409
  
  This fixes erroneous double increments of the 'check' variable in a loop
  in spa_prop_validate().  I ran into this in the clang380-import branch,
  where clang 3.8.0 warns about it.  (It is already fixed there.)
  
  MFC after:3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Fri Jan 15 
21:41:45 2016(r294101)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Fri Jan 15 
21:45:53 2016(r294102)
@@ -610,7 +610,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *
error = SET_ERROR(EINVAL);
break;
}
-   check++;
}
if (strlen(strval) > ZPROP_MAX_COMMENT)
error = E2BIG;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r293015 - head/contrib/pf/pflogd

2015-12-31 Thread Dimitry Andric
Author: dim
Date: Thu Dec 31 22:52:11 2015
New Revision: 293015
URL: https://svnweb.freebsd.org/changeset/base/293015

Log:
  Merge r293013 from clang380-import branch:
  
  Fix a clang 3.8.0 warning in pflogd.c:
  
  contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the 
left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
if (!if_exists(interface) == -1) {
^ ~~
  
  The if_exists() function does not return -1, and even if it did, it
  would not be the correct way to check.  Just ditch the == -1 instead.
  
  Obtained from:OpenBSD's pflogd.c 1.49
  MFC after:3 days

Modified:
  head/contrib/pf/pflogd/pflogd.c
Directory Properties:
  head/   (props changed)
  head/contrib/pf/   (props changed)

Modified: head/contrib/pf/pflogd/pflogd.c
==
--- head/contrib/pf/pflogd/pflogd.c Thu Dec 31 22:48:46 2015
(r293014)
+++ head/contrib/pf/pflogd/pflogd.c Thu Dec 31 22:52:11 2015
(r293015)
@@ -766,7 +766,7 @@ main(int argc, char **argv)
np = pcap_dispatch(hpcap, PCAP_NUM_PKTS,
phandler, (u_char *)dpcap);
if (np < 0) {
-   if (!if_exists(interface) == -1) {
+   if (!if_exists(interface)) {
logmsg(LOG_NOTICE, "interface %s went away",
interface);
ret = -1;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r293014 - head/share/mk

2015-12-31 Thread Dimitry Andric
Author: dim
Date: Thu Dec 31 22:48:46 2015
New Revision: 293014
URL: https://svnweb.freebsd.org/changeset/base/293014

Log:
  Merge r293006 from clang380-import branch:
  
  For determining the compiler version, quote the string to be echo'd,
  otherwise the command might fail.  This is because clang -v now results
  in the following:
  
  FreeBSD clang version 3.8.0 (trunk 256633) (based on LLVM 3.8.0svn)
  
  The second "3.8.8svn)" string tripped up the shell command.
  
  MFC after:3 days

Modified:
  head/share/mk/bsd.compiler.mk
Directory Properties:
  head/   (props changed)
  head/share/   (props changed)

Modified: head/share/mk/bsd.compiler.mk
==
--- head/share/mk/bsd.compiler.mk   Thu Dec 31 22:45:00 2015
(r293013)
+++ head/share/mk/bsd.compiler.mk   Thu Dec 31 22:48:46 2015
(r293014)
@@ -138,7 +138,7 @@ COMPILER_TYPE:= clang
 . endif
 .endif
 .if !defined(COMPILER_VERSION)
-COMPILER_VERSION!=echo ${_v:M[1-9].[0-9]*} | awk -F. '{print $$1 * 1 + $$2 
* 100 + $$3;}'
+COMPILER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | awk -F. '{print $$1 * 1 + 
$$2 * 100 + $$3;}'
 .endif
 .undef _v
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292950 - in head: contrib/llvm/patches contrib/llvm/tools/clang/tools/driver usr.bin/clang/clang

2015-12-30 Thread Dimitry Andric
Author: dim
Date: Wed Dec 30 16:14:30 2015
New Revision: 292950
URL: https://svnweb.freebsd.org/changeset/base/292950

Log:
  Drop the clang patch which adds recognition of 'CC' suffixes as aliases
  for --driver-mode=g++, since this was never upstreamed.  For backwards
  compatibility, add a wrapper shell script.
  
  MFC after:1 week

Added:
  head/usr.bin/clang/clang/CC.sh   (contents, props changed)
Deleted:
  head/contrib/llvm/patches/patch-02-add-CC-aliases.diff
Modified:
  head/contrib/llvm/tools/clang/tools/driver/driver.cpp
  head/usr.bin/clang/clang/Makefile

Modified: head/contrib/llvm/tools/clang/tools/driver/driver.cpp
==
--- head/contrib/llvm/tools/clang/tools/driver/driver.cpp   Wed Dec 30 
15:01:47 2015(r292949)
+++ head/contrib/llvm/tools/clang/tools/driver/driver.cpp   Wed Dec 30 
16:14:30 2015(r292950)
@@ -214,13 +214,11 @@ static const DriverSuffix *FindDriverSuf
   {"clang", nullptr},
   {"clang++", "--driver-mode=g++"},
   {"clang-c++", "--driver-mode=g++"},
-  {"clang-CC", "--driver-mode=g++"},
   {"clang-cc", nullptr},
   {"clang-cpp", "--driver-mode=cpp"},
   {"clang-g++", "--driver-mode=g++"},
   {"clang-gcc", nullptr},
   {"clang-cl", "--driver-mode=cl"},
-  {"CC", "--driver-mode=g++"},
   {"cc", nullptr},
   {"cpp", "--driver-mode=cpp"},
   {"cl", "--driver-mode=cl"},

Added: head/usr.bin/clang/clang/CC.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/clang/clang/CC.sh  Wed Dec 30 16:14:30 2015
(r292950)
@@ -0,0 +1,4 @@
+#!/bin/sh
+# $FreeBSD$
+# This file is in the public domain.
+exec /usr/bin/c++ "$@"

Modified: head/usr.bin/clang/clang/Makefile
==
--- head/usr.bin/clang/clang/Makefile   Wed Dec 30 15:01:47 2015
(r292949)
+++ head/usr.bin/clang/clang/Makefile   Wed Dec 30 16:14:30 2015
(r292950)
@@ -18,9 +18,11 @@ LINKS=   ${BINDIR}/clang ${BINDIR}/clang++
 MLINKS=clang.1 clang++.1 \
clang.1 clang-cpp.1
 .if ${MK_CLANG_IS_CC} != "no"
+SCRIPTS=CC.sh
+SCRIPTSNAME=CC
+
 LINKS+=${BINDIR}/clang ${BINDIR}/cc \
${BINDIR}/clang ${BINDIR}/c++ \
-   ${BINDIR}/clang ${BINDIR}/CC \
${BINDIR}/clang ${BINDIR}/cpp
 MLINKS+= clang.1 cc.1 \
clang.1 c++.1 \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292911 - head

2015-12-30 Thread Dimitry Andric
Author: dim
Date: Wed Dec 30 09:15:02 2015
New Revision: 292911
URL: https://svnweb.freebsd.org/changeset/base/292911

Log:
  Add some more obsolete files, left over from the clang 3.7.0 -> 3.7.1
  upgrade.
  
  Noticed by:   Nikolai Lifanov , jtl

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Wed Dec 30 09:02:03 2015(r292910)
+++ head/ObsoleteFiles.inc  Wed Dec 30 09:15:02 2015(r292911)
@@ -105,6 +105,8 @@ OLD_FILES+=usr/lib/clang/3.7.0/include/x
 OLD_FILES+=usr/lib/clang/3.7.0/include/xtestintrin.h
 OLD_DIRS+=usr/lib/clang/3.7.0/include
 OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
 OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-x86_64.a
 OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
 OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r292735 - in head: . contrib/llvm/include/llvm-c contrib/llvm/include/llvm/CodeGen contrib/llvm/lib/CodeGen/AsmPrinter contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/IR contrib/...

2015-12-25 Thread Dimitry Andric
Author: dim
Date: Fri Dec 25 21:39:45 2015
New Revision: 292735
URL: https://svnweb.freebsd.org/changeset/base/292735

Log:
  Upgrade our copies of clang and llvm to 3.7.1 release.  This is a
  bugfix-only release, with no new features.
  
  Please note that from 3.5.0 onwards, clang and llvm require C++11
  support to build; see UPDATING for more information.

Added:
  head/contrib/llvm/patches/patch-08-clang-cc1as-dwarf2.diff
 - copied unchanged from r292734, 
head/contrib/llvm/patches/patch-10-clang-cc1as-dwarf2.diff
Deleted:
  head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff
  head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff
  head/contrib/llvm/patches/patch-10-clang-cc1as-dwarf2.diff
Modified:
  head/ObsoleteFiles.inc
  head/contrib/llvm/include/llvm-c/Core.h
  head/contrib/llvm/include/llvm/CodeGen/CommandFlags.h
  head/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp
  head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
  head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  head/contrib/llvm/lib/IR/AsmWriter.cpp
  head/contrib/llvm/lib/IR/Core.cpp
  head/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp
  head/contrib/llvm/lib/MC/MCContext.cpp
  head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  head/contrib/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.td
  head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
  head/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  head/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  head/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.h
  head/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td
  head/contrib/llvm/lib/Target/AMDGPU/SIPrepareScratchRegs.cpp
  head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
  head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.h
  head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  head/contrib/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp
  head/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp
  head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.td
  head/contrib/llvm/lib/Target/BPF/BPFRegisterInfo.cpp
  head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h
  head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td
  head/contrib/llvm/lib/Target/PowerPC/PPCInstrQPX.td
  head/contrib/llvm/lib/Target/PowerPC/PPCInstrVSX.td
  head/contrib/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp
  head/contrib/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
  head/contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp   (contents, 
props changed)
  head/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp
  head/contrib/llvm/lib/Transforms/Utils/Local.cpp
  head/contrib/llvm/patches/README.TXT
  head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
  head/contrib/llvm/tools/clang/lib/Basic/Version.cpp
  head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp
  head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp
  head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp
  head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp
  head/contrib/llvm/tools/llvm-lto/llvm-lto.cpp
  head/etc/mtree/BSD.debug.dist
  head/etc/mtree/BSD.usr.dist
  head/lib/clang/include/Makefile
  head/lib/clang/include/clang/Basic/Version.inc
  head/lib/clang/include/clang/Config/config.h
  head/lib/clang/include/llvm/Config/config.h
  head/lib/clang/include/llvm/Config/llvm-config.h
  head/lib/libclang_rt/Makefile.inc
  head/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  head/contrib/llvm/   (props changed)
  head/contrib/llvm/tools/clang/   (props changed)
  head/contrib/llvm/tools/llvm-dwarfdump/   (props changed)
  head/contrib/llvm/tools/llvm-lto/   (props changed)

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Fri Dec 25 18:11:40 2015(r292734)
+++ head/ObsoleteFiles.inc  Fri Dec 25 21:39:45 2015(r292735)
@@ -38,6 +38,88 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20151225: new clang import which bumps version from 3.7.0 to 3.7.1.
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/allocator_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/asan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/coverage_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h

Re: svn commit: r292120 - in head/contrib/elftoolchain: addr2line common elfcopy libelf readelf

2015-12-13 Thread Dimitry Andric
On 13 Dec 2015, at 09:43, Kai Wang  wrote:
> 
> 2015-12-13 7:04 GMT+01:00 Adrian Chadd :
> cc1: warnings being treated as errors
> /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:
> In function 'dump_dwarf':
> /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:7479:
> warning: 'b' may be used uninitialized in this function
> /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:7479:
> note: 'b' was declared here
> /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:4758:
> warning: 'pe' may be used uninitialized in this function
> /usr/home/adrian/work/freebsd/head-embedded/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:4758:
> note: 'pe' was declared here
> 
> .. these both seem like legit.
> 
> 
> Hi,
> 
> Sorry about the breakage. Should be fixed by r292158.
> Somehow clang didn't catch this. Had to use gcc to see this warning.

Indeed, this is interesting.  For clang to warn similarly, the
-Wconditional-uninitialized option has to be enabled explicitly, and
then you get a lot of them (this is from just before your commit):

/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:4861:33: 
error: variable 'pe' may be uninitialized when used here 
[-Werror,-Wconditional-uninitialized]
dirndx = _decode_uleb128(, pe);
 ^~
/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:4758:17: 
note: initialize the variable 'pe' to silence this warning
uint8_t *p, *pe;
   ^
= NULL
/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:6167:8: 
error: variable 'cie_ra' may be uninitialized when used here 
[-Werror,-Wconditional-uninitialized]
cie_ra);
^~
/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:6060:19: 
note: initialize the variable 'cie_ra' to silence this warning
Dwarf_Half cie_ra;
 ^
  = 0
/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:6164:8: 
error: variable 'cie_caf' may be uninitialized when used here 
[-Werror,-Wconditional-uninitialized]
cie_caf, cie_daf, low_pc, re->dbg);
^~~
/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:6057:24: 
note: initialize the variable 'cie_caf' to silence this warning
Dwarf_Unsigned cie_caf, cie_daf, cie_instlen, func_len, fde_length;
  ^
   = 0
/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:6164:17: 
error: variable 'cie_daf' may be uninitialized when used here 
[-Werror,-Wconditional-uninitialized]
cie_caf, cie_daf, low_pc, re->dbg);
 ^~~
/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:6057:33: 
note: initialize the variable 'cie_daf' to silence this warning
Dwarf_Unsigned cie_caf, cie_daf, cie_instlen, func_len, fde_length;
   ^
= 0
/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:7492:21: 
error: variable 'b' may be uninitialized when used here 
[-Werror,-Wconditional-uninitialized]
if (shift < 32 && (b & 0x40) != 0)
   ^
/usr/src/usr.bin/readelf/../../contrib/elftoolchain/readelf/readelf.c:7479:11: 
note: initialize the variable 'b' to silence this warning
uint8_t b;
 ^
  = '\0'
5 errors generated.

I'll check if there is a specific reason upstream does not enable this
warning by default for -Wall.  Maybe there is a risk of false positives.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r292120 - in head/contrib/elftoolchain: addr2line common elfcopy libelf readelf

2015-12-13 Thread Dimitry Andric
On 13 Dec 2015, at 18:04, Ruslan Makhmatkhanov  wrote:
> 
> Sorry for break in, but I tried to update to r292130 and have this messages 
> on `make kernel`. Does it by chance has something to do with toolchain update 
> and was it fixed in subsequent commits? Thanks.
> 
> ===> zlib (install)
> install -o root -g wheel -m 555   zlib.ko /boot/kernel/
> kldxref /boot/kernel
> kldxref: unknown metadata record 4 in file atacard.ko
> kldxref: unknown metadata record 4 in file atp.ko
> kldxref: unknown metadata record 4 in file atp.ko
> kldxref: unknown metadata record 4 in file cmx.ko
> kldxref: unknown metadata record 4 in file fdc.ko
> kldxref: unknown metadata record 4 in file if_an.ko
> kldxref: unknown metadata record 4 in file if_aue.ko
> 
> [...]
> 
> It printed one this message for every kernel module.

I think this is fixed by Warner's r292078:

https://svnweb.freebsd.org/base?view=revision=292078

  Augment kldxref to find the new MODULE_PNP_INFO records now in
  modules, simplify them into a more normal form and write them to
  linker.hints.

  Differential Review:
  https://reviews.freebsd.org/D3461

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r291771 - head/contrib/llvm/patches

2015-12-04 Thread Dimitry Andric
Author: dim
Date: Fri Dec  4 17:23:19 2015
New Revision: 291771
URL: https://svnweb.freebsd.org/changeset/base/291771

Log:
  Add clang patch corresponding to r291701.

Added:
  head/contrib/llvm/patches/patch-10-clang-cc1as-dwarf2.diff

Added: head/contrib/llvm/patches/patch-10-clang-cc1as-dwarf2.diff
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/llvm/patches/patch-10-clang-cc1as-dwarf2.diff  Fri Dec  4 
17:23:19 2015(r291771)
@@ -0,0 +1,21 @@
+In assembler mode, clang defaulted to DWARF3, if only -g was specified.
+Change this to DWARF2, in the simplest way possible.  (Upstream, this
+was fixed in clang trunk r250173, but this was done along with a lot of
+shuffling around of debug option handling, so it cannot be applied
+as-is.)
+
+Introduced here: https://svnweb.freebsd.org/changeset/base/291701
+
+Index: tools/clang/tools/driver/cc1as_main.cpp
+===
+--- tools/clang/tools/driver/cc1as_main.cpp
 tools/clang/tools/driver/cc1as_main.cpp
+@@ -141,7 +141,7 @@ struct AssemblerInvocation {
+ RelaxAll = 0;
+ NoExecStack = 0;
+ FatalWarnings = 0;
+-DwarfVersion = 3;
++DwarfVersion = 2;
+   }
+ 
+   static bool CreateFromArgs(AssemblerInvocation ,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r291701 - head/contrib/llvm/tools/clang/tools/driver

2015-12-03 Thread Dimitry Andric
Author: dim
Date: Thu Dec  3 15:41:10 2015
New Revision: 291701
URL: https://svnweb.freebsd.org/changeset/base/291701

Log:
  In assembler mode, clang defaulted to DWARF3, if only -g was specified.
  Change this to DWARF2, in the simplest way possible.  (Upstream, this
  was fixed in clang trunk r250173, but this was done along with a lot of
  shuffling around of debug option handling, so it cannot be applied
  as-is.)
  
  Noticed by:   des
  MFC after:3 days

Modified:
  head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp

Modified: head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp
==
--- head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp   Thu Dec  3 
15:19:29 2015(r291700)
+++ head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp   Thu Dec  3 
15:41:10 2015(r291701)
@@ -141,7 +141,7 @@ public:
 RelaxAll = 0;
 NoExecStack = 0;
 FatalWarnings = 0;
-DwarfVersion = 3;
+DwarfVersion = 2;
   }
 
   static bool CreateFromArgs(AssemblerInvocation ,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r291701 - head/contrib/llvm/tools/clang/tools/driver

2015-12-03 Thread Dimitry Andric
On 03 Dec 2015, at 16:41, Dimitry Andric <d...@freebsd.org> wrote:
> 
> Author: dim
> Date: Thu Dec  3 15:41:10 2015
> New Revision: 291701
> URL: https://svnweb.freebsd.org/changeset/base/291701
> 
> Log:
>  In assembler mode, clang defaulted to DWARF3, if only -g was specified.
>  Change this to DWARF2, in the simplest way possible.

Note that this problem caused some object files, such as /usr/lib/crt*.o
to contain debug information with DWARF3 version markings.  Since these
are linked into almost all executables, gdb from base would therefore
complain that it could not debug such executables.

E.g, if you were building world with DEBUG_FLAGS=-g, you should rebuild
and reinstall it, to make it debuggable with gdb from base.

Also note that lldb and gdb from ports do support DWARF3 and higher, and
are highly recommended above gdb from base.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r291461 - head/lib/libfetch

2015-11-29 Thread Dimitry Andric
Author: dim
Date: Sun Nov 29 22:37:48 2015
New Revision: 291461
URL: https://svnweb.freebsd.org/changeset/base/291461

Log:
  Fix buildworld after r291453, similar to r284346: url->user and url->pwd
  are arrays, so they can never be NULL.
  
  Reported by:  many
  Pointy hat to:des

Modified:
  head/lib/libfetch/http.c

Modified: head/lib/libfetch/http.c
==
--- head/lib/libfetch/http.cSun Nov 29 21:42:26 2015(r291460)
+++ head/lib/libfetch/http.cSun Nov 29 22:37:48 2015(r291461)
@@ -1689,10 +1689,8 @@ http_request_body(struct url *URL, const
goto ouch;
}
} else if (fetch_netrc_auth(url) == 0) {
-   aparams.user = url->user ?
-   strdup(url->user) : strdup("");
-   aparams.password = url->pwd ?
-   strdup(url->pwd) : strdup("");
+   aparams.user = strdup(url->user);
+   aparams.password = strdup(url->pwd);
} else if (fetchAuthMethod &&
   fetchAuthMethod(url) == 0) {
aparams.user = strdup(url->user);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r291453 - head/lib/libfetch

2015-11-29 Thread Dimitry Andric
On 29 Nov 2015, at 18:35, Jason Unovitch  wrote:
> 
> On Sun, Nov 29, 2015 at 9:27 AM, Dag-Erling Smørgrav  wrote:
>> Author: des
>> Date: Sun Nov 29 14:26:59 2015
>> New Revision: 291453
>> URL: https://svnweb.freebsd.org/changeset/base/291453
...
> `make buildworld` fails after this commit:
> 
> /usr/src/head/lib/libfetch/http.c:1692:25: error: address of array
> 'url->user' will always evaluate to 'true' [-Werro
> r,-Wpointer-bool-conversion]
>aparams.user = url->user ?
>   ~^~~~ ~
> /usr/src/head/lib/libfetch/http.c:1694:29: error: address of array
> 'url->pwd' will always evaluate to 'true' [-Werror
> ,-Wpointer-bool-conversion]
>aparams.password = url->pwd ?

This should now be fixed by r291461.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r291455 - in head: etc/mtree lib/libclang_rt lib/libclang_rt/include tools/build/mk

2015-11-29 Thread Dimitry Andric
Author: dim
Date: Sun Nov 29 16:28:40 2015
New Revision: 291455
URL: https://svnweb.freebsd.org/changeset/base/291455

Log:
  Install the public sanitizer headers.  These are useful for programs
  that want to directly interface with sanitizer internals.

Added:
  head/lib/libclang_rt/include/
  head/lib/libclang_rt/include/Makefile   (contents, props changed)
Modified:
  head/etc/mtree/BSD.usr.dist
  head/lib/libclang_rt/Makefile
  head/lib/libclang_rt/Makefile.inc
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/etc/mtree/BSD.usr.dist
==
--- head/etc/mtree/BSD.usr.dist Sun Nov 29 14:44:40 2015(r291454)
+++ head/etc/mtree/BSD.usr.dist Sun Nov 29 16:28:40 2015(r291455)
@@ -21,6 +21,8 @@
 clang
 3.7.0
 include
+   sanitizer
+   ..
 ..
 lib
 freebsd

Modified: head/lib/libclang_rt/Makefile
==
--- head/lib/libclang_rt/Makefile   Sun Nov 29 14:44:40 2015
(r291454)
+++ head/lib/libclang_rt/Makefile   Sun Nov 29 16:28:40 2015
(r291455)
@@ -3,7 +3,8 @@
 .include 
 
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-SUBDIR+= asan\
+SUBDIR+= include\
+asan\
 asan-preinit\
 asan_cxx\
 safestack\

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Sun Nov 29 14:44:40 2015
(r291454)
+++ head/lib/libclang_rt/Makefile.inc   Sun Nov 29 16:28:40 2015
(r291455)
@@ -5,7 +5,8 @@
 CRTARCH=${MACHINE_CPUARCH:C/amd64/x86_64/}
 CRTSRC=${.CURDIR}/../../../contrib/compiler-rt
 
-LIBDIR=/usr/lib/clang/3.7.0/lib/freebsd
+CLANGDIR=/usr/lib/clang/3.7.0
+LIBDIR=${CLANGDIR}/lib/freebsd
 
 NO_PIC=
 MK_PROFILE=no

Added: head/lib/libclang_rt/include/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libclang_rt/include/Makefile   Sun Nov 29 16:28:40 2015
(r291455)
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+.include 
+
+.PATH: ${CRTSRC}/include/sanitizer
+
+INCSDIR=${CLANGDIR}/include/sanitizer
+
+INCS=  allocator_interface.h\
+   asan_interface.h\
+   common_interface_defs.h\
+   coverage_interface.h\
+   dfsan_interface.h\
+   linux_syscall_hooks.h\
+   lsan_interface.h\
+   msan_interface.h\
+   tsan_interface_atomic.h
+
+.include 

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sun Nov 29 14:44:40 
2015(r291454)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sun Nov 29 16:28:40 
2015(r291455)
@@ -1048,6 +1048,16 @@ OLD_FILES+=usr/bin/clang++
 OLD_FILES+=usr/bin/clang-cpp
 OLD_FILES+=usr/bin/clang-tblgen
 OLD_FILES+=usr/bin/tblgen
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/allocator_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/asan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/coverage_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/lsan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/msan_interface.h
+OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/tsan_interface_atomic.h
+OLD_DIRS+=usr/lib/clang/3.7.0/include/sanitizer
 OLD_FILES+=usr/lib/clang/3.7.0/include/__stddef_max_align_t.h
 OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_aes.h
 OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_pclmul.h
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290470 - head

2015-11-06 Thread Dimitry Andric
Author: dim
Date: Fri Nov  6 22:24:41 2015
New Revision: 290470
URL: https://svnweb.freebsd.org/changeset/base/290470

Log:
  Add maintainer entries for llvm, lldb, compiler-rt, libc++ and libcxxrt.

Modified:
  head/MAINTAINERS

Modified: head/MAINTAINERS
==
--- head/MAINTAINERSFri Nov  6 22:22:37 2015(r290469)
+++ head/MAINTAINERSFri Nov  6 22:24:41 2015(r290470)
@@ -52,6 +52,11 @@ openssh  des Pre-commit review requested
 pseudofs   des Pre-commit review requested.
 procfs des Pre-commit review requested.
 linprocfs  des Pre-commit review requested.
+contrib/compiler-rtdim Pre-commit review preferred.
+contrib/libc++ dim Pre-commit review preferred.
+contrib/libcxxrt   dim Pre-commit review preferred.
+contrib/llvm   dim Pre-commit review preferred.
+contrib/llvm/tools/lldbemaste  Pre-commit review preferred.
  OLD 
 libc/posix1e   rwatson Pre-commit review requested.
 POSIX.1e ACLs  rwatson Pre-commit review requested.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r289523 - head/contrib/llvm/tools/clang/lib/Driver

2015-10-18 Thread Dimitry Andric
Author: dim
Date: Sun Oct 18 17:13:41 2015
New Revision: 289523
URL: https://svnweb.freebsd.org/changeset/base/289523

Log:
  Pull in r248379 from upstream clang trunk (by Jörg Sonnenberger):
  
Refactor library decision for -fopenmp support from Darwin into a
function for sharing with other platforms.
  
  Pull in r248424 from upstream clang trunk (by Jörg Sonnenberger):
  
Push OpenMP linker flags after linker input on Darwin. Don't add any
libraries if -nostdlib is specified. Test.
  
  Pull in r248426 from upstream clang trunk (by Jörg Sonnenberger):
  
Support linking against OpenMP runtime on NetBSD.
  
  Pull in r250657 from upstream clang trunk (by Dimitry Andric):
  
Support linking against OpenMP runtime on FreeBSD.

Modified:
  head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp

Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==
--- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp  Sun Oct 18 16:54:34 
2015(r289522)
+++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp  Sun Oct 18 17:13:41 
2015(r289523)
@@ -2460,6 +2460,28 @@ static OpenMPRuntimeKind getOpenMPRuntim
   return RT;
 }
 
+static void addOpenMPRuntime(ArgStringList , const ToolChain ,
+  const ArgList ) {
+  if (!Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ,
+options::OPT_fno_openmp, false))
+return;
+
+  switch (getOpenMPRuntime(TC, Args)) {
+  case OMPRT_OMP:
+CmdArgs.push_back("-lomp");
+break;
+  case OMPRT_GOMP:
+CmdArgs.push_back("-lgomp");
+break;
+  case OMPRT_IOMP5:
+CmdArgs.push_back("-liomp5");
+break;
+  case OMPRT_Unknown:
+// Already diagnosed.
+break;
+  }
+}
+
 static void addSanitizerRuntime(const ToolChain , const ArgList ,
 ArgStringList , StringRef Sanitizer,
 bool IsShared) {
@@ -6527,24 +6549,6 @@ void darwin::Linker::ConstructJob(Compil
 
   Args.AddAllArgs(CmdArgs, options::OPT_L);
 
-  if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ,
-   options::OPT_fno_openmp, false)) {
-switch (getOpenMPRuntime(getToolChain(), Args)) {
-case OMPRT_OMP:
-  CmdArgs.push_back("-lomp");
-  break;
-case OMPRT_GOMP:
-  CmdArgs.push_back("-lgomp");
-  break;
-case OMPRT_IOMP5:
-  CmdArgs.push_back("-liomp5");
-  break;
-case OMPRT_Unknown:
-  // Already diagnosed.
-  break;
-}
-  }
-
   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
   // Build the input file for -filelist (list of linker input files) in case we
   // need it later
@@ -6563,6 +6567,10 @@ void darwin::Linker::ConstructJob(Compil
 InputFileList.push_back(II.getFilename());
   }
 
+  if (!Args.hasArg(options::OPT_nostdlib) &&
+  !Args.hasArg(options::OPT_nodefaultlibs))
+addOpenMPRuntime(CmdArgs, getToolChain(), Args);
+
   if (isObjCRuntimeLinked(Args) && !Args.hasArg(options::OPT_nostdlib) &&
   !Args.hasArg(options::OPT_nodefaultlibs)) {
 // We use arclite library for both ARC and subscripting support.
@@ -7358,6 +7366,7 @@ void freebsd::Linker::ConstructJob(Compi
 
   if (!Args.hasArg(options::OPT_nostdlib) &&
   !Args.hasArg(options::OPT_nodefaultlibs)) {
+addOpenMPRuntime(CmdArgs, ToolChain, Args);
 if (D.CCCIsCXX()) {
   ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
   if (Args.hasArg(options::OPT_pg))
@@ -7673,6 +7682,7 @@ void netbsd::Linker::ConstructJob(Compil
 
   if (!Args.hasArg(options::OPT_nostdlib) &&
   !Args.hasArg(options::OPT_nodefaultlibs)) {
+addOpenMPRuntime(CmdArgs, getToolChain(), Args);
 if (D.CCCIsCXX()) {
   getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
   CmdArgs.push_back("-lm");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r289525 - in head/lib/clang/include: clang/Config llvm/Config

2015-10-18 Thread Dimitry Andric
Author: dim
Date: Sun Oct 18 17:18:19 2015
New Revision: 289525
URL: https://svnweb.freebsd.org/changeset/base/289525

Log:
  Switch the default OpenMP runtime for clang to libomp (from the LLVM
  project), as libgomp is not supported anyway.  You can use the
  devel/llvm-devel port to install a recent copy of the OpenMP runtime.

Modified:
  head/lib/clang/include/clang/Config/config.h
  head/lib/clang/include/llvm/Config/config.h

Modified: head/lib/clang/include/clang/Config/config.h
==
--- head/lib/clang/include/clang/Config/config.hSun Oct 18 17:14:45 
2015(r289524)
+++ head/lib/clang/include/clang/Config/config.hSun Oct 18 17:18:19 
2015(r289525)
@@ -11,7 +11,7 @@
 #define BUG_REPORT_URL "https://bugs.freebsd.org/submit/;
 
 /* Default OpenMP runtime used by -fopenmp. */
-#define CLANG_DEFAULT_OPENMP_RUNTIME "libgomp"
+#define CLANG_DEFAULT_OPENMP_RUNTIME "libomp"
 
 /* Multilib suffix for libdir. */
 #define CLANG_LIBDIR_SUFFIX ""

Modified: head/lib/clang/include/llvm/Config/config.h
==
--- head/lib/clang/include/llvm/Config/config.h Sun Oct 18 17:14:45 2015
(r289524)
+++ head/lib/clang/include/llvm/Config/config.h Sun Oct 18 17:18:19 2015
(r289525)
@@ -15,7 +15,7 @@
 #define BUG_REPORT_URL "https://bugs.freebsd.org/submit/;
 
 /* Default OpenMP runtime used by -fopenmp. */
-#define CLANG_DEFAULT_OPENMP_RUNTIME "libgomp"
+#define CLANG_DEFAULT_OPENMP_RUNTIME "libomp"
 
 /* Define if we have libxml2 */
 /* #undef CLANG_HAVE_LIBXML */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r289524 - head/contrib/llvm/patches

2015-10-18 Thread Dimitry Andric
Author: dim
Date: Sun Oct 18 17:14:45 2015
New Revision: 289524
URL: https://svnweb.freebsd.org/changeset/base/289524

Log:
  Add clang patch corresponding to r289523.

Added:
  head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff

Added: head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diff
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/llvm/patches/patch-09-clang-r250657-openmp.diffSun Oct 
18 17:14:45 2015(r289524)
@@ -0,0 +1,182 @@
+Pull in r248379 from upstream clang trunk (by Jörg Sonnenberger):
+
+  Refactor library decision for -fopenmp support from Darwin into a
+  function for sharing with other platforms.
+
+Pull in r248424 from upstream clang trunk (by Jörg Sonnenberger):
+
+  Push OpenMP linker flags after linker input on Darwin. Don't add any
+  libraries if -nostdlib is specified. Test.
+
+Pull in r248426 from upstream clang trunk (by Jörg Sonnenberger):
+
+  Support linking against OpenMP runtime on NetBSD.
+
+Pull in r250657 from upstream clang trunk (by Dimitry Andric):
+
+  Support linking against OpenMP runtime on FreeBSD.
+
+Introduced here: http://svnweb.freebsd.org/changeset/base/289523
+
+Index: tools/clang/lib/Driver/Tools.cpp
+===
+--- tools/clang/lib/Driver/Tools.cpp
 tools/clang/lib/Driver/Tools.cpp
+@@ -2460,6 +2460,28 @@ static OpenMPRuntimeKind getOpenMPRuntime(const To
+   return RT;
+ }
+ 
++static void addOpenMPRuntime(ArgStringList , const ToolChain ,
++  const ArgList ) {
++  if (!Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ,
++options::OPT_fno_openmp, false))
++return;
++
++  switch (getOpenMPRuntime(TC, Args)) {
++  case OMPRT_OMP:
++CmdArgs.push_back("-lomp");
++break;
++  case OMPRT_GOMP:
++CmdArgs.push_back("-lgomp");
++break;
++  case OMPRT_IOMP5:
++CmdArgs.push_back("-liomp5");
++break;
++  case OMPRT_Unknown:
++// Already diagnosed.
++break;
++  }
++}
++
+ static void addSanitizerRuntime(const ToolChain , const ArgList ,
+ ArgStringList , StringRef Sanitizer,
+ bool IsShared) {
+@@ -6527,24 +6549,6 @@ void darwin::Linker::ConstructJob(Compilation ,
+ 
+   Args.AddAllArgs(CmdArgs, options::OPT_L);
+ 
+-  if (Args.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ,
+-   options::OPT_fno_openmp, false)) {
+-switch (getOpenMPRuntime(getToolChain(), Args)) {
+-case OMPRT_OMP:
+-  CmdArgs.push_back("-lomp");
+-  break;
+-case OMPRT_GOMP:
+-  CmdArgs.push_back("-lgomp");
+-  break;
+-case OMPRT_IOMP5:
+-  CmdArgs.push_back("-liomp5");
+-  break;
+-case OMPRT_Unknown:
+-  // Already diagnosed.
+-  break;
+-}
+-  }
+-
+   AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
+   // Build the input file for -filelist (list of linker input files) in case 
we
+   // need it later
+@@ -6563,6 +6567,10 @@ void darwin::Linker::ConstructJob(Compilation ,
+ InputFileList.push_back(II.getFilename());
+   }
+ 
++  if (!Args.hasArg(options::OPT_nostdlib) &&
++  !Args.hasArg(options::OPT_nodefaultlibs))
++addOpenMPRuntime(CmdArgs, getToolChain(), Args);
++
+   if (isObjCRuntimeLinked(Args) && !Args.hasArg(options::OPT_nostdlib) &&
+   !Args.hasArg(options::OPT_nodefaultlibs)) {
+ // We use arclite library for both ARC and subscripting support.
+@@ -7358,6 +7366,7 @@ void freebsd::Linker::ConstructJob(Compilation ,
+ 
+   if (!Args.hasArg(options::OPT_nostdlib) &&
+   !Args.hasArg(options::OPT_nodefaultlibs)) {
++addOpenMPRuntime(CmdArgs, ToolChain, Args);
+ if (D.CCCIsCXX()) {
+   ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
+   if (Args.hasArg(options::OPT_pg))
+@@ -7673,6 +7682,7 @@ void netbsd::Linker::ConstructJob(Compilation ,
+ 
+   if (!Args.hasArg(options::OPT_nostdlib) &&
+   !Args.hasArg(options::OPT_nodefaultlibs)) {
++addOpenMPRuntime(CmdArgs, getToolChain(), Args);
+ if (D.CCCIsCXX()) {
+   getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
+   CmdArgs.push_back("-lm");
+Index: tools/clang/test/Driver/fopenmp.c
+===
+--- tools/clang/test/Driver/fopenmp.c
 tools/clang/test/Driver/fopenmp.c
+@@ -1,6 +1,15 @@
+ // RUN: %clang -target x86_64-linux-gnu -fopenmp=libomp -c %s -### 2>&1 | 
FileCheck %s --check-prefix=CHECK-CC1-OPENMP
+ // RUN: %clang -target x86_64-linux-gnu -fopenmp=libgomp -c %s -### 2>&1 | 
FileCheck %s --check-prefix=CHECK-CC1-NO-OPENMP
+ // RUN: %clang -target x86_64-linux-gnu -fopenmp=libiomp5 -c %s -### 2>&1 | 
FileCheck %s --check-prefix=CHECK-CC1-

svn commit: r289221 - head/contrib/llvm/lib/Target/X86

2015-10-13 Thread Dimitry Andric
Author: dim
Date: Tue Oct 13 16:24:22 2015
New Revision: 289221
URL: https://svnweb.freebsd.org/changeset/base/289221

Log:
  Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio):
  
[x86] Fix wrong lowering of vsetcc nodes (PR25080).
  
Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong
assumption that for non-AVX512 targets, the source type and destination type
of a type-legalized setcc node were always the same type.
  
This assumption was unfortunately incorrect; the type legalizer is not 
always
able to promote the return type of a setcc to the same type as the first
operand of a setcc.
  
In the case of a vsetcc node, the legalizer firstly checks if the first 
input
operand has a legal type. If so, then it promotes the return type of the 
vsetcc
to that same type. Otherwise, the return type is promoted to the 'next legal
type', which, for vectors of MVT::i1 is always a 128-bit integer vector 
type.
  
Example (-mattr=+avx):
  
  %0 = trunc <8 x i32> %a to <8 x i23>
  %1 = icmp eq <8 x i23> %0, zeroinitializer
  
The initial selection dag for the code above is:
  
v8i1 = setcc t5, t7, seteq:ch
  t5: v8i23 = truncate t2
t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1
t7: v8i32 = build_vector of all zeroes.
  
The type legalizer would firstly check if 't5' has a legal type. If so, 
then it
would reuse that same type to promote the return type of the setcc node.
Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be 
used to
promote the return type of the setcc node. Consequently, the setcc return 
type
is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to 
the
following dag node:
  v8i16 = setcc t32, t25, seteq:ch
  
  where t32 and t25 are now values of type v8i32.
  
Before this patch, function LowerVSETCC would have wrongly expanded the 
setcc
to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an
instruction. In our case, ISel would have matched a VPCMPEQWrr:
  t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25
  
However, t36 and t25 are both VR256, while the result type is instead of 
class
VR128. This inconsistency ended up causing the insertion of COPY 
instructions
like this:
  %vreg7 = COPY %vreg3; VR128:%vreg7 VR256:%vreg3
  
Which is an invalid full copy (not a sub register copy).
Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg 
copy
instruction" in the attempt to expand the malformed pseudo COPY 
instructions.
  
This patch fixes the problem adding the missing logic in LowerVSETCC to 
handle
the corner case of a setcc with 128-bit return type and 256-bit operand 
type.
  
This problem was originally reported by Dimitry as PR25080. It has been 
latent
for a very long time. I have added the minimal reproducible from that 
bugzilla
as test setcc-lowering.ll.
  
Differential Revision: http://reviews.llvm.org/D13660
  
  This should fix the "Cannot emit physreg copy instruction" errors when
  compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set
  to a CPU supporting AVX (e.g. sandybridge, ivybridge).

Modified:
  head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp

Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
==
--- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppTue Oct 13 
12:51:44 2015(r289220)
+++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppTue Oct 13 
16:24:22 2015(r289221)
@@ -13573,6 +13573,35 @@ static SDValue LowerVSETCC(SDValue Op, c
DAG.getConstant(SSECC, dl, MVT::i8));
   }
 
+  MVT VTOp0 = Op0.getSimpleValueType();
+  assert(VTOp0 == Op1.getSimpleValueType() &&
+ "Expected operands with same type!");
+  assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() &&
+ "Invalid number of packed elements for source and destination!");
+
+  if (VT.is128BitVector() && VTOp0.is256BitVector()) {
+// On non-AVX512 targets, a vector of MVT::i1 is promoted by the type
+// legalizer to a wider vector type.  In the case of 'vsetcc' nodes, the
+// legalizer firstly checks if the first operand in input to the setcc has
+// a legal type. If so, then it promotes the return type to that same type.
+// Otherwise, the return type is promoted to the 'next legal type' which,
+// for a vector of MVT::i1 is always a 128-bit integer vector type.
+//
+// We reach this code only if the following two conditions are met:
+// 1. Both return type and operand type have been promoted to wider types
+//by the type legalizer.
+// 2. The original operand type has been promoted to a 256-bit vector.
+//
+// Note that condition 2. only applies for AVX targets.
+SDValue NewOp 

<    1   2   3   4   5   6   7   8   9   10   >