svn commit: r358397 - in vendor/llvm-project/release-10.x: clang/include/clang/Basic clang/include/clang/Sema clang/lib/ASTMatchers clang/lib/CodeGen clang/lib/Driver/ToolChains clang/lib/Frontend ...

2020-02-27 Thread Dimitry Andric
Author: dim
Date: Thu Feb 27 18:58:42 2020
New Revision: 358397
URL: https://svnweb.freebsd.org/changeset/base/358397

Log:
  Vendor import of llvm-project branch release/10.x
  llvmorg-10.0.0-rc2-70-ge5cb70267e7.

Modified:
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticASTKinds.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticCommonKinds.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticFrontendKinds.td
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticLexKinds.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticParseKinds.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/LangStandards.def
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/StmtNodes.td
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/TemplateDeduction.h
  vendor/llvm-project/release-10.x/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
  vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenAction.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Darwin.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/FreeBSD.h
  vendor/llvm-project/release-10.x/clang/lib/Frontend/InitPreprocessor.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateDeduction.cpp
  vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReader.cpp
  vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReaderDecl.cpp
  vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriter.cpp
  vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTWriterDecl.cpp
  vendor/llvm-project/release-10.x/clang/lib/Tooling/ArgumentsAdjusters.cpp
  vendor/llvm-project/release-10.x/compiler-rt/lib/profile/GCDAProfiling.c
  vendor/llvm-project/release-10.x/libcxx/include/__bit_reference
  vendor/llvm-project/release-10.x/libunwind/src/UnwindCursor.hpp
  vendor/llvm-project/release-10.x/lld/docs/ReleaseNotes.rst
  vendor/llvm-project/release-10.x/lldb/source/Expression/DWARFExpression.cpp
  vendor/llvm-project/release-10.x/llvm/include/llvm/MC/MCFixupKindInfo.h
  vendor/llvm-project/release-10.x/llvm/lib/Analysis/MemorySSA.cpp
  vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  
vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  vendor/llvm-project/release-10.x/llvm/lib/MC/MCAssembler.cpp
  
vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64ISelLowering.h
  
vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64InstrFormats.td
  vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64InstrInfo.td
  vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
  vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMISelLowering.cpp
  vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMISelLowering.h
  vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/ARMInstrVFP.td
  
vendor/llvm-project/release-10.x/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
  vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
  vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86CmovConversion.cpp
  
vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  
vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
  vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/LICM.cpp
  vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/LoopRotation.cpp
  vendor/llvm-project/release-10.x/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
  
vendor/llvm-project/release-10.x/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  vendor/llvm-project/release-10.x/llvm/utils/TableGen/DFAEmitter.cpp
  vendor/llvm-project/release-10.x/llvm/utils/TableGen/DFAEmitter.h

Modified: 
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticASTKinds.td
==
--- 
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticASTKinds.td
Thu Feb 27 18:49:49 2020(r358396)
+++ 
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticASTKinds.td
Thu Feb 27 18:58:42 2020(r358397)
@@ -13,7 +13,7 @@ def note_expr_divide_by_zero : Note<"division by zero"
 def note_constexpr_invalid_cast : Note<
   "%select{reinterpret_cast|dynamic_cast|cast that performs the conversions of"
   " a reinterpret_cast|cast 

Re: svn commit: r358248 - head/sys/vm

2020-02-22 Thread Dimitry Andric
On 22 Feb 2020, at 20:13, Ian Lepore  wrote:
> 
> On Sat, 2020-02-22 at 20:01 +0100, Dimitry Andric wrote:
...
>> E.g. this is *not* meant as a way to enforce the program to abort at
>> runtime, if the supposedly unreachable part is actually reached.
>> 
>> For this purpose, one should use an abort() or panic() function call,
>> with such functions being annotated to never return.
>> 
>> -Dimitry
>> 
> 
> The problem is, people will see usages such as what Kyle did, where the
> code truly is unreachable (due to -Werror=switch), and not realizing
> that's why it's valid there, they'll assume it's a type of assert-
> unreachable and copy it/use it in other places as if that's what it was
> for.
> 
> So, IMO, using it should be exceedingly rare and there should be a
> comment nearby about why it's valid in that context, or our
> __unreachable cover for it should panic on INVARIANTS, as Kyle proposed
> in an earlier reply.

It might be better to define our own UNREACHABLE macro, similar to what
llvm itself does, roughly something like:

__noreturn void internal_unreachable(const char *, const char *, int);
#define UNREACHABLE(msg) internal_unreachable(msg, __FILE__, __LINE__)

And have the implementation of internal_unreachable() log the file,
line and message, then abort or panic in some appropriate way.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r358248 - head/sys/vm

2020-02-22 Thread Dimitry Andric
On 22 Feb 2020, at 17:44, Mateusz Guzik  wrote:
> 
> On 2/22/20, Kyle Evans  wrote:
>> On Sat, Feb 22, 2020 at 10:25 AM Ian Lepore  wrote:
>>> 
>>> On Sat, 2020-02-22 at 16:20 +, Kyle Evans wrote:
 Author: kevans
 Date: Sat Feb 22 16:20:04 2020
 New Revision: 358248
 URL: https://svnweb.freebsd.org/changeset/base/358248
 
 Log:
  vm_radix: prefer __builtin_unreachable() to an unreachable panic()
 
  This provides the needed hint to GCC and offers an annotation for
 readers to
  observe that it's in-fact impossible to hit this point. We'll get hit
 with a
  a -Wswitch error if the enum applicable to the switch above were to
 get
  expanded without the new value(s) being handled.
 
 Modified:
  head/sys/vm/vm_radix.c
 
 Modified: head/sys/vm/vm_radix.c
 ==
 --- head/sys/vm/vm_radix.cSat Feb 22 13:23:27 2020(r358247)
 +++ head/sys/vm/vm_radix.cSat Feb 22 16:20:04 2020(r358248)
 @@ -208,8 +208,7 @@ vm_radix_node_load(smrnode_t *p, enum
 vm_radix_access
  case SMR:
  return (smr_entered_load(p, vm_radix_smr));
  }
 - /* This is unreachable, silence gcc. */
 - panic("vm_radix_node_get: Unknown access type");
 + __unreachable();
 }
 
 static __inline void
>>> 
>>> What does __unreachable() do if the code ever becomes reachable?  Like
>>> if a new enum value is added and this switch doesn't get updated?
>>> 
>> 
>> __unreachable doesn't help here, but the compiler will error out on
>> the switch() if all enum values aren't addressed and there's no
>> default: case.
>> 
>> IMO, compilers could/should become smart enough to error if there's an
>> explicit __builtin_unreachable() and they can trivially determine that
>> all paths will terminate before this, independent of -Werror=switch*.
>> ___
> 
> I think this is way too iffy, check this program:
> 
> 
> #include 
> 
> int
> main(void)
> {
> 
>   __builtin_unreachable();
>   printf("test\n");
> }
> 
> Neither clang nor gcc warn about this and both stop code generation
> past the statement.

Indeed, that is exactly the intent.  See:

https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005funreachable

"If control flow reaches the point of the __builtin_unreachable, the
program is undefined. It is useful in situations where the compiler
cannot deduce the unreachability of the code."

E.g. this is *not* meant as a way to enforce the program to abort at
runtime, if the supposedly unreachable part is actually reached.

For this purpose, one should use an abort() or panic() function call,
with such functions being annotated to never return.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r358232 - stable/12/sys/arm/allwinner/clkng

2020-02-21 Thread Dimitry Andric
Author: dim
Date: Fri Feb 21 22:11:14 2020
New Revision: 358232
URL: https://svnweb.freebsd.org/changeset/base/358232

Log:
  MFC r358074:
  
  Fix the following -Werror warning from clang 10.0.0:
  
  sys/arm/allwinner/clkng/aw_clk_mipi.c:144:6: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  m++;
  ^
  sys/arm/allwinner/clkng/aw_clk_mipi.c:142:5: note: previous statement is here
  if (best == *fout)
  ^
  
  Move the increment operations into the for loop headers instead.
  
  Discussed with:   manu

Modified:
  stable/12/sys/arm/allwinner/clkng/aw_clk_mipi.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/arm/allwinner/clkng/aw_clk_mipi.c
==
--- stable/12/sys/arm/allwinner/clkng/aw_clk_mipi.c Fri Feb 21 22:08:45 
2020(r358231)
+++ stable/12/sys/arm/allwinner/clkng/aw_clk_mipi.c Fri Feb 21 22:11:14 
2020(r358232)
@@ -129,9 +129,9 @@ aw_clk_mipi_find_best(struct aw_clk_mipi_sc *sc, uint6
*factor_k = 0;
*factor_m = 0;
 
-   for (n = aw_clk_factor_get_min(>n); n <= 
aw_clk_factor_get_max(>n); ) {
-   for (k = aw_clk_factor_get_min(>k); k <= 
aw_clk_factor_get_max(>k); ) {
-   for (m = aw_clk_factor_get_min(>m); m <= 
aw_clk_factor_get_max(>m); ) {
+   for (n = aw_clk_factor_get_min(>n); n <= 
aw_clk_factor_get_max(>n); n++) {
+   for (k = aw_clk_factor_get_min(>k); k <= 
aw_clk_factor_get_max(>k); k++) {
+   for (m = aw_clk_factor_get_min(>m); m <= 
aw_clk_factor_get_max(>m); m++) {
cur = (fparent * n * k) / m;
if ((*fout - cur) < (*fout - best)) {
best = cur;
@@ -141,11 +141,8 @@ aw_clk_mipi_find_best(struct aw_clk_mipi_sc *sc, uint6
}
if (best == *fout)
return (best);
-   m++;
}
-   k++;
}
-   n++;
}
 
return best;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358231 - stable/12/sys/arm/allwinner

2020-02-21 Thread Dimitry Andric
Author: dim
Date: Fri Feb 21 22:08:45 2020
New Revision: 358231
URL: https://svnweb.freebsd.org/changeset/base/358231

Log:
  MFC r358044:
  
  Merge r358030 from the clang1000-import branch:
  
  Work around new clang 10.0.0 -Werror warning:
  
  sys/arm/allwinner/aw_cir.c:208:41: error: converting the result of '<<' to a 
boolean; did you mean '((1 & 255) << 23) != 0'? [-Werror,-Wint-in-bool-context]
  active_delay = (AW_IR_ACTIVE_T + 1) * (AW_IR_ACTIVE_T_C ? 128 : 1);
 ^
  sys/arm/allwinner/aw_cir.c:130:39: note: expanded from macro 
'AW_IR_ACTIVE_T_C'
  #define AW_IR_ACTIVE_T_C((1 & 0xff) << 23)
  ^
  
  Add the != 0 part to indicate that we indeed want to compare against
  zero.

Modified:
  stable/12/sys/arm/allwinner/aw_cir.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/arm/allwinner/aw_cir.c
==
--- stable/12/sys/arm/allwinner/aw_cir.cFri Feb 21 21:57:24 2020
(r358230)
+++ stable/12/sys/arm/allwinner/aw_cir.cFri Feb 21 22:08:45 2020
(r358231)
@@ -205,7 +205,7 @@ aw_ir_decode_packets(struct aw_ir_softc *sc)
device_printf(sc->dev, "sc->dcnt = %d\n", sc->dcnt);
 
/* Find Lead 1 (bit separator) */
-   active_delay = (AW_IR_ACTIVE_T + 1) * (AW_IR_ACTIVE_T_C ? 128 : 1);
+   active_delay = (AW_IR_ACTIVE_T + 1) * (AW_IR_ACTIVE_T_C != 0 ? 128 : 1);
len = 0;
len += (active_delay >> 1);
if (bootverbose)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358230 - in stable: 11/lib/libc/quad 12/lib/libc/quad

2020-02-21 Thread Dimitry Andric
Author: dim
Date: Fri Feb 21 21:57:24 2020
New Revision: 358230
URL: https://svnweb.freebsd.org/changeset/base/358230

Log:
  MFC r358046:
  
  Merge r358042 from the clang1000-import branch:
  
  Add casts and L suffixes to libc quad support, to work around various
  -Werror warnings from clang 10.0.0, such as:
  
  lib/libc/quad/fixdfdi.c:57:12: error: implicit conversion from 'long long' to 
'double' changes value from 9223372036854775807 to 9223372036854775808 
[-Werror,-Wimplicit-int-float-conversion]
  if (x >= QUAD_MAX)
~~ ^~~~
  /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/limits.h:89:19: note: 
expanded from macro 'QUAD_MAX'
  #define QUAD_MAX(__QUAD_MAX)/* max value for a quad_t */
   ^~
  /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:91:20: 
note: expanded from macro '__QUAD_MAX'
  #define __QUAD_MAX  __LLONG_MAX /* max value for a quad_t */
  ^~~
  /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:75:21: 
note: expanded from macro '__LLONG_MAX'
  #define __LLONG_MAX 0x7fffLL/* max value for a long long 
*/
  ^~~~
  
  and many instances of:
  
  lib/libc/quad/fixunsdfdi.c:73:17: error: shift count >= width of type 
[-Werror,-Wshift-count-overflow]
  toppart = (x - ONE_HALF) / ONE;
 ^~~~
  lib/libc/quad/fixunsdfdi.c:45:19: note: expanded from macro 'ONE_HALF'
  #define ONE_HALF(ONE_FOURTH * 2.0)
   ^~
  lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH'
  #define ONE_FOURTH  (1 << (LONG_BITS - 2))
 ^  ~~~
  lib/libc/quad/fixunsdfdi.c:73:29: error: shift count >= width of type 
[-Werror,-Wshift-count-overflow]
  toppart = (x - ONE_HALF) / ONE;
 ^~~
  lib/libc/quad/fixunsdfdi.c:46:15: note: expanded from macro 'ONE'
  #define ONE (ONE_FOURTH * 4.0)
   ^~
  lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH'
  #define ONE_FOURTH  (1 << (LONG_BITS - 2))
 ^  ~~~

Modified:
  stable/11/lib/libc/quad/fixdfdi.c
  stable/11/lib/libc/quad/fixsfdi.c
  stable/11/lib/libc/quad/fixunsdfdi.c
  stable/11/lib/libc/quad/fixunssfdi.c
  stable/11/lib/libc/quad/floatdidf.c
  stable/11/lib/libc/quad/floatdisf.c
  stable/11/lib/libc/quad/floatunsdidf.c
  stable/11/lib/libc/quad/qdivrem.c
  stable/11/lib/libc/quad/quad.h
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/lib/libc/quad/fixdfdi.c
  stable/12/lib/libc/quad/fixsfdi.c
  stable/12/lib/libc/quad/fixunsdfdi.c
  stable/12/lib/libc/quad/fixunssfdi.c
  stable/12/lib/libc/quad/floatdidf.c
  stable/12/lib/libc/quad/floatdisf.c
  stable/12/lib/libc/quad/floatunsdidf.c
  stable/12/lib/libc/quad/qdivrem.c
  stable/12/lib/libc/quad/quad.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/lib/libc/quad/fixdfdi.c
==
--- stable/11/lib/libc/quad/fixdfdi.c   Fri Feb 21 21:54:03 2020
(r358229)
+++ stable/11/lib/libc/quad/fixdfdi.c   Fri Feb 21 21:57:24 2020
(r358230)
@@ -48,12 +48,12 @@ __fixdfdi(x)
double x;
 {
if (x < 0)
-   if (x <= QUAD_MIN)
+   if (x <= (double)QUAD_MIN)
return (QUAD_MIN);
else
return ((quad_t)-(u_quad_t)-x);
else
-   if (x >= QUAD_MAX)
+   if (x >= (double)QUAD_MAX)
return (QUAD_MAX);
else
return ((quad_t)(u_quad_t)x);

Modified: stable/11/lib/libc/quad/fixsfdi.c
==
--- stable/11/lib/libc/quad/fixsfdi.c   Fri Feb 21 21:54:03 2020
(r358229)
+++ stable/11/lib/libc/quad/fixsfdi.c   Fri Feb 21 21:57:24 2020
(r358230)
@@ -49,12 +49,12 @@ long long
 __fixsfdi(float x)
 {
if (x < 0)
-   if (x <= QUAD_MIN)
+   if (x <= (float)QUAD_MIN)
return (QUAD_MIN);
else
return ((quad_t)-(u_quad_t)-x);
else
-   if (x >= QUAD_MAX)
+   if (x >= (float)QUAD_MAX)
return (QUAD_MAX);
else
return ((quad_t)(u_quad_t)x);

Modified: stable/11/lib/libc/quad/fixunsdfdi.c
==
--- stable/11/lib/libc/quad/fixunsdfdi.cFri Feb 21 21:54:03 2020
(r358229)
+++ stable/11/lib/libc/quad/fixunsdfdi.cFri Feb 21 21:57:24 

svn commit: r358230 - in stable: 11/lib/libc/quad 12/lib/libc/quad

2020-02-21 Thread Dimitry Andric
Author: dim
Date: Fri Feb 21 21:57:24 2020
New Revision: 358230
URL: https://svnweb.freebsd.org/changeset/base/358230

Log:
  MFC r358046:
  
  Merge r358042 from the clang1000-import branch:
  
  Add casts and L suffixes to libc quad support, to work around various
  -Werror warnings from clang 10.0.0, such as:
  
  lib/libc/quad/fixdfdi.c:57:12: error: implicit conversion from 'long long' to 
'double' changes value from 9223372036854775807 to 9223372036854775808 
[-Werror,-Wimplicit-int-float-conversion]
  if (x >= QUAD_MAX)
~~ ^~~~
  /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/limits.h:89:19: note: 
expanded from macro 'QUAD_MAX'
  #define QUAD_MAX(__QUAD_MAX)/* max value for a quad_t */
   ^~
  /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:91:20: 
note: expanded from macro '__QUAD_MAX'
  #define __QUAD_MAX  __LLONG_MAX /* max value for a quad_t */
  ^~~
  /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:75:21: 
note: expanded from macro '__LLONG_MAX'
  #define __LLONG_MAX 0x7fffLL/* max value for a long long 
*/
  ^~~~
  
  and many instances of:
  
  lib/libc/quad/fixunsdfdi.c:73:17: error: shift count >= width of type 
[-Werror,-Wshift-count-overflow]
  toppart = (x - ONE_HALF) / ONE;
 ^~~~
  lib/libc/quad/fixunsdfdi.c:45:19: note: expanded from macro 'ONE_HALF'
  #define ONE_HALF(ONE_FOURTH * 2.0)
   ^~
  lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH'
  #define ONE_FOURTH  (1 << (LONG_BITS - 2))
 ^  ~~~
  lib/libc/quad/fixunsdfdi.c:73:29: error: shift count >= width of type 
[-Werror,-Wshift-count-overflow]
  toppart = (x - ONE_HALF) / ONE;
 ^~~
  lib/libc/quad/fixunsdfdi.c:46:15: note: expanded from macro 'ONE'
  #define ONE (ONE_FOURTH * 4.0)
   ^~
  lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH'
  #define ONE_FOURTH  (1 << (LONG_BITS - 2))
 ^  ~~~

Modified:
  stable/12/lib/libc/quad/fixdfdi.c
  stable/12/lib/libc/quad/fixsfdi.c
  stable/12/lib/libc/quad/fixunsdfdi.c
  stable/12/lib/libc/quad/fixunssfdi.c
  stable/12/lib/libc/quad/floatdidf.c
  stable/12/lib/libc/quad/floatdisf.c
  stable/12/lib/libc/quad/floatunsdidf.c
  stable/12/lib/libc/quad/qdivrem.c
  stable/12/lib/libc/quad/quad.h
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/lib/libc/quad/fixdfdi.c
  stable/11/lib/libc/quad/fixsfdi.c
  stable/11/lib/libc/quad/fixunsdfdi.c
  stable/11/lib/libc/quad/fixunssfdi.c
  stable/11/lib/libc/quad/floatdidf.c
  stable/11/lib/libc/quad/floatdisf.c
  stable/11/lib/libc/quad/floatunsdidf.c
  stable/11/lib/libc/quad/qdivrem.c
  stable/11/lib/libc/quad/quad.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/lib/libc/quad/fixdfdi.c
==
--- stable/12/lib/libc/quad/fixdfdi.c   Fri Feb 21 21:54:03 2020
(r358229)
+++ stable/12/lib/libc/quad/fixdfdi.c   Fri Feb 21 21:57:24 2020
(r358230)
@@ -50,12 +50,12 @@ __fixdfdi(x)
double x;
 {
if (x < 0)
-   if (x <= QUAD_MIN)
+   if (x <= (double)QUAD_MIN)
return (QUAD_MIN);
else
return ((quad_t)-(u_quad_t)-x);
else
-   if (x >= QUAD_MAX)
+   if (x >= (double)QUAD_MAX)
return (QUAD_MAX);
else
return ((quad_t)(u_quad_t)x);

Modified: stable/12/lib/libc/quad/fixsfdi.c
==
--- stable/12/lib/libc/quad/fixsfdi.c   Fri Feb 21 21:54:03 2020
(r358229)
+++ stable/12/lib/libc/quad/fixsfdi.c   Fri Feb 21 21:57:24 2020
(r358230)
@@ -51,12 +51,12 @@ long long
 __fixsfdi(float x)
 {
if (x < 0)
-   if (x <= QUAD_MIN)
+   if (x <= (float)QUAD_MIN)
return (QUAD_MIN);
else
return ((quad_t)-(u_quad_t)-x);
else
-   if (x >= QUAD_MAX)
+   if (x >= (float)QUAD_MAX)
return (QUAD_MAX);
else
return ((quad_t)(u_quad_t)x);

Modified: stable/12/lib/libc/quad/fixunsdfdi.c
==
--- stable/12/lib/libc/quad/fixunsdfdi.cFri Feb 21 21:54:03 2020
(r358229)
+++ stable/12/lib/libc/quad/fixunsdfdi.cFri Feb 21 21:57:24 

svn commit: r358229 - in stable: 11/sys/powerpc/conf/dpaa 12/sys/powerpc/conf/dpaa

2020-02-21 Thread Dimitry Andric
Author: dim
Date: Fri Feb 21 21:54:03 2020
New Revision: 358229
URL: https://svnweb.freebsd.org/changeset/base/358229

Log:
  MFC r358045:
  
  Merge r358034 from the clang1000-import branch:
  
  Disable new clang 10.0.0 warnings about misleading indentation in
  sys/contrib/ncsw/Peripherals/FM/fman_ncsw.c.
  
  This is horribly formatted contributed code, and fixing it is not worth
  the effort.

Modified:
  stable/12/sys/powerpc/conf/dpaa/files.dpaa
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/powerpc/conf/dpaa/files.dpaa
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/powerpc/conf/dpaa/files.dpaa
==
--- stable/12/sys/powerpc/conf/dpaa/files.dpaa  Fri Feb 21 20:57:32 2020
(r358228)
+++ stable/12/sys/powerpc/conf/dpaa/files.dpaa  Fri Feb 21 21:54:03 2020
(r358229)
@@ -74,7 +74,7 @@ contrib/ncsw/Peripherals/FM/fm_muram.c
optional dpaa
 contrib/ncsw/Peripherals/FM/fm_ncsw.c  optional dpaa   \
no-depend compile-with "${DPAA_COMPILE_CMD}"
 contrib/ncsw/Peripherals/FM/fman_ncsw.coptional dpaa   
\
-   no-depend compile-with "${DPAA_COMPILE_CMD}"
+   no-depend compile-with "${DPAA_COMPILE_CMD} 
${NO_WMISLEADING_INDENTATION}"
 contrib/ncsw/Peripherals/QM/qm.c   optional dpaa   \
no-depend compile-with "${DPAA_COMPILE_CMD}"
 contrib/ncsw/Peripherals/QM/qm_portal_fqr.coptional dpaa   \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358229 - in stable: 11/sys/powerpc/conf/dpaa 12/sys/powerpc/conf/dpaa

2020-02-21 Thread Dimitry Andric
Author: dim
Date: Fri Feb 21 21:54:03 2020
New Revision: 358229
URL: https://svnweb.freebsd.org/changeset/base/358229

Log:
  MFC r358045:
  
  Merge r358034 from the clang1000-import branch:
  
  Disable new clang 10.0.0 warnings about misleading indentation in
  sys/contrib/ncsw/Peripherals/FM/fman_ncsw.c.
  
  This is horribly formatted contributed code, and fixing it is not worth
  the effort.

Modified:
  stable/11/sys/powerpc/conf/dpaa/files.dpaa
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/powerpc/conf/dpaa/files.dpaa
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/powerpc/conf/dpaa/files.dpaa
==
--- stable/11/sys/powerpc/conf/dpaa/files.dpaa  Fri Feb 21 20:57:32 2020
(r358228)
+++ stable/11/sys/powerpc/conf/dpaa/files.dpaa  Fri Feb 21 21:54:03 2020
(r358229)
@@ -56,7 +56,7 @@ contrib/ncsw/Peripherals/FM/fm_muram.c
optional dpaa
 contrib/ncsw/Peripherals/FM/fm_guest.c optional dpaa   \
no-depend compile-with "${DPAA_COMPILE_CMD}"
 contrib/ncsw/Peripherals/FM/fm.c   optional dpaa   \
-   no-depend compile-with "${DPAA_COMPILE_CMD}"
+   no-depend compile-with "${DPAA_COMPILE_CMD} 
${NO_WMISLEADING_INDENTATION}"
 contrib/ncsw/Peripherals/QM/qm.c   optional dpaa   \
no-depend compile-with "${DPAA_COMPILE_CMD}"
 contrib/ncsw/Peripherals/QM/qm_portal_fqr.coptional dpaa   \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358132 - in head: . share/mk

2020-02-19 Thread Dimitry Andric
Author: dim
Date: Wed Feb 19 21:12:59 2020
New Revision: 358132
URL: https://svnweb.freebsd.org/changeset/base/358132

Log:
  Take LINKER_FREEBSD_VERSION from numerical field after dash
  
  Summary:
  With COMPILER_FREEBSD_VERSION, we use a numeric value that we bump each
  time we make a change that requires re-bootstrapping, but with the
  linker variant, we instead take the entire part after "FreeBSD", as in
  this example version output:
  
  LLD 9.0.1 (FreeBSD c1a0a213378a458fbea1a5c77b315c7dce08fd05-136) 
(compatible with GNU linkers)
  
  E.g., LINKER_FREEBSD_VERSION is currently being set to
  "c1a0a213378a458fbea1a5c77b315c7dce08fd05-136".  This means that
  *any* new upstream lld version will cause re-bootstrapping.
  
  We should only look at the numerical field we append after a dash
  instead.  This review attempts to make it so.
  
  The only thing I am not happy about is the post-processing of awk output
  in Makefile.inc1.  I notice that our awk does not have gensub(), so it
  can't substitute a numbered sub-regex with \1, \2, etc.  Suggestions
  welcome. :)
  
  MFC after:1 week
  Differential Revision: https://reviews.freebsd.org/D23691

Modified:
  head/Makefile.inc1
  head/share/mk/bsd.linker.mk

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed Feb 19 21:03:06 2020(r358131)
+++ head/Makefile.inc1  Wed Feb 19 21:12:59 2020(r358132)
@@ -272,9 +272,10 @@ WANT_LINKER_TYPE=
 !make(test-system-compiler)
 .if ${WANT_LINKER_TYPE} == "lld"
 WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/VCSVersion.inc
-WANT_LINKER_FREEBSD_VERSION!= \
+_WANT_LINKER_FREEBSD_VERSION!= \
awk '$$2 == "LLD_REVISION" {gsub(/"/, "", $$3); print $$3}' \
${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown
+WANT_LINKER_FREEBSD_VERSION=${_WANT_LINKER_FREEBSD_VERSION:C/.*-(.*)/\1/}
 WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc
 WANT_LINKER_VERSION!= \
awk '$$2 == "LLD_VERSION" {split($$3, a, "."); print a[1] * 1 + 
a[2] * 100 + a[3]}' \

Modified: head/share/mk/bsd.linker.mk
==
--- head/share/mk/bsd.linker.mk Wed Feb 19 21:03:06 2020(r358131)
+++ head/share/mk/bsd.linker.mk Wed Feb 19 21:12:59 2020(r358132)
@@ -69,9 +69,11 @@ _v=  ${_ld_version:M[1-9]*.[0-9]*:[1]}
 .elif ${_ld_version:[1]} == "LLD"
 ${X_}LINKER_TYPE=  lld
 _v=${_ld_version:[2]}
-${X_}LINKER_FREEBSD_VERSION!= \
-   ${${ld}} --version | \
-   awk '$$3 ~ /FreeBSD/ {print substr($$4, 1, length($$4)-1)}'
+.if ${_ld_version:[3]} == "(FreeBSD"
+${X_}LINKER_FREEBSD_VERSION:=  ${_ld_version:[4]:C/.*-(.*)\)/\1/}
+.else
+${X_}LINKER_FREEBSD_VERSION=   0
+.endif
 .else
 .warning Unknown linker from ${ld}=${${ld}}: ${_ld_version}, defaulting to bfd
 ${X_}LINKER_TYPE=  bfd
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r358062 - in head: contrib/ncurses contrib/ncurses/doc contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/mi

2020-02-19 Thread Dimitry Andric

On 2020-02-18 09:11, Baptiste Daroussin wrote:

Author: bapt
Date: Tue Feb 18 08:11:52 2020
New Revision: 358062
URL: https://svnweb.freebsd.org/changeset/base/358062

Log:
   Update ncurses to 20200118


Apparently this breaks the gcc builds, because it can't find the 
function "box" anymore:


--- all_subdir_usr.bin/clang/lldb ---
/usr/local/bin/x86_64-unknown-freebsd12.0-ld: 
/tmp/obj/workspace/src/amd64.amd64/lib/clang/liblldb/liblldb.a(IOHandler.o): 
in function `curses::Window::Box(unsigned int, unsigned int)':
/workspace/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:926: 
undefined reference to `box'
/usr/local/bin/x86_64-unknown-freebsd12.0-ld: 
/workspace/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:926: 
undefined reference to `box'

collect2: error: ld returned 1 exit status
*** [lldb.full] Error code 1

See also: https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/13322/

-Dimitry
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358079 - in stable: 11/sys/dev/hptmv 12/sys/dev/hptmv

2020-02-18 Thread Dimitry Andric
Author: dim
Date: Tue Feb 18 18:17:03 2020
New Revision: 358079
URL: https://svnweb.freebsd.org/changeset/base/358079

Log:
  MFC r357976:
  
  Merge r357970 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in hptmv(4):
  
  sys/dev/hptmv/ioctl.c:240:4: error: misleading indentation; statement is not 
part of the previous 'if' [-Werror,-Wmisleading-indentation]
  _vbus_p=pArray->pVBus;
  ^
  sys/dev/hptmv/ioctl.c:237:10: note: previous statement is here
  if(!mIsArray(pArray))
  ^
  
  This is because the return statement after the if statement was not
  indented.  (Note that this file has been idented assuming 4-space tabs.)

Modified:
  stable/12/sys/dev/hptmv/ioctl.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/hptmv/ioctl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/dev/hptmv/ioctl.c
==
--- stable/12/sys/dev/hptmv/ioctl.c Tue Feb 18 18:15:33 2020
(r358078)
+++ stable/12/sys/dev/hptmv/ioctl.c Tue Feb 18 18:17:03 2020
(r358079)
@@ -235,7 +235,7 @@ int Kernel_DeviceIoControl(_VBUS_ARG
return -1;

if(!mIsArray(pArray))
-   return -1;
+   return -1;
 
_vbus_p=pArray->pVBus;
pAdapter = (IAL_ADAPTER_T *)_vbus_p->OsExt;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358079 - in stable: 11/sys/dev/hptmv 12/sys/dev/hptmv

2020-02-18 Thread Dimitry Andric
Author: dim
Date: Tue Feb 18 18:17:03 2020
New Revision: 358079
URL: https://svnweb.freebsd.org/changeset/base/358079

Log:
  MFC r357976:
  
  Merge r357970 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in hptmv(4):
  
  sys/dev/hptmv/ioctl.c:240:4: error: misleading indentation; statement is not 
part of the previous 'if' [-Werror,-Wmisleading-indentation]
  _vbus_p=pArray->pVBus;
  ^
  sys/dev/hptmv/ioctl.c:237:10: note: previous statement is here
  if(!mIsArray(pArray))
  ^
  
  This is because the return statement after the if statement was not
  indented.  (Note that this file has been idented assuming 4-space tabs.)

Modified:
  stable/11/sys/dev/hptmv/ioctl.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/dev/hptmv/ioctl.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/dev/hptmv/ioctl.c
==
--- stable/11/sys/dev/hptmv/ioctl.c Tue Feb 18 18:15:33 2020
(r358078)
+++ stable/11/sys/dev/hptmv/ioctl.c Tue Feb 18 18:17:03 2020
(r358079)
@@ -233,7 +233,7 @@ int Kernel_DeviceIoControl(_VBUS_ARG
return -1;

if(!mIsArray(pArray))
-   return -1;
+   return -1;
 
_vbus_p=pArray->pVBus;
pAdapter = (IAL_ADAPTER_T *)_vbus_p->OsExt;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358078 - in stable: 11/sbin/sconfig 12/sbin/sconfig

2020-02-18 Thread Dimitry Andric
Author: dim
Date: Tue Feb 18 18:15:33 2020
New Revision: 358078
URL: https://svnweb.freebsd.org/changeset/base/358078

Log:
  MFC r357873:
  
  Merge r357864 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in sconfig:
  
  sbin/sconfig/sconfig.c:909:5: error: misleading indentation; statement is not 
part of the previous 'else' [-Werror,-Wmisleading-indentation]
  exit (-1);
  ^
  sbin/sconfig/sconfig.c:907:6: note: previous statement is here
  } else
^
  
  The intent was to group the exit() call with the previous fprintf()
  call.

Modified:
  stable/11/sbin/sconfig/sconfig.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sbin/sconfig/sconfig.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sbin/sconfig/sconfig.c
==
--- stable/11/sbin/sconfig/sconfig.cTue Feb 18 18:13:08 2020
(r358077)
+++ stable/11/sbin/sconfig/sconfig.cTue Feb 18 18:15:33 2020
(r358078)
@@ -904,9 +904,10 @@ setup_chan (int fd, int argc, char **argv)
} else if (strncasecmp ("rs449", argv[i]+5, 5) == 0) {
port = 2;
ioctl (fd, SERIAL_SETPORT, );
-   } else
+   } else {
fprintf (stderr, "invalid port type\n");
exit (-1);
+   }
 #if 1
} else if (strcasecmp ("reset", argv[i]) == 0) {
ioctl (fd, SERIAL_RESET, 0);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358078 - in stable: 11/sbin/sconfig 12/sbin/sconfig

2020-02-18 Thread Dimitry Andric
Author: dim
Date: Tue Feb 18 18:15:33 2020
New Revision: 358078
URL: https://svnweb.freebsd.org/changeset/base/358078

Log:
  MFC r357873:
  
  Merge r357864 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in sconfig:
  
  sbin/sconfig/sconfig.c:909:5: error: misleading indentation; statement is not 
part of the previous 'else' [-Werror,-Wmisleading-indentation]
  exit (-1);
  ^
  sbin/sconfig/sconfig.c:907:6: note: previous statement is here
  } else
^
  
  The intent was to group the exit() call with the previous fprintf()
  call.

Modified:
  stable/12/sbin/sconfig/sconfig.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sbin/sconfig/sconfig.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sbin/sconfig/sconfig.c
==
--- stable/12/sbin/sconfig/sconfig.cTue Feb 18 18:13:08 2020
(r358077)
+++ stable/12/sbin/sconfig/sconfig.cTue Feb 18 18:15:33 2020
(r358078)
@@ -904,9 +904,10 @@ setup_chan (int fd, int argc, char **argv)
} else if (strncasecmp ("rs449", argv[i]+5, 5) == 0) {
port = 2;
ioctl (fd, SERIAL_SETPORT, );
-   } else
+   } else {
fprintf (stderr, "invalid port type\n");
exit (-1);
+   }
 #if 1
} else if (strcasecmp ("reset", argv[i]) == 0) {
ioctl (fd, SERIAL_RESET, 0);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358077 - in stable: 11/sys/conf 11/sys/modules/ce 11/sys/modules/cp 12/sys/conf 12/sys/modules/ce 12/sys/modules/cp

2020-02-18 Thread Dimitry Andric
Author: dim
Date: Tue Feb 18 18:13:08 2020
New Revision: 358077
URL: https://svnweb.freebsd.org/changeset/base/358077

Log:
  MFC r357874:
  
  Merge r357872 from the clang1000-import branch:
  
  Disable new clang 10.0.0 warnings about misleading indentation in ce(4)
  and cp(4).
  
  These are false positives, since some of the driver source has been
  deliberately obfuscated.

Modified:
  stable/12/sys/conf/files.i386
  stable/12/sys/conf/kern.mk
  stable/12/sys/modules/ce/Makefile
  stable/12/sys/modules/cp/Makefile
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/conf/files.i386
  stable/11/sys/conf/kern.mk
  stable/11/sys/modules/ce/Makefile
  stable/11/sys/modules/cp/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/conf/files.i386
==
--- stable/12/sys/conf/files.i386   Tue Feb 18 18:03:04 2020
(r358076)
+++ stable/12/sys/conf/files.i386   Tue Feb 18 18:13:08 2020
(r358077)
@@ -189,9 +189,10 @@ dev/bxe/57712_init_values.c optional bxe pci
 dev/ce/ceddk.c optional ce
 dev/ce/if_ce.c optional ce
 dev/ce/tau32-ddk.c optional ce \
-   compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}"
+   compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION} 
${NO_WMISLEADING_INDENTATION}"
 dev/coretemp/coretemp.coptional coretemp
-dev/cp/cpddk.c optional cp
+dev/cp/cpddk.c optional cp \
+   compile-with "${NORMAL_C} ${NO_WMISLEADING_INDENTATION}"
 dev/cp/if_cp.c optional cp
 dev/cpuctl/cpuctl.coptional cpuctl
 dev/ctau/ctau.coptional ctau

Modified: stable/12/sys/conf/kern.mk
==
--- stable/12/sys/conf/kern.mk  Tue Feb 18 18:03:04 2020(r358076)
+++ stable/12/sys/conf/kern.mk  Tue Feb 18 18:13:08 2020(r358077)
@@ -38,6 +38,9 @@ CWARNEXTRA+=  -Wno-error-shift-negative-value
 .if ${COMPILER_VERSION} >= 4
 CWARNEXTRA+=   -Wno-address-of-packed-member
 .endif
+.if ${COMPILER_VERSION} >= 10
+NO_WMISLEADING_INDENTATION=-Wno-misleading-indentation
+.endif
 
 CLANG_NO_IAS= -no-integrated-as
 .if ${COMPILER_VERSION} < 30500

Modified: stable/12/sys/modules/ce/Makefile
==
--- stable/12/sys/modules/ce/Makefile   Tue Feb 18 18:03:04 2020
(r358076)
+++ stable/12/sys/modules/ce/Makefile   Tue Feb 18 18:13:08 2020
(r358077)
@@ -27,4 +27,5 @@ opt_ng_cronyx.h:
 
 .include 
 
-CWARNFLAGS.tau32-ddk.c=${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.tau32-ddk.c+=   ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.tau32-ddk.c+=   ${NO_WMISLEADING_INDENTATION}

Modified: stable/12/sys/modules/cp/Makefile
==
--- stable/12/sys/modules/cp/Makefile   Tue Feb 18 18:03:04 2020
(r358076)
+++ stable/12/sys/modules/cp/Makefile   Tue Feb 18 18:13:08 2020
(r358077)
@@ -26,3 +26,5 @@ opt_ng_cronyx.h:
 .endif
 
 .include 
+
+CWARNFLAGS.cpddk.c+=   ${NO_WMISLEADING_INDENTATION}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358077 - in stable: 11/sys/conf 11/sys/modules/ce 11/sys/modules/cp 12/sys/conf 12/sys/modules/ce 12/sys/modules/cp

2020-02-18 Thread Dimitry Andric
Author: dim
Date: Tue Feb 18 18:13:08 2020
New Revision: 358077
URL: https://svnweb.freebsd.org/changeset/base/358077

Log:
  MFC r357874:
  
  Merge r357872 from the clang1000-import branch:
  
  Disable new clang 10.0.0 warnings about misleading indentation in ce(4)
  and cp(4).
  
  These are false positives, since some of the driver source has been
  deliberately obfuscated.

Modified:
  stable/11/sys/conf/files.i386
  stable/11/sys/conf/kern.mk
  stable/11/sys/modules/ce/Makefile
  stable/11/sys/modules/cp/Makefile
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/conf/files.i386
  stable/12/sys/conf/kern.mk
  stable/12/sys/modules/ce/Makefile
  stable/12/sys/modules/cp/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/conf/files.i386
==
--- stable/11/sys/conf/files.i386   Tue Feb 18 18:03:04 2020
(r358076)
+++ stable/11/sys/conf/files.i386   Tue Feb 18 18:13:08 2020
(r358077)
@@ -197,10 +197,11 @@ dev/bxe/57712_init_values.c optional bxe pci
 dev/ce/ceddk.c optional ce
 dev/ce/if_ce.c optional ce
 dev/ce/tau32-ddk.c optional ce \
-   compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}"
+   compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION} 
${NO_WMISLEADING_INDENTATION}"
 dev/cm/if_cm_isa.c optional cm isa
 dev/coretemp/coretemp.coptional coretemp
-dev/cp/cpddk.c optional cp
+dev/cp/cpddk.c optional cp \
+   compile-with "${NORMAL_C} ${NO_WMISLEADING_INDENTATION}"
 dev/cp/if_cp.c optional cp
 dev/cpuctl/cpuctl.coptional cpuctl
 dev/ctau/ctau.coptional ctau

Modified: stable/11/sys/conf/kern.mk
==
--- stable/11/sys/conf/kern.mk  Tue Feb 18 18:03:04 2020(r358076)
+++ stable/11/sys/conf/kern.mk  Tue Feb 18 18:13:08 2020(r358077)
@@ -36,6 +36,9 @@ CWARNEXTRA+=  -Wno-error-shift-negative-value
 .if ${COMPILER_VERSION} >= 4
 CWARNEXTRA+=   -Wno-error-address-of-packed-member
 .endif
+.if ${COMPILER_VERSION} >= 10
+NO_WMISLEADING_INDENTATION=-Wno-misleading-indentation
+.endif
 
 CLANG_NO_IAS= -no-integrated-as
 .if ${COMPILER_VERSION} < 30500

Modified: stable/11/sys/modules/ce/Makefile
==
--- stable/11/sys/modules/ce/Makefile   Tue Feb 18 18:03:04 2020
(r358076)
+++ stable/11/sys/modules/ce/Makefile   Tue Feb 18 18:13:08 2020
(r358077)
@@ -27,4 +27,5 @@ opt_ng_cronyx.h:
 
 .include 
 
-CWARNFLAGS.tau32-ddk.c=${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.tau32-ddk.c+=   ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.tau32-ddk.c+=   ${NO_WMISLEADING_INDENTATION}

Modified: stable/11/sys/modules/cp/Makefile
==
--- stable/11/sys/modules/cp/Makefile   Tue Feb 18 18:03:04 2020
(r358076)
+++ stable/11/sys/modules/cp/Makefile   Tue Feb 18 18:13:08 2020
(r358077)
@@ -26,3 +26,5 @@ opt_ng_cronyx.h:
 .endif
 
 .include 
+
+CWARNFLAGS.cpddk.c+=   ${NO_WMISLEADING_INDENTATION}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358076 - in stable: 11/share/mk 12/share/mk

2020-02-18 Thread Dimitry Andric
Author: dim
Date: Tue Feb 18 18:03:04 2020
New Revision: 358076
URL: https://svnweb.freebsd.org/changeset/base/358076

Log:
  MFC r357661:
  
  Correctly recognize linker versions greater than 10.0.

Modified:
  stable/11/share/mk/bsd.linker.mk
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/share/mk/bsd.linker.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/share/mk/bsd.linker.mk
==
--- stable/11/share/mk/bsd.linker.mkTue Feb 18 17:59:37 2020
(r358075)
+++ stable/11/share/mk/bsd.linker.mkTue Feb 18 18:03:04 2020
(r358076)
@@ -55,7 +55,7 @@ _ld_version!= (${${ld}} --version || echo none) | sed 
 .endif
 .if ${_ld_version:[1..2]} == "GNU ld"
 ${X_}LINKER_TYPE=  bfd
-_v=${_ld_version:M[1-9].[0-9]*:[1]}
+_v=${_ld_version:M[1-9]*.[0-9]*:[1]}
 .elif ${_ld_version:[1]} == "LLD"
 ${X_}LINKER_TYPE=  lld
 _v=${_ld_version:[2]}
@@ -64,7 +64,7 @@ _v=   ${_ld_version:[2]}
 ${X_}LINKER_TYPE=  bfd
 _v=2.17.50
 .endif
-${X_}LINKER_VERSION!=  echo "${_v:M[1-9].[0-9]*}" | \
+${X_}LINKER_VERSION!=  echo "${_v:M[1-9]*.[0-9]*}" | \
  awk -F. '{print $$1 * 1 + $$2 * 100 + $$3;}'
 .undef _ld_version
 .undef _v
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358076 - in stable: 11/share/mk 12/share/mk

2020-02-18 Thread Dimitry Andric
Author: dim
Date: Tue Feb 18 18:03:04 2020
New Revision: 358076
URL: https://svnweb.freebsd.org/changeset/base/358076

Log:
  MFC r357661:
  
  Correctly recognize linker versions greater than 10.0.

Modified:
  stable/12/share/mk/bsd.linker.mk
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/share/mk/bsd.linker.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/share/mk/bsd.linker.mk
==
--- stable/12/share/mk/bsd.linker.mkTue Feb 18 17:59:37 2020
(r358075)
+++ stable/12/share/mk/bsd.linker.mkTue Feb 18 18:03:04 2020
(r358076)
@@ -59,7 +59,7 @@ _ld_version!= (${${ld}} --version || echo none) | sed 
 .if ${_ld_version:[1..2]} == "GNU ld"
 ${X_}LINKER_TYPE=  bfd
 ${X_}LINKER_FREEBSD_VERSION=   0
-_v=${_ld_version:M[1-9].[0-9]*:[1]}
+_v=${_ld_version:M[1-9]*.[0-9]*:[1]}
 .elif ${_ld_version:[1]} == "LLD"
 ${X_}LINKER_TYPE=  lld
 _v=${_ld_version:[2]}
@@ -71,7 +71,7 @@ ${X_}LINKER_FREEBSD_VERSION!= \
 ${X_}LINKER_TYPE=  bfd
 _v=2.17.50
 .endif
-${X_}LINKER_VERSION!=  echo "${_v:M[1-9].[0-9]*}" | \
+${X_}LINKER_VERSION!=  echo "${_v:M[1-9]*.[0-9]*}" | \
  awk -F. '{print $$1 * 1 + $$2 * 100 + $$3;}'
 .undef _ld_version
 .undef _v
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358074 - head/sys/arm/allwinner/clkng

2020-02-18 Thread Dimitry Andric
Author: dim
Date: Tue Feb 18 17:55:24 2020
New Revision: 358074
URL: https://svnweb.freebsd.org/changeset/base/358074

Log:
  Fix the following -Werror warning from clang 10.0.0:
  
  sys/arm/allwinner/clkng/aw_clk_mipi.c:144:6: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  m++;
  ^
  sys/arm/allwinner/clkng/aw_clk_mipi.c:142:5: note: previous statement is here
  if (best == *fout)
  ^
  
  Move the increment operations into the for loop headers instead.
  
  Discussed with:   manu
  MFC after:3 days

Modified:
  head/sys/arm/allwinner/clkng/aw_clk_mipi.c

Modified: head/sys/arm/allwinner/clkng/aw_clk_mipi.c
==
--- head/sys/arm/allwinner/clkng/aw_clk_mipi.c  Tue Feb 18 16:39:57 2020
(r358073)
+++ head/sys/arm/allwinner/clkng/aw_clk_mipi.c  Tue Feb 18 17:55:24 2020
(r358074)
@@ -129,9 +129,9 @@ aw_clk_mipi_find_best(struct aw_clk_mipi_sc *sc, uint6
*factor_k = 0;
*factor_m = 0;
 
-   for (n = aw_clk_factor_get_min(>n); n <= 
aw_clk_factor_get_max(>n); ) {
-   for (k = aw_clk_factor_get_min(>k); k <= 
aw_clk_factor_get_max(>k); ) {
-   for (m = aw_clk_factor_get_min(>m); m <= 
aw_clk_factor_get_max(>m); ) {
+   for (n = aw_clk_factor_get_min(>n); n <= 
aw_clk_factor_get_max(>n); n++) {
+   for (k = aw_clk_factor_get_min(>k); k <= 
aw_clk_factor_get_max(>k); k++) {
+   for (m = aw_clk_factor_get_min(>m); m <= 
aw_clk_factor_get_max(>m); m++) {
cur = (fparent * n * k) / m;
if ((*fout - cur) < (*fout - best)) {
best = cur;
@@ -141,11 +141,8 @@ aw_clk_mipi_find_best(struct aw_clk_mipi_sc *sc, uint6
}
if (best == *fout)
return (best);
-   m++;
}
-   k++;
}
-   n++;
}
 
return best;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358046 - head/lib/libc/quad

2020-02-17 Thread Dimitry Andric
Author: dim
Date: Mon Feb 17 20:24:21 2020
New Revision: 358046
URL: https://svnweb.freebsd.org/changeset/base/358046

Log:
  Merge r358042 from the clang1000-import branch:
  
  Add casts and L suffixes to libc quad support, to work around various
  -Werror warnings from clang 10.0.0, such as:
  
  lib/libc/quad/fixdfdi.c:57:12: error: implicit conversion from 'long long' to 
'double' changes value from 9223372036854775807 to 9223372036854775808 
[-Werror,-Wimplicit-int-float-conversion]
  if (x >= QUAD_MAX)
~~ ^~~~
  /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/sys/limits.h:89:19: note: 
expanded from macro 'QUAD_MAX'
  #define QUAD_MAX(__QUAD_MAX)/* max value for a quad_t */
   ^~
  /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:91:20: 
note: expanded from macro '__QUAD_MAX'
  #define __QUAD_MAX  __LLONG_MAX /* max value for a quad_t */
  ^~~
  /usr/obj/usr/src/powerpc.powerpc/tmp/usr/include/machine/_limits.h:75:21: 
note: expanded from macro '__LLONG_MAX'
  #define __LLONG_MAX 0x7fffLL/* max value for a long long 
*/
  ^~~~
  
  and many instances of:
  
  lib/libc/quad/fixunsdfdi.c:73:17: error: shift count >= width of type 
[-Werror,-Wshift-count-overflow]
  toppart = (x - ONE_HALF) / ONE;
 ^~~~
  lib/libc/quad/fixunsdfdi.c:45:19: note: expanded from macro 'ONE_HALF'
  #define ONE_HALF(ONE_FOURTH * 2.0)
   ^~
  lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH'
  #define ONE_FOURTH  (1 << (LONG_BITS - 2))
 ^  ~~~
  lib/libc/quad/fixunsdfdi.c:73:29: error: shift count >= width of type 
[-Werror,-Wshift-count-overflow]
  toppart = (x - ONE_HALF) / ONE;
 ^~~
  lib/libc/quad/fixunsdfdi.c:46:15: note: expanded from macro 'ONE'
  #define ONE (ONE_FOURTH * 4.0)
   ^~
  lib/libc/quad/fixunsdfdi.c:44:23: note: expanded from macro 'ONE_FOURTH'
  #define ONE_FOURTH  (1 << (LONG_BITS - 2))
 ^  ~~~
  
  MFC after:3 days

Modified:
  head/lib/libc/quad/fixdfdi.c
  head/lib/libc/quad/fixsfdi.c
  head/lib/libc/quad/fixunsdfdi.c
  head/lib/libc/quad/fixunssfdi.c
  head/lib/libc/quad/floatdidf.c
  head/lib/libc/quad/floatdisf.c
  head/lib/libc/quad/floatunsdidf.c
  head/lib/libc/quad/qdivrem.c
  head/lib/libc/quad/quad.h
Directory Properties:
  head/   (props changed)

Modified: head/lib/libc/quad/fixdfdi.c
==
--- head/lib/libc/quad/fixdfdi.cMon Feb 17 20:23:26 2020
(r358045)
+++ head/lib/libc/quad/fixdfdi.cMon Feb 17 20:24:21 2020
(r358046)
@@ -49,12 +49,12 @@ quad_t
 __fixdfdi(double x)
 {
if (x < 0)
-   if (x <= QUAD_MIN)
+   if (x <= (double)QUAD_MIN)
return (QUAD_MIN);
else
return ((quad_t)-(u_quad_t)-x);
else
-   if (x >= QUAD_MAX)
+   if (x >= (double)QUAD_MAX)
return (QUAD_MAX);
else
return ((quad_t)(u_quad_t)x);

Modified: head/lib/libc/quad/fixsfdi.c
==
--- head/lib/libc/quad/fixsfdi.cMon Feb 17 20:23:26 2020
(r358045)
+++ head/lib/libc/quad/fixsfdi.cMon Feb 17 20:24:21 2020
(r358046)
@@ -51,12 +51,12 @@ long long
 __fixsfdi(float x)
 {
if (x < 0)
-   if (x <= QUAD_MIN)
+   if (x <= (float)QUAD_MIN)
return (QUAD_MIN);
else
return ((quad_t)-(u_quad_t)-x);
else
-   if (x >= QUAD_MAX)
+   if (x >= (float)QUAD_MAX)
return (QUAD_MAX);
else
return ((quad_t)(u_quad_t)x);

Modified: head/lib/libc/quad/fixunsdfdi.c
==
--- head/lib/libc/quad/fixunsdfdi.c Mon Feb 17 20:23:26 2020
(r358045)
+++ head/lib/libc/quad/fixunsdfdi.c Mon Feb 17 20:24:21 2020
(r358046)
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
 
 #include "quad.h"
 
-#defineONE_FOURTH  (1 << (LONG_BITS - 2))
+#defineONE_FOURTH  (1L << (LONG_BITS - 2))
 #defineONE_HALF(ONE_FOURTH * 2.0)
 #defineONE (ONE_FOURTH * 4.0)
 
@@ -84,11 +84,11 @@ __fixunsdfdi(double x)
x -= (double)t.uq;
if (x < 0) {
t.ul[H]--;
-   x += ULONG_MAX;
+   x += (double)ULONG_MAX;
}
-   if (x > 

svn commit: r358045 - head/sys/powerpc/conf/dpaa

2020-02-17 Thread Dimitry Andric
Author: dim
Date: Mon Feb 17 20:23:26 2020
New Revision: 358045
URL: https://svnweb.freebsd.org/changeset/base/358045

Log:
  Merge r358034 from the clang1000-import branch:
  
  Disable new clang 10.0.0 warnings about misleading indentation in
  sys/contrib/ncsw/Peripherals/FM/fman_ncsw.c.
  
  This is horribly formatted contributed code, and fixing it is not worth
  the effort.
  
  MFC after:3 days

Modified:
  head/sys/powerpc/conf/dpaa/files.dpaa
Directory Properties:
  head/   (props changed)

Modified: head/sys/powerpc/conf/dpaa/files.dpaa
==
--- head/sys/powerpc/conf/dpaa/files.dpaa   Mon Feb 17 20:22:10 2020
(r358044)
+++ head/sys/powerpc/conf/dpaa/files.dpaa   Mon Feb 17 20:23:26 2020
(r358045)
@@ -74,7 +74,7 @@ contrib/ncsw/Peripherals/FM/fm_muram.c
optional dpaa
 contrib/ncsw/Peripherals/FM/fm_ncsw.c  optional dpaa   \
no-depend compile-with "${DPAA_COMPILE_CMD}"
 contrib/ncsw/Peripherals/FM/fman_ncsw.coptional dpaa   
\
-   no-depend compile-with "${DPAA_COMPILE_CMD}"
+   no-depend compile-with "${DPAA_COMPILE_CMD} 
${NO_WMISLEADING_INDENTATION}"
 contrib/ncsw/Peripherals/QM/qm.c   optional dpaa   \
no-depend compile-with "${DPAA_COMPILE_CMD}"
 contrib/ncsw/Peripherals/QM/qm_portal_fqr.coptional dpaa   \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r358044 - head/sys/arm/allwinner

2020-02-17 Thread Dimitry Andric
Author: dim
Date: Mon Feb 17 20:22:10 2020
New Revision: 358044
URL: https://svnweb.freebsd.org/changeset/base/358044

Log:
  Merge r358030 from the clang1000-import branch:
  
  Work around new clang 10.0.0 -Werror warning:
  
  sys/arm/allwinner/aw_cir.c:208:41: error: converting the result of '<<' to a 
boolean; did you mean '((1 & 255) << 23) != 0'? [-Werror,-Wint-in-bool-context]
  active_delay = (AW_IR_ACTIVE_T + 1) * (AW_IR_ACTIVE_T_C ? 128 : 1);
 ^
  sys/arm/allwinner/aw_cir.c:130:39: note: expanded from macro 
'AW_IR_ACTIVE_T_C'
  #define AW_IR_ACTIVE_T_C((1 & 0xff) << 23)
  ^
  
  Add the != 0 part to indicate that we indeed want to compare against
  zero.
  
  MFC after:3 days

Modified:
  head/sys/arm/allwinner/aw_cir.c
Directory Properties:
  head/   (props changed)

Modified: head/sys/arm/allwinner/aw_cir.c
==
--- head/sys/arm/allwinner/aw_cir.c Mon Feb 17 20:19:43 2020
(r358043)
+++ head/sys/arm/allwinner/aw_cir.c Mon Feb 17 20:22:10 2020
(r358044)
@@ -205,7 +205,7 @@ aw_ir_decode_packets(struct aw_ir_softc *sc)
device_printf(sc->dev, "sc->dcnt = %d\n", sc->dcnt);
 
/* Find Lead 1 (bit separator) */
-   active_delay = (AW_IR_ACTIVE_T + 1) * (AW_IR_ACTIVE_T_C ? 128 : 1);
+   active_delay = (AW_IR_ACTIVE_T + 1) * (AW_IR_ACTIVE_T_C != 0 ? 128 : 1);
len = 0;
len += (active_delay >> 1);
if (bootverbose)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r357647 - in head/sys: cam/ata cam/mmc cam/nvme cam/scsi dev/aac dev/altera/avgen dev/altera/sdcard dev/amr dev/cfi dev/flash dev/ida dev/ips dev/mfi dev/mlx dev/mmc dev/nvme dev/pst d

2020-02-17 Thread Dimitry Andric
On 7 Feb 2020, at 10:22, Scott Long  wrote:
> 
> Author: scottl
> Date: Fri Feb  7 09:22:08 2020
> New Revision: 357647
> URL: https://svnweb.freebsd.org/changeset/base/357647
> 
> Log:
>  Ever since the block layer expanded its command syntax beyond just
>  BIO_READ and BIO_WRITE, we've handled this expanded syntax poorly in
>  drivers when the driver doesn't support a particular command.  Do a
>  sweep and fix that.
...
> Modified: head/sys/dev/altera/sdcard/altera_sdcard_io.c
> ==
> --- head/sys/dev/altera/sdcard/altera_sdcard_io.c Fri Feb  7 08:39:00 
> 2020(r357646)
> +++ head/sys/dev/altera/sdcard/altera_sdcard_io.c Fri Feb  7 09:22:08 
> 2020(r357647)
> @@ -293,27 +293,27 @@ recheck:
> }
> 
> static void
> -altera_sdcard_io_start_internal(struct altera_sdcard_softc *sc, struct bio 
> *bp)
> +altera_sdcard_io_start_internal(struct altera_sdcard_softc *sc, struct bio 
> **bp)
> {
> 
> - switch (bp->bio_cmd) {
> + switch (*bp->bio_cmd) {
>   case BIO_READ:
> - altera_sdcard_write_cmd_arg(sc, bp->bio_pblkno *
> + altera_sdcard_write_cmd_arg(sc, *bp->bio_pblkno *
>   ALTERA_SDCARD_SECTORSIZE);
>   altera_sdcard_write_cmd(sc, ALTERA_SDCARD_CMD_READ_BLOCK);
>   break;
> 
>   case BIO_WRITE:
> - altera_sdcard_write_rxtx_buffer(sc, bp->bio_data,
> - bp->bio_bcount);
> - altera_sdcard_write_cmd_arg(sc, bp->bio_pblkno *
> + altera_sdcard_write_rxtx_buffer(sc, *bp->bio_data,
> + *bp->bio_bcount);
> + altera_sdcard_write_cmd_arg(sc, *bp->bio_pblkno *
>   ALTERA_SDCARD_SECTORSIZE);
>   altera_sdcard_write_cmd(sc, ALTERA_SDCARD_CMD_WRITE_BLOCK);
>   break;
> 
>   default:
> - panic("%s: unsupported I/O operation %d", __func__,
> - bp->bio_cmd);
> + biofinish(*bp, NULL, EOPNOTSUPP);
> + *bp = NULL;
>   }
> }
> 

This gets the indirections wrong, leading to errors with at least clang 10:

sys/dev/altera/sdcard/altera_sdcard_io.c: In function 
'altera_sdcard_io_start_internal':
sys/dev/altera/sdcard/altera_sdcard_io.c:299:13: error: '*bp' is a pointer; did 
you mean to use '->'?
  switch (*bp->bio_cmd) {
 ^~
 ->
sys/dev/altera/sdcard/altera_sdcard_io.c:301:38: error: '*bp' is a pointer; did 
you mean to use '->'?
   altera_sdcard_write_cmd_arg(sc, *bp->bio_pblkno *
  ^~
  ->
sys/dev/altera/sdcard/altera_sdcard_io.c:307:42: error: '*bp' is a pointer; did 
you mean to use '->'?
   altera_sdcard_write_rxtx_buffer(sc, *bp->bio_data,
  ^~
  ->
sys/dev/altera/sdcard/altera_sdcard_io.c:308:10: error: '*bp' is a pointer; did 
you mean to use '->'?
   *bp->bio_bcount);
  ^~
  ->
sys/dev/altera/sdcard/altera_sdcard_io.c:309:38: error: '*bp' is a pointer; did 
you mean to use '->'?
   altera_sdcard_write_cmd_arg(sc, *bp->bio_pblkno *
  ^~
  ->

In this case, (*bp)->fieldname is the correct way to specify the struct fields.


> @@ -332,8 +332,8 @@ altera_sdcard_io_start(struct altera_sdcard_softc *sc,
>*/
>   KASSERT(bp->bio_bcount == ALTERA_SDCARD_SECTORSIZE,
>   ("%s: I/O size not %d", __func__, ALTERA_SDCARD_SECTORSIZE));
> - altera_sdcard_io_start_internal(sc, bp);
> - sc->as_currentbio = bp;
> + altera_sdcard_io_start_internal(sc, );
> + sc->as_currentbio = *bp;
>   sc->as_retriesleft = ALTERA_SDCARD_RETRY_LIMIT;
> }

And a similar error here:

sys/dev/altera/sdcard/altera_sdcard_io.c: In function 'altera_sdcard_io_start':
sys/dev/altera/sdcard/altera_sdcard_io.c:336:20: error: incompatible types when 
assigning to type 'struct bio *' from type 'struct bio'
  sc->as_currentbio = *bp;
^

As sc->as_currentbio is already a pointer, there is no need to dereference bp 
again.

I submitted https://reviews.freebsd.org/D23730 to get this fixed.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r357976 - head/sys/dev/hptmv

2020-02-15 Thread Dimitry Andric
Author: dim
Date: Sat Feb 15 19:15:24 2020
New Revision: 357976
URL: https://svnweb.freebsd.org/changeset/base/357976

Log:
  Merge r357970 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in hptmv(4):
  
  sys/dev/hptmv/ioctl.c:240:4: error: misleading indentation; statement is not 
part of the previous 'if' [-Werror,-Wmisleading-indentation]
  _vbus_p=pArray->pVBus;
  ^
  sys/dev/hptmv/ioctl.c:237:10: note: previous statement is here
  if(!mIsArray(pArray))
  ^
  
  This is because the return statement after the if statement was not
  indented.  (Note that this file has been idented assuming 4-space tabs.)
  
  MFC after:3 days

Modified:
  head/sys/dev/hptmv/ioctl.c
Directory Properties:
  head/   (props changed)

Modified: head/sys/dev/hptmv/ioctl.c
==
--- head/sys/dev/hptmv/ioctl.c  Sat Feb 15 19:13:37 2020(r357975)
+++ head/sys/dev/hptmv/ioctl.c  Sat Feb 15 19:15:24 2020(r357976)
@@ -235,7 +235,7 @@ int Kernel_DeviceIoControl(_VBUS_ARG
return -1;

if(!mIsArray(pArray))
-   return -1;
+   return -1;
 
_vbus_p=pArray->pVBus;
pAdapter = (IAL_ADAPTER_T *)_vbus_p->OsExt;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357938 - vendor/llvm-project/llvmorg-10.0.0-rc2-0-g90c78073f73

2020-02-14 Thread Dimitry Andric
Author: dim
Date: Fri Feb 14 21:24:56 2020
New Revision: 357938
URL: https://svnweb.freebsd.org/changeset/base/357938

Log:
  Tag llvm-project branch release/10.x llvmorg-10.0.0-rc2-0-g90c78073f73.

Added:
  vendor/llvm-project/llvmorg-10.0.0-rc2-0-g90c78073f73/
 - copied from r357937, vendor/llvm-project/release-10.x/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357937 - in vendor/llvm-project/release-10.x: clang/include/clang/AST clang/include/clang/Basic clang/include/clang/Driver clang/include/clang/Lex clang/include/clang/Sema clang/lib/AS...

2020-02-14 Thread Dimitry Andric
Author: dim
Date: Fri Feb 14 21:24:03 2020
New Revision: 357937
URL: https://svnweb.freebsd.org/changeset/base/357937

Log:
  Vendor import of llvm-project branch release/10.x
  llvmorg-10.0.0-rc2-0-g90c78073f73.

Added:
  vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVSchedRocket32.td
  vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVSchedRocket64.td
  vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVSchedule.td
Deleted:
  
vendor/llvm-project/release-10.x/llvm/lib/Target/AMDGPU/SIRemoveShortExecBranches.cpp
Modified:
  vendor/llvm-project/release-10.x/clang/include/clang/AST/ASTConcept.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/ExprConcepts.h
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/Cuda.h
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticGroups.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/llvm-project/release-10.x/clang/include/clang/Driver/CC1Options.td
  vendor/llvm-project/release-10.x/clang/include/clang/Driver/Job.h
  vendor/llvm-project/release-10.x/clang/include/clang/Lex/PreprocessorOptions.h
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/SemaConcept.h
  vendor/llvm-project/release-10.x/clang/lib/AST/ASTConcept.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ASTContext.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/CXXInheritance.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/DeclCXX.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/Expr.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ExprConcepts.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/StmtProfile.cpp
  vendor/llvm-project/release-10.x/clang/lib/Basic/Cuda.cpp
  vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenModule.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/Compilation.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/Job.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Clang.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Cuda.cpp
  vendor/llvm-project/release-10.x/clang/lib/Frontend/CompilerInvocation.cpp
  vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_intrinsics.h
  
vendor/llvm-project/release-10.x/clang/lib/Headers/__clang_cuda_runtime_wrapper.h
  vendor/llvm-project/release-10.x/clang/lib/Headers/xmmintrin.h
  vendor/llvm-project/release-10.x/clang/lib/Lex/Lexer.cpp
  vendor/llvm-project/release-10.x/clang/lib/Lex/Pragma.cpp
  vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDecl.cpp
  vendor/llvm-project/release-10.x/clang/lib/Parse/ParseDeclCXX.cpp
  vendor/llvm-project/release-10.x/clang/lib/Parse/ParseExprCXX.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaCast.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaConcept.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaDecl.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaDeclCXX.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExpr.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExprCXX.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaOverload.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplate.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateDeduction.cpp
  vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateInstantiate.cpp
  
vendor/llvm-project/release-10.x/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  vendor/llvm-project/release-10.x/clang/lib/Serialization/ASTReaderDecl.cpp
  
vendor/llvm-project/release-10.x/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
  vendor/llvm-project/release-10.x/clang/tools/driver/cc1_main.cpp
  vendor/llvm-project/release-10.x/clang/tools/driver/cc1as_main.cpp
  
vendor/llvm-project/release-10.x/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp
  vendor/llvm-project/release-10.x/libcxx/include/__config
  vendor/llvm-project/release-10.x/lld/ELF/Arch/ARM.cpp
  vendor/llvm-project/release-10.x/lld/ELF/Arch/PPC.cpp
  vendor/llvm-project/release-10.x/lld/ELF/InputSection.cpp
  vendor/llvm-project/release-10.x/lld/ELF/Relocations.cpp
  vendor/llvm-project/release-10.x/lld/ELF/SyntheticSections.cpp
  vendor/llvm-project/release-10.x/lld/ELF/SyntheticSections.h
  vendor/llvm-project/release-10.x/lld/ELF/Thunks.cpp
  vendor/llvm-project/release-10.x/lld/docs/ReleaseNotes.rst
  vendor/llvm-project/release-10.x/lldb/source/DataFormatters/FormatCache.cpp
  
vendor/llvm-project/release-10.x/lldb/source/DataFormatters/LanguageCategory.cpp
  vendor/llvm-project/release-10.x/lldb/source/Interpreter/CommandAlias.cpp
  vendor/llvm-project/release-10.x/lldb/source/Interpreter/Options.cpp
  

svn commit: r357936 - vendor/llvm-project/release-10.x/clang/utils

2020-02-14 Thread Dimitry Andric
Author: dim
Date: Fri Feb 14 21:05:15 2020
New Revision: 357936
URL: https://svnweb.freebsd.org/changeset/base/357936

Log:
  Remove unused utility script.

Deleted:
  vendor/llvm-project/release-10.x/clang/utils/convert_arm_neon.py
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357929 - head/etc/mtree

2020-02-14 Thread Dimitry Andric
Author: dim
Date: Fri Feb 14 19:31:24 2020
New Revision: 357929
URL: https://svnweb.freebsd.org/changeset/base/357929

Log:
  Remove /usr/include/ssp from BSD.include.dist after r356356
  
  This avoids having to delete it every time with "make delete-old".
  
  PR:   242950
  MFC after:2 weeks
  X-MFC-With:   r356356

Modified:
  head/etc/mtree/BSD.include.dist

Modified: head/etc/mtree/BSD.include.dist
==
--- head/etc/mtree/BSD.include.dist Fri Feb 14 19:20:30 2020
(r357928)
+++ head/etc/mtree/BSD.include.dist Fri Feb 14 19:31:24 2020
(r357929)
@@ -357,8 +357,6 @@
 mac_veriexec
 ..
 ..
-ssp
-..
 sys
 disk
 ..
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357874 - in head/sys: conf modules/ce modules/cp

2020-02-13 Thread Dimitry Andric
Author: dim
Date: Thu Feb 13 19:29:57 2020
New Revision: 357874
URL: https://svnweb.freebsd.org/changeset/base/357874

Log:
  Merge r357872 from the clang1000-import branch:
  
  Disable new clang 10.0.0 warnings about misleading indentation in ce(4)
  and cp(4).
  
  These are false positives, since some of the driver source has been
  deliberately obfuscated.
  
  MFC after:3 days

Modified:
  head/sys/conf/files.i386
  head/sys/conf/kern.mk
  head/sys/modules/ce/Makefile
  head/sys/modules/cp/Makefile
Directory Properties:
  head/   (props changed)

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Thu Feb 13 19:28:30 2020(r357873)
+++ head/sys/conf/files.i386Thu Feb 13 19:29:57 2020(r357874)
@@ -93,8 +93,9 @@ dev/agp/agp_via.c optional agp
 dev/ce/ceddk.c optional ce
 dev/ce/if_ce.c optional ce
 dev/ce/tau32-ddk.c optional ce \
-   compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}"
-dev/cp/cpddk.c optional cp
+   compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION} 
${NO_WMISLEADING_INDENTATION}"
+dev/cp/cpddk.c optional cp \
+   compile-with "${NORMAL_C} ${NO_WMISLEADING_INDENTATION}"
 dev/cp/if_cp.c optional cp
 dev/ctau/ctau.coptional ctau
 dev/ctau/ctddk.c   optional ctau

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Thu Feb 13 19:28:30 2020(r357873)
+++ head/sys/conf/kern.mk   Thu Feb 13 19:29:57 2020(r357874)
@@ -37,6 +37,9 @@ CWARNEXTRA+=  -Wno-error-shift-negative-value
 .if ${COMPILER_VERSION} >= 4
 CWARNEXTRA+=   -Wno-address-of-packed-member
 .endif
+.if ${COMPILER_VERSION} >= 10
+NO_WMISLEADING_INDENTATION=-Wno-misleading-indentation
+.endif
 .endif
 
 .if ${COMPILER_TYPE} == "gcc"

Modified: head/sys/modules/ce/Makefile
==
--- head/sys/modules/ce/MakefileThu Feb 13 19:28:30 2020
(r357873)
+++ head/sys/modules/ce/MakefileThu Feb 13 19:29:57 2020
(r357874)
@@ -27,4 +27,5 @@ opt_ng_cronyx.h:
 
 .include 
 
-CWARNFLAGS.tau32-ddk.c=${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.tau32-ddk.c+=   ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.tau32-ddk.c+=   ${NO_WMISLEADING_INDENTATION}

Modified: head/sys/modules/cp/Makefile
==
--- head/sys/modules/cp/MakefileThu Feb 13 19:28:30 2020
(r357873)
+++ head/sys/modules/cp/MakefileThu Feb 13 19:29:57 2020
(r357874)
@@ -26,3 +26,5 @@ opt_ng_cronyx.h:
 .endif
 
 .include 
+
+CWARNFLAGS.cpddk.c+=   ${NO_WMISLEADING_INDENTATION}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357873 - head/sbin/sconfig

2020-02-13 Thread Dimitry Andric
Author: dim
Date: Thu Feb 13 19:28:30 2020
New Revision: 357873
URL: https://svnweb.freebsd.org/changeset/base/357873

Log:
  Merge r357864 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in sconfig:
  
  sbin/sconfig/sconfig.c:909:5: error: misleading indentation; statement is not 
part of the previous 'else' [-Werror,-Wmisleading-indentation]
  exit (-1);
  ^
  sbin/sconfig/sconfig.c:907:6: note: previous statement is here
  } else
^
  
  The intent was to group the exit() call with the previous fprintf()
  call.
  
  MFC after:3 days

Modified:
  head/sbin/sconfig/sconfig.c
Directory Properties:
  head/   (props changed)

Modified: head/sbin/sconfig/sconfig.c
==
--- head/sbin/sconfig/sconfig.c Thu Feb 13 19:25:49 2020(r357872)
+++ head/sbin/sconfig/sconfig.c Thu Feb 13 19:28:30 2020(r357873)
@@ -904,9 +904,10 @@ setup_chan (int fd, int argc, char **argv)
} else if (strncasecmp ("rs449", argv[i]+5, 5) == 0) {
port = 2;
ioctl (fd, SERIAL_SETPORT, );
-   } else
+   } else {
fprintf (stderr, "invalid port type\n");
exit (-1);
+   }
 #if 1
} else if (strcasecmp ("reset", argv[i]) == 0) {
ioctl (fd, SERIAL_RESET, 0);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357854 - head

2020-02-13 Thread Dimitry Andric
Author: dim
Date: Thu Feb 13 11:00:20 2020
New Revision: 357854
URL: https://svnweb.freebsd.org/changeset/base/357854

Log:
  Cleanup gsched tool and geom_sched.so library after r356185.

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Thu Feb 13 03:37:11 2020(r357853)
+++ head/ObsoleteFiles.inc  Thu Feb 13 11:00:20 2020(r357854)
@@ -54,6 +54,10 @@ OLD_FILES+=usr/include/ssp/string.h
 OLD_FILES+=usr/include/ssp/unistd.h
 OLD_DIRS+=usr/include/ssp
 
+# 20191229: GEOM_SCHED class and gsched tool removed
+OLD_FILES+=sbin/gsched
+OLD_LIBS+=lib/geom/geom_sched.so
+
 # 20191222: new clang import which bumps version from 9.0.0 to 9.0.1.
 OLD_FILES+=usr/lib/clang/9.0.0/include/cuda_wrappers/algorithm
 OLD_FILES+=usr/lib/clang/9.0.0/include/cuda_wrappers/complex
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357847 - head

2020-02-12 Thread Dimitry Andric
Author: dim
Date: Wed Feb 12 23:54:38 2020
New Revision: 357847
URL: https://svnweb.freebsd.org/changeset/base/357847

Log:
  Fix typo introduced with r347534 (cap_sysctl additions).
  
  This ensures the old libcap_sysctl.so.1 gets cleaned up when running
  "make delete-old-libs".

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Wed Feb 12 22:44:18 2020(r357846)
+++ head/ObsoleteFiles.inc  Wed Feb 12 23:54:38 2020(r357847)
@@ -757,7 +757,7 @@ OLD_FILES+=usr/share/man/man4/wb.4.gz
 OLD_FILES+=usr/share/man/man4/xe.4.gz
 OLD_FILES+=usr/share/man/man4/if_xe.4.gz
 # 20190513: libcap_sysctl interface change
-OLD_FILES+=lib/casper/libcap_sysctl.1
+OLD_FILES+=lib/casper/libcap_sysctl.so.1
 # 20190509: tests/sys/opencrypto requires the net/py-dpkt package.
 OLD_FILES+=usr/tests/sys/opencrypto/dpkt.py
 OLD_FILES+=usr/tests/sys/opencrypto/dpkt.pyc
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357661 - head/share/mk

2020-02-07 Thread Dimitry Andric
Author: dim
Date: Fri Feb  7 19:04:27 2020
New Revision: 357661
URL: https://svnweb.freebsd.org/changeset/base/357661

Log:
  Correctly recognize linker versions greater than 10.0.
  
  MFC after:3 days

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

Modified: head/share/mk/bsd.linker.mk
==
--- head/share/mk/bsd.linker.mk Fri Feb  7 19:00:43 2020(r357660)
+++ head/share/mk/bsd.linker.mk Fri Feb  7 19:04:27 2020(r357661)
@@ -65,7 +65,7 @@ _ld_version!= (${${ld}} --version || echo none) | sed 
 .if ${_ld_version:[1..2]} == "GNU ld"
 ${X_}LINKER_TYPE=  bfd
 ${X_}LINKER_FREEBSD_VERSION=   0
-_v=${_ld_version:M[1-9].[0-9]*:[1]}
+_v=${_ld_version:M[1-9]*.[0-9]*:[1]}
 .elif ${_ld_version:[1]} == "LLD"
 ${X_}LINKER_TYPE=  lld
 _v=${_ld_version:[2]}
@@ -77,7 +77,7 @@ ${X_}LINKER_FREEBSD_VERSION!= \
 ${X_}LINKER_TYPE=  bfd
 _v=2.17.50
 .endif
-${X_}LINKER_VERSION!=  echo "${_v:M[1-9].[0-9]*}" | \
+${X_}LINKER_VERSION!=  echo "${_v:M[1-9]*.[0-9]*}" | \
  awk -F. '{print $$1 * 1 + $$2 * 100 + $$3;}'
 .undef _ld_version
 .undef _v
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357526 - in stable: 11/sys/dev/tpm 12/sys/dev/tpm

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 20:09:25 2020
New Revision: 357526
URL: https://svnweb.freebsd.org/changeset/base/357526

Log:
  MFC r357349:
  
  Merge r357348 from the clang 10.0.0 import branch:
  
  Disable new clang 10.0.0 warnings about converting the result of shift
  operations to a boolean in tpm(4):
  
  sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
^
  sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
'TPM_CRB_CTRL_CANCEL_CMD'
  #define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
  ^
  sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
  #define BIT(x) (1 << (x))
^
  
  Such warnings can be useful in C++ contexts, but not so much in kernel
  drivers, where this type of bit twiddling is commonplace.  So disable it
  for this case.
  
  MFC r357366:
  
  Revert r357349, since the clang 10.0.0 warning was actually correct, and
  the ! operator should have been a ~ instead:
  
Merge r357348 from the clang 10.0.0 import branch:
  
Disable new clang 10.0.0 warnings about converting the result of
shift operations to a boolean in tpm(4):
  
sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
^
sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
'TPM_CRB_CTRL_CANCEL_CMD'
#define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
  ^
sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
#define BIT(x) (1 << (x))
^
  
Such warnings can be useful in C++ contexts, but not so much in kernel
drivers, where this type of bit twiddling is commonplace.  So disable
it for this case.
  
  Noticed by:   cem
  
  MFC r357367:
  
  Fix new clang 10.0.0 warnings about converting the result of shift
  operations to a boolean in tpm(4):
  
sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
^
sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
'TPM_CRB_CTRL_CANCEL_CMD'
#define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
  ^
sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
#define BIT(x) (1 << (x))
^
  
  In this case, the intent was to clear the zeroth bit, and leave the rest
  unaffected.  Therefore, the ~ operator should be used instead.
  
  Noticed by:   cem
  
  MFC r357388:
  
  Amend r357367 by using register values from the TPM datasheet.
  
  As Ian Lepore noted, writing ~1 to a register might have a completely
  different effect than doing a regular read-modify-write operation.
  
  Follow the TCG_PC_Client_Platform_TPM_Profile_PTP_2.0_r1.03_v22
  datasheet instead, and use the actual values mentioned there:
  (uint32_t)1 to cancel the command, (uint32_t)0 to clear the field.
  
  MFC r357391 (by kib):
  
  Fix build.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/sys/dev/tpm/tpm_crb.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/dev/tpm/tpm_crb.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/dev/tpm/tpm_crb.c
==
--- stable/11/sys/dev/tpm/tpm_crb.c Tue Feb  4 20:00:45 2020
(r357525)
+++ stable/11/sys/dev/tpm/tpm_crb.c Tue Feb  4 20:09:25 2020
(r357526)
@@ -70,7 +70,8 @@ __FBSDID("$FreeBSD$");
 #defineTPM_CRB_CTRL_STS_ERR_BITBIT(0)
 #defineTPM_CRB_CTRL_STS_IDLE_BIT   BIT(1)
 
-#defineTPM_CRB_CTRL_CANCEL_CMD BIT(0)
+#defineTPM_CRB_CTRL_CANCEL_CMD 0x1
+#defineTPM_CRB_CTRL_CANCEL_CLEAR   0x0
 
 #defineTPM_CRB_CTRL_START_CMD  BIT(0)
 
@@ -299,7 +300,7 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc)
return (false);
}
 
-   WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
+   WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR);
return (true);
 }
 
@@ -331,7 +332,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length)
return (EIO);
}
/* Clear cancellation bit */
-   WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
+   WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR);
 
/* Switch device to idle state if necessary */
if (!(RD4(sc, TPM_CRB_CTRL_STS) & 

svn commit: r357526 - in stable: 11/sys/dev/tpm 12/sys/dev/tpm

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 20:09:25 2020
New Revision: 357526
URL: https://svnweb.freebsd.org/changeset/base/357526

Log:
  MFC r357349:
  
  Merge r357348 from the clang 10.0.0 import branch:
  
  Disable new clang 10.0.0 warnings about converting the result of shift
  operations to a boolean in tpm(4):
  
  sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
^
  sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
'TPM_CRB_CTRL_CANCEL_CMD'
  #define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
  ^
  sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
  #define BIT(x) (1 << (x))
^
  
  Such warnings can be useful in C++ contexts, but not so much in kernel
  drivers, where this type of bit twiddling is commonplace.  So disable it
  for this case.
  
  MFC r357366:
  
  Revert r357349, since the clang 10.0.0 warning was actually correct, and
  the ! operator should have been a ~ instead:
  
Merge r357348 from the clang 10.0.0 import branch:
  
Disable new clang 10.0.0 warnings about converting the result of
shift operations to a boolean in tpm(4):
  
sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
^
sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
'TPM_CRB_CTRL_CANCEL_CMD'
#define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
  ^
sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
#define BIT(x) (1 << (x))
^
  
Such warnings can be useful in C++ contexts, but not so much in kernel
drivers, where this type of bit twiddling is commonplace.  So disable
it for this case.
  
  Noticed by:   cem
  
  MFC r357367:
  
  Fix new clang 10.0.0 warnings about converting the result of shift
  operations to a boolean in tpm(4):
  
sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
^
sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
'TPM_CRB_CTRL_CANCEL_CMD'
#define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
  ^
sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
#define BIT(x) (1 << (x))
^
  
  In this case, the intent was to clear the zeroth bit, and leave the rest
  unaffected.  Therefore, the ~ operator should be used instead.
  
  Noticed by:   cem
  
  MFC r357388:
  
  Amend r357367 by using register values from the TPM datasheet.
  
  As Ian Lepore noted, writing ~1 to a register might have a completely
  different effect than doing a regular read-modify-write operation.
  
  Follow the TCG_PC_Client_Platform_TPM_Profile_PTP_2.0_r1.03_v22
  datasheet instead, and use the actual values mentioned there:
  (uint32_t)1 to cancel the command, (uint32_t)0 to clear the field.
  
  MFC r357391 (by kib):
  
  Fix build.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/12/sys/dev/tpm/tpm_crb.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/tpm/tpm_crb.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/dev/tpm/tpm_crb.c
==
--- stable/12/sys/dev/tpm/tpm_crb.c Tue Feb  4 20:00:45 2020
(r357525)
+++ stable/12/sys/dev/tpm/tpm_crb.c Tue Feb  4 20:09:25 2020
(r357526)
@@ -70,7 +70,8 @@ __FBSDID("$FreeBSD$");
 #defineTPM_CRB_CTRL_STS_ERR_BITBIT(0)
 #defineTPM_CRB_CTRL_STS_IDLE_BIT   BIT(1)
 
-#defineTPM_CRB_CTRL_CANCEL_CMD BIT(0)
+#defineTPM_CRB_CTRL_CANCEL_CMD 0x1
+#defineTPM_CRB_CTRL_CANCEL_CLEAR   0x0
 
 #defineTPM_CRB_CTRL_START_CMD  BIT(0)
 
@@ -299,7 +300,7 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc)
return (false);
}
 
-   WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
+   WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR);
return (true);
 }
 
@@ -331,7 +332,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length)
return (EIO);
}
/* Clear cancellation bit */
-   WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
+   WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR);
 
/* Switch device to idle state if necessary */
if (!(RD4(sc, TPM_CRB_CTRL_STS) & 

svn commit: r357524 - stable/12/share/mk

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:51:26 2020
New Revision: 357524
URL: https://svnweb.freebsd.org/changeset/base/357524

Log:
  MFC r357346:
  
  Merge r357342 from the clang1000-import branch:
  
  Work around two -Werror warning issues in googletest, which have been
  solved upstream in the mean time.
  
  The first issue is because one of googletest's generated headers contain
  classes with a user-declared copy assignment operator, but rely on the
  generation by the compiler of an implicit copy constructor, which is now
  deprecated:
  
  
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8:
 error: definition of implicit copy constructor for 
'CartesianProductHolder3, 
testing::internal::ValueArray3, 
testing::internal::ValueArray4 
>' is deprecated because it has a user-declared copy assignment operator 
[-Werror,-Wdeprecated-copy]
void operator=(const CartesianProductHolder3& other);
 ^
  
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10:
 note: in implicit copy constructor for 
'testing::internal::CartesianProductHolder3,
 testing::internal::ValueArray3, 
testing::internal::ValueArray4 
>' first required here
return internal::CartesianProductHolder3(
   ^
  /usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function 
template specialization 
'testing::Combine, 
testing::internal::ValueArray3, 
testing::internal::ValueArray4 
>' requested here
  Combine(Bool(), /* async read */
  ^
  
  For now, silence the warning using -Wno-deprecated-copy.
  
  The second issue is because one of the googlemock test programs attempts
  to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
  and at best, hazily defined:
  
  contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 
'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0U, BuiltInDefaultValue::Get());
  ^
  contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 
'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0, BuiltInDefaultValue::Get());
 ^
  
  For now, silence the warning using -Wno-signed-unsigned-wchar.

Modified:
  stable/12/share/mk/googletest.test.inc.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/mk/googletest.test.inc.mk
==
--- stable/12/share/mk/googletest.test.inc.mk   Tue Feb  4 19:46:29 2020
(r357523)
+++ stable/12/share/mk/googletest.test.inc.mk   Tue Feb  4 19:51:26 2020
(r357524)
@@ -5,6 +5,18 @@ GTESTS_CXXFLAGS+= -DGTEST_HAS_PTHREAD=1
 GTESTS_CXXFLAGS+= -DGTEST_HAS_STREAM_REDIRECTION=1
 GTESTS_CXXFLAGS+= -frtti
 
+.include 
+
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 10
+# Required until googletest is upgraded to a more recent version (after
+# upstream commit efecb0bfa687cf87836494f5d62868485c00fb66).
+GTESTS_CXXFLAGS+= -Wno-deprecated-copy
+
+# Required until googletest is upgraded to a more recent version (after
+# upstream commit d44b137fd104dfffdcdea103f7de11b9eccc45c2).
+GTESTS_CXXFLAGS+= -Wno-signed-unsigned-wchar
+.endif
+
 # XXX: src.libnames.mk should handle adding this directory for libgtest's,
 # libgmock's, etc, headers.
 CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357523 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_pf 11/usr.sbin/bsnmpd/modules/snmp_pf 12/usr.sbin/bsnmpd/modules/snmp_pf

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:46:29 2020
New Revision: 357523
URL: https://svnweb.freebsd.org/changeset/base/357523

Log:
  MFC r357340:
  
  Merge r357339 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
  
  usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1661:4: error: misleading 
indentation; statement is not part of the previous 'else' 
[-Werror,-Wmisleading-indentation]
  return (-1);
  ^
  usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1658:5: note: previous statement is 
here
  } else
^
  
  The intent was to group the return statement with the previous syslog()
  call.

Modified:
  stable/12/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
  stable/11/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
==
--- stable/12/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Tue Feb  4 19:45:51 
2020(r357522)
+++ stable/12/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Tue Feb  4 19:46:29 
2020(r357523)
@@ -1655,10 +1655,11 @@ altq_is_enabled(int pfdev)
syslog(LOG_INFO, "No ALTQ support in kernel\n"
"ALTQ related functions disabled\n");
return (0);
-   } else
+   } else {
syslog(LOG_ERR, "DIOCGETALTQS returned an error: %s",
strerror(errno));
return (-1);
+   }
}
return (1);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357523 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_pf 11/usr.sbin/bsnmpd/modules/snmp_pf 12/usr.sbin/bsnmpd/modules/snmp_pf

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:46:29 2020
New Revision: 357523
URL: https://svnweb.freebsd.org/changeset/base/357523

Log:
  MFC r357340:
  
  Merge r357339 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
  
  usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1661:4: error: misleading 
indentation; statement is not part of the previous 'else' 
[-Werror,-Wmisleading-indentation]
  return (-1);
  ^
  usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1658:5: note: previous statement is 
here
  } else
^
  
  The intent was to group the return statement with the previous syslog()
  call.

Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
  stable/12/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
==
--- stable/10/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Tue Feb  4 19:45:51 
2020(r357522)
+++ stable/10/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Tue Feb  4 19:46:29 
2020(r357523)
@@ -1648,10 +1648,11 @@ altq_is_enabled(int pfdev)
syslog(LOG_INFO, "No ALTQ support in kernel\n"
"ALTQ related functions disabled\n");
return (0);
-   } else
+   } else {
syslog(LOG_ERR, "DIOCGETALTQS returned an error: %s",
strerror(errno));
return (-1);
+   }
}
return (1);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357523 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_pf 11/usr.sbin/bsnmpd/modules/snmp_pf 12/usr.sbin/bsnmpd/modules/snmp_pf

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:46:29 2020
New Revision: 357523
URL: https://svnweb.freebsd.org/changeset/base/357523

Log:
  MFC r357340:
  
  Merge r357339 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
  
  usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1661:4: error: misleading 
indentation; statement is not part of the previous 'else' 
[-Werror,-Wmisleading-indentation]
  return (-1);
  ^
  usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1658:5: note: previous statement is 
here
  } else
^
  
  The intent was to group the return statement with the previous syslog()
  call.

Modified:
  stable/11/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
  stable/12/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
==
--- stable/11/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Tue Feb  4 19:45:51 
2020(r357522)
+++ stable/11/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c Tue Feb  4 19:46:29 
2020(r357523)
@@ -1650,10 +1650,11 @@ altq_is_enabled(int pfdev)
syslog(LOG_INFO, "No ALTQ support in kernel\n"
"ALTQ related functions disabled\n");
return (0);
-   } else
+   } else {
syslog(LOG_ERR, "DIOCGETALTQS returned an error: %s",
strerror(errno));
return (-1);
+   }
}
return (1);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357521 - in stable: 11/share/mk 11/usr.bin/lex 12/share/mk 12/usr.bin/lex

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:42:57 2020
New Revision: 357521
URL: https://svnweb.freebsd.org/changeset/base/357521

Log:
  MFC r357347:
  
  Merge r357345 from the clang1000-import branch:
  
  Disable new clang 10.0.0 warnings about misleading indentation in flex.
  
  As this is contributed code with very messy indentation, which will
  almost certainly never be upgraded, just disable the warning.

Modified:
  stable/11/share/mk/bsd.sys.mk
  stable/11/usr.bin/lex/Makefile
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/share/mk/bsd.sys.mk
  stable/12/usr.bin/lex/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/share/mk/bsd.sys.mk
==
--- stable/11/share/mk/bsd.sys.mk   Tue Feb  4 19:35:40 2020
(r357520)
+++ stable/11/share/mk/bsd.sys.mk   Tue Feb  4 19:42:57 2020
(r357521)
@@ -104,6 +104,11 @@ CWARNFLAGS.clang+= -Wno-parentheses
 .if defined(NO_WARRAY_BOUNDS)
 CWARNFLAGS.clang+= -Wno-array-bounds
 .endif # NO_WARRAY_BOUNDS
+.if defined(NO_WMISLEADING_INDENTATION) && \
+((${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 10) || \
+ (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100))
+CWARNFLAGS+=   -Wno-misleading-indentation
+.endif # NO_WMISLEADING_INDENTATION
 .endif # WARNS
 
 .if defined(FORMAT_AUDIT)
@@ -146,8 +151,7 @@ CWARNFLAGS+=-Wno-error=address  
\
 
 # GCC 6.1.0
 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100
-CWARNFLAGS+=   -Wno-error=misleading-indentation   \
-   -Wno-error=nonnull-compare  \
+CWARNFLAGS+=   -Wno-error=nonnull-compare  \
-Wno-error=shift-negative-value \
-Wno-error=tautological-compare \
-Wno-error=unused-const-variable

Modified: stable/11/usr.bin/lex/Makefile
==
--- stable/11/usr.bin/lex/Makefile  Tue Feb  4 19:35:40 2020
(r357520)
+++ stable/11/usr.bin/lex/Makefile  Tue Feb  4 19:42:57 2020
(r357521)
@@ -32,6 +32,8 @@ MLINKS+=  lex.1 lex++.1
 
 WARNS?=3
 
+NO_WMISLEADING_INDENTATION=
+
 CLEANFILES=scan.c skel.c
 GENFILES=  parse.c parse.h scan.c skel.c
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357521 - in stable: 11/share/mk 11/usr.bin/lex 12/share/mk 12/usr.bin/lex

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:42:57 2020
New Revision: 357521
URL: https://svnweb.freebsd.org/changeset/base/357521

Log:
  MFC r357347:
  
  Merge r357345 from the clang1000-import branch:
  
  Disable new clang 10.0.0 warnings about misleading indentation in flex.
  
  As this is contributed code with very messy indentation, which will
  almost certainly never be upgraded, just disable the warning.

Modified:
  stable/12/share/mk/bsd.sys.mk
  stable/12/usr.bin/lex/Makefile
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/share/mk/bsd.sys.mk
  stable/11/usr.bin/lex/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/share/mk/bsd.sys.mk
==
--- stable/12/share/mk/bsd.sys.mk   Tue Feb  4 19:35:40 2020
(r357520)
+++ stable/12/share/mk/bsd.sys.mk   Tue Feb  4 19:42:57 2020
(r357521)
@@ -108,6 +108,11 @@ CWARNFLAGS.clang+= -Wno-parentheses
 .if defined(NO_WARRAY_BOUNDS)
 CWARNFLAGS.clang+= -Wno-array-bounds
 .endif # NO_WARRAY_BOUNDS
+.if defined(NO_WMISLEADING_INDENTATION) && \
+((${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 10) || \
+ (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100))
+CWARNFLAGS+=   -Wno-misleading-indentation
+.endif # NO_WMISLEADING_INDENTATION
 .endif # WARNS
 
 .if defined(FORMAT_AUDIT)
@@ -151,8 +156,7 @@ CWARNFLAGS+=-Wno-error=address  
\
 
 # GCC 6.1.0
 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100
-CWARNFLAGS+=   -Wno-error=misleading-indentation   \
-   -Wno-error=nonnull-compare  \
+CWARNFLAGS+=   -Wno-error=nonnull-compare  \
-Wno-error=shift-negative-value \
-Wno-error=tautological-compare \
-Wno-error=unused-const-variable

Modified: stable/12/usr.bin/lex/Makefile
==
--- stable/12/usr.bin/lex/Makefile  Tue Feb  4 19:35:40 2020
(r357520)
+++ stable/12/usr.bin/lex/Makefile  Tue Feb  4 19:42:57 2020
(r357521)
@@ -32,6 +32,8 @@ MLINKS+=  lex.1 lex++.1
 
 WARNS?=3
 
+NO_WMISLEADING_INDENTATION=
+
 CLEANFILES=scan.c skel.c
 GENFILES=  parse.c parse.h scan.c skel.c
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357520 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_bridge 11/usr.sbin/bsnmpd/modules/snmp_bridge 12/usr.sbin/bsnmpd/modules/snmp_bridge

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:35:40 2020
New Revision: 357520
URL: https://svnweb.freebsd.org/changeset/base/357520

Log:
  MFC r357272:
  
  Merge r357271 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
  
  usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c:1235:43: error: overlapping 
comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
  begemotBridgeStpPortEnable_enabled ||
  ~~~^~
  
  Work around it by casting the enum values to the type of val->v.integer.

Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
  stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
==
--- stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb  4 
19:31:01 2020(r357519)
+++ stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb  4 
19:35:40 2020(r357520)
@@ -1229,9 +1229,9 @@ op_begemot_stp_port(struct snmp_context *ctx, struct s
 
case LEAF_begemotBridgeStpPortEnable:
if (val->v.integer !=
-   begemotBridgeStpPortEnable_enabled ||
+   (int32_t)begemotBridgeStpPortEnable_enabled ||
val->v.integer !=
-   begemotBridgeStpPortEnable_disabled)
+   (int32_t)begemotBridgeStpPortEnable_disabled)
return (SNMP_ERR_WRONG_VALUE);
 
ctx->scratch->int1 = bp->enable;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357520 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_bridge 11/usr.sbin/bsnmpd/modules/snmp_bridge 12/usr.sbin/bsnmpd/modules/snmp_bridge

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:35:40 2020
New Revision: 357520
URL: https://svnweb.freebsd.org/changeset/base/357520

Log:
  MFC r357272:
  
  Merge r357271 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
  
  usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c:1235:43: error: overlapping 
comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
  begemotBridgeStpPortEnable_enabled ||
  ~~~^~
  
  Work around it by casting the enum values to the type of val->v.integer.

Modified:
  stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
  stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
==
--- stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb  4 
19:31:01 2020(r357519)
+++ stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb  4 
19:35:40 2020(r357520)
@@ -1231,9 +1231,9 @@ op_begemot_stp_port(struct snmp_context *ctx, struct s
 
case LEAF_begemotBridgeStpPortEnable:
if (val->v.integer !=
-   begemotBridgeStpPortEnable_enabled ||
+   (int32_t)begemotBridgeStpPortEnable_enabled ||
val->v.integer !=
-   begemotBridgeStpPortEnable_disabled)
+   (int32_t)begemotBridgeStpPortEnable_disabled)
return (SNMP_ERR_WRONG_VALUE);
 
ctx->scratch->int1 = bp->enable;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357520 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_bridge 11/usr.sbin/bsnmpd/modules/snmp_bridge 12/usr.sbin/bsnmpd/modules/snmp_bridge

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:35:40 2020
New Revision: 357520
URL: https://svnweb.freebsd.org/changeset/base/357520

Log:
  MFC r357272:
  
  Merge r357271 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
  
  usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c:1235:43: error: overlapping 
comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
  begemotBridgeStpPortEnable_enabled ||
  ~~~^~
  
  Work around it by casting the enum values to the type of val->v.integer.

Modified:
  stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
  stable/11/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
==
--- stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb  4 
19:31:01 2020(r357519)
+++ stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Tue Feb  4 
19:35:40 2020(r357520)
@@ -1232,9 +1232,9 @@ op_begemot_stp_port(struct snmp_context *ctx, struct s
 
case LEAF_begemotBridgeStpPortEnable:
if (val->v.integer !=
-   begemotBridgeStpPortEnable_enabled ||
+   (int32_t)begemotBridgeStpPortEnable_enabled ||
val->v.integer !=
-   begemotBridgeStpPortEnable_disabled)
+   (int32_t)begemotBridgeStpPortEnable_disabled)
return (SNMP_ERR_WRONG_VALUE);
 
ctx->scratch->int1 = bp->enable;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357519 - in stable: 10/usr.bin/procstat 11/usr.bin/procstat 12/usr.bin/procstat

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:31:01 2020
New Revision: 357519
URL: https://svnweb.freebsd.org/changeset/base/357519

Log:
  MFC r357268:
  
  Merge r357260 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in procstat:
  
  usr.bin/procstat/procstat_sigs.c:79:3: error: misleading indentation; 
statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
  xo_close_container(name);
  ^
  usr.bin/procstat/procstat_sigs.c:77:4: note: previous statement is here
  } else
^
  
  The intent was to group the xo_close_container() call to the previous
  snprintf() call.

Modified:
  stable/10/usr.bin/procstat/procstat_sigs.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.bin/procstat/procstat_sigs.c
  stable/12/usr.bin/procstat/procstat_sigs.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/usr.bin/procstat/procstat_sigs.c
==
--- stable/10/usr.bin/procstat/procstat_sigs.c  Tue Feb  4 19:24:10 2020
(r357518)
+++ stable/10/usr.bin/procstat/procstat_sigs.c  Tue Feb  4 19:31:01 2020
(r357519)
@@ -52,8 +52,9 @@ procstat_print_signame(int sig)
for (i = 0; name[i] != 0; i++)
name[i] = toupper(name[i]);
printf("%-7s ", name);
-   } else
+   } else {
printf("%-7d ", sig);
+   }
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357519 - in stable: 10/usr.bin/procstat 11/usr.bin/procstat 12/usr.bin/procstat

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:31:01 2020
New Revision: 357519
URL: https://svnweb.freebsd.org/changeset/base/357519

Log:
  MFC r357268:
  
  Merge r357260 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in procstat:
  
  usr.bin/procstat/procstat_sigs.c:79:3: error: misleading indentation; 
statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
  xo_close_container(name);
  ^
  usr.bin/procstat/procstat_sigs.c:77:4: note: previous statement is here
  } else
^
  
  The intent was to group the xo_close_container() call to the previous
  snprintf() call.

Modified:
  stable/11/usr.bin/procstat/procstat_sigs.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.bin/procstat/procstat_sigs.c
  stable/12/usr.bin/procstat/procstat_sigs.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/usr.bin/procstat/procstat_sigs.c
==
--- stable/11/usr.bin/procstat/procstat_sigs.c  Tue Feb  4 19:24:10 2020
(r357518)
+++ stable/11/usr.bin/procstat/procstat_sigs.c  Tue Feb  4 19:31:01 2020
(r357519)
@@ -74,9 +74,10 @@ procstat_close_signame(int sig)
for (i = 0; name[i] != 0; i++)
name[i] = toupper(name[i]);
xo_close_container(name);
-   } else
+   } else {
snprintf(name, 12, "%d", sig);
xo_close_container(name);
+   }
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357519 - in stable: 10/usr.bin/procstat 11/usr.bin/procstat 12/usr.bin/procstat

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:31:01 2020
New Revision: 357519
URL: https://svnweb.freebsd.org/changeset/base/357519

Log:
  MFC r357268:
  
  Merge r357260 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in procstat:
  
  usr.bin/procstat/procstat_sigs.c:79:3: error: misleading indentation; 
statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
  xo_close_container(name);
  ^
  usr.bin/procstat/procstat_sigs.c:77:4: note: previous statement is here
  } else
^
  
  The intent was to group the xo_close_container() call to the previous
  snprintf() call.

Modified:
  stable/12/usr.bin/procstat/procstat_sigs.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.bin/procstat/procstat_sigs.c
  stable/11/usr.bin/procstat/procstat_sigs.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/usr.bin/procstat/procstat_sigs.c
==
--- stable/12/usr.bin/procstat/procstat_sigs.c  Tue Feb  4 19:24:10 2020
(r357518)
+++ stable/12/usr.bin/procstat/procstat_sigs.c  Tue Feb  4 19:31:01 2020
(r357519)
@@ -74,9 +74,10 @@ procstat_close_signame(int sig)
for (i = 0; name[i] != 0; i++)
name[i] = toupper(name[i]);
xo_close_container(name);
-   } else
+   } else {
snprintf(name, 12, "%d", sig);
xo_close_container(name);
+   }
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357518 - in stable: 10/usr.bin/tip/tip 11/usr.bin/tip/tip 12/usr.bin/tip/tip

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:24:10 2020
New Revision: 357518
URL: https://svnweb.freebsd.org/changeset/base/357518

Log:
  MFC r357269:
  
  Merge r357267 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in tip:
  
  usr.bin/tip/tip/tip.c:428:4: error: misleading indentation; statement is not 
part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (gch == EOF)
  ^
  usr.bin/tip/tip/tip.c:426:5: note: previous statement is here
  } else if (!cumode && gch == character(value(FORCE)))
^
  
  The intent was to have the EOF check grouped with the getchar() call
  just above it.  This was accidentally introduced in r354624.

Modified:
  stable/11/usr.bin/tip/tip/tip.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.bin/tip/tip/tip.c
  stable/12/usr.bin/tip/tip/tip.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/usr.bin/tip/tip/tip.c
==
--- stable/11/usr.bin/tip/tip/tip.c Tue Feb  4 19:19:48 2020
(r357517)
+++ stable/11/usr.bin/tip/tip/tip.c Tue Feb  4 19:24:10 2020
(r357518)
@@ -421,11 +421,12 @@ tipin(void)
if (boolean(value(HALFDUPLEX)))
printf("\r\n");
continue;
-   } else if (!cumode && gch == character(value(FORCE)))
+   } else if (!cumode && gch == character(value(FORCE))) {
gch = getchar();
if (gch == EOF)
return;
gch = gch & STRIP_PAR;
+   }
bol = any(gch, value(EOL));
if (boolean(value(RAISE)) && islower(gch))
gch = toupper(gch);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357518 - in stable: 10/usr.bin/tip/tip 11/usr.bin/tip/tip 12/usr.bin/tip/tip

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:24:10 2020
New Revision: 357518
URL: https://svnweb.freebsd.org/changeset/base/357518

Log:
  MFC r357269:
  
  Merge r357267 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in tip:
  
  usr.bin/tip/tip/tip.c:428:4: error: misleading indentation; statement is not 
part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (gch == EOF)
  ^
  usr.bin/tip/tip/tip.c:426:5: note: previous statement is here
  } else if (!cumode && gch == character(value(FORCE)))
^
  
  The intent was to have the EOF check grouped with the getchar() call
  just above it.  This was accidentally introduced in r354624.

Modified:
  stable/12/usr.bin/tip/tip/tip.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/usr.bin/tip/tip/tip.c
  stable/11/usr.bin/tip/tip/tip.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/usr.bin/tip/tip/tip.c
==
--- stable/12/usr.bin/tip/tip/tip.c Tue Feb  4 19:19:48 2020
(r357517)
+++ stable/12/usr.bin/tip/tip/tip.c Tue Feb  4 19:24:10 2020
(r357518)
@@ -423,11 +423,12 @@ tipin(void)
if (boolean(value(HALFDUPLEX)))
printf("\r\n");
continue;
-   } else if (!cumode && gch == character(value(FORCE)))
+   } else if (!cumode && gch == character(value(FORCE))) {
gch = getchar();
if (gch == EOF)
return;
gch = gch & STRIP_PAR;
+   }
bol = any(gch, value(EOL));
if (boolean(value(RAISE)) && islower(gch))
gch = toupper(gch);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357518 - in stable: 10/usr.bin/tip/tip 11/usr.bin/tip/tip 12/usr.bin/tip/tip

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:24:10 2020
New Revision: 357518
URL: https://svnweb.freebsd.org/changeset/base/357518

Log:
  MFC r357269:
  
  Merge r357267 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in tip:
  
  usr.bin/tip/tip/tip.c:428:4: error: misleading indentation; statement is not 
part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (gch == EOF)
  ^
  usr.bin/tip/tip/tip.c:426:5: note: previous statement is here
  } else if (!cumode && gch == character(value(FORCE)))
^
  
  The intent was to have the EOF check grouped with the getchar() call
  just above it.  This was accidentally introduced in r354624.

Modified:
  stable/10/usr.bin/tip/tip/tip.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.bin/tip/tip/tip.c
  stable/12/usr.bin/tip/tip/tip.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/usr.bin/tip/tip/tip.c
==
--- stable/10/usr.bin/tip/tip/tip.c Tue Feb  4 19:19:48 2020
(r357517)
+++ stable/10/usr.bin/tip/tip/tip.c Tue Feb  4 19:24:10 2020
(r357518)
@@ -417,8 +417,9 @@ tipin(void)
if (boolean(value(HALFDUPLEX)))
printf("\r\n");
continue;
-   } else if (!cumode && gch == character(value(FORCE)))
+   } else if (!cumode && gch == character(value(FORCE))) {
gch = getchar()_PAR;
+   }
bol = any(gch, value(EOL));
if (boolean(value(RAISE)) && islower(gch))
gch = toupper(gch);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357517 - in stable: 10/libexec/rbootd 11/libexec/rbootd 12/libexec/rbootd

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:19:48 2020
New Revision: 357517
URL: https://svnweb.freebsd.org/changeset/base/357517

Log:
  MFC r357223:
  
  Merge r357222 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in rbootd:
  
  libexec/rbootd/rmpproto.c:335:49: error: multiple unsequenced modifications 
to 'filename' [-Werror,-Wunsequenced]
  filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
   ~ ^

Modified:
  stable/12/libexec/rbootd/rmpproto.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/libexec/rbootd/rmpproto.c
  stable/11/libexec/rbootd/rmpproto.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/libexec/rbootd/rmpproto.c
==
--- stable/12/libexec/rbootd/rmpproto.c Tue Feb  4 19:15:57 2020
(r357516)
+++ stable/12/libexec/rbootd/rmpproto.c Tue Feb  4 19:19:48 2020
(r357517)
@@ -332,7 +332,8 @@ SendBootRepl(struct rmp_packet *req, RMPCONN *rconn, c
 *  stripped file name and spoof the client into thinking that it
 *  really got what it wanted.
 */
-   filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
+   filename = strrchr(filepath,'/');
+   filename = filename? filename + 1: filepath;
 
/*
 *  Check that this is a valid boot file name.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357517 - in stable: 10/libexec/rbootd 11/libexec/rbootd 12/libexec/rbootd

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:19:48 2020
New Revision: 357517
URL: https://svnweb.freebsd.org/changeset/base/357517

Log:
  MFC r357223:
  
  Merge r357222 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in rbootd:
  
  libexec/rbootd/rmpproto.c:335:49: error: multiple unsequenced modifications 
to 'filename' [-Werror,-Wunsequenced]
  filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
   ~ ^

Modified:
  stable/10/libexec/rbootd/rmpproto.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/libexec/rbootd/rmpproto.c
  stable/12/libexec/rbootd/rmpproto.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/libexec/rbootd/rmpproto.c
==
--- stable/10/libexec/rbootd/rmpproto.c Tue Feb  4 19:15:57 2020
(r357516)
+++ stable/10/libexec/rbootd/rmpproto.c Tue Feb  4 19:19:48 2020
(r357517)
@@ -330,7 +330,8 @@ SendBootRepl(struct rmp_packet *req, RMPCONN *rconn, c
 *  stripped file name and spoof the client into thinking that it
 *  really got what it wanted.
 */
-   filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
+   filename = strrchr(filepath,'/');
+   filename = filename? filename + 1: filepath;
 
/*
 *  Check that this is a valid boot file name.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357517 - in stable: 10/libexec/rbootd 11/libexec/rbootd 12/libexec/rbootd

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:19:48 2020
New Revision: 357517
URL: https://svnweb.freebsd.org/changeset/base/357517

Log:
  MFC r357223:
  
  Merge r357222 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in rbootd:
  
  libexec/rbootd/rmpproto.c:335:49: error: multiple unsequenced modifications 
to 'filename' [-Werror,-Wunsequenced]
  filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
   ~ ^

Modified:
  stable/11/libexec/rbootd/rmpproto.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/libexec/rbootd/rmpproto.c
  stable/12/libexec/rbootd/rmpproto.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/libexec/rbootd/rmpproto.c
==
--- stable/11/libexec/rbootd/rmpproto.c Tue Feb  4 19:15:57 2020
(r357516)
+++ stable/11/libexec/rbootd/rmpproto.c Tue Feb  4 19:19:48 2020
(r357517)
@@ -330,7 +330,8 @@ SendBootRepl(struct rmp_packet *req, RMPCONN *rconn, c
 *  stripped file name and spoof the client into thinking that it
 *  really got what it wanted.
 */
-   filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
+   filename = strrchr(filepath,'/');
+   filename = filename? filename + 1: filepath;
 
/*
 *  Check that this is a valid boot file name.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357516 - stable/11/sbin/newfs_msdos

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:15:57 2020
New Revision: 357516
URL: https://svnweb.freebsd.org/changeset/base/357516

Log:
  MFC r351382 (by delphij):
  
  When creating a new FAT32 filesystem, use "unknown" (0x) for
  FSI_Nxt_Free instead of providing a wrong value.
  
  With this change, fsck_msdosfs would no longer complain about invalid
  FSInfo information.
  
  MFC r355317 (by delphij):
  
  newfs_msdos: -A is incompatible with -r, not -o.
  
  PR:   242314
  Submitted by: Guy Yur 
  
  MFC r357227:
  
  Merge r357225 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in newfs_msdos:
  
  sbin/newfs_msdos/newfs_msdos.c:181:2: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (o.align) {
  ^
  sbin/newfs_msdos/newfs_msdos.c:179:5: note: previous statement is here
  if (argc < 1 || argc > 2)
  ^

Modified:
  stable/11/sbin/newfs_msdos/mkfs_msdos.c
  stable/11/sbin/newfs_msdos/newfs_msdos.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/newfs_msdos/mkfs_msdos.c
==
--- stable/11/sbin/newfs_msdos/mkfs_msdos.c Tue Feb  4 19:05:58 2020
(r357515)
+++ stable/11/sbin/newfs_msdos/mkfs_msdos.c Tue Feb  4 19:15:57 2020
(r357516)
@@ -715,7 +715,7 @@ mkfs_msdos(const char *fname, const char *dtype, const
mk4(img, 0x41615252);
mk4(img + MINBPS - 28, 0x61417272);
mk4(img + MINBPS - 24, 0x);
-   mk4(img + MINBPS - 20, bpb.bpbRootClust);
+   mk4(img + MINBPS - 20, 0x);
mk2(img + MINBPS - 2, DOSMAGIC);
} else if (lsn >= bpb.bpbResSectors && lsn < dir &&
   !((lsn - bpb.bpbResSectors) %

Modified: stable/11/sbin/newfs_msdos/newfs_msdos.c
==
--- stable/11/sbin/newfs_msdos/newfs_msdos.cTue Feb  4 19:05:58 2020
(r357515)
+++ stable/11/sbin/newfs_msdos/newfs_msdos.cTue Feb  4 19:15:57 2020
(r357516)
@@ -178,10 +178,10 @@ main(int argc, char *argv[])
 argv += optind;
 if (argc < 1 || argc > 2)
usage();
-   if (o.align) {
-   if (o.hidden_sectors_set)
-   errx(1, "align (-A) is incompatible with -r");
-   }
+if (o.align) {
+   if (o.reserved_sectors)
+   errx(1, "align (-A) is incompatible with -r");
+}
 fname = *argv++;
 if (!o.create_size && !strchr(fname, '/')) {
snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357513 - stable/12/sbin/newfs_msdos

2020-02-04 Thread Dimitry Andric
Author: dim
Date: Tue Feb  4 19:01:17 2020
New Revision: 357513
URL: https://svnweb.freebsd.org/changeset/base/357513

Log:
  MFC r357227:
  
  Merge r357225 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in newfs_msdos:
  
  sbin/newfs_msdos/newfs_msdos.c:181:2: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (o.align) {
  ^
  sbin/newfs_msdos/newfs_msdos.c:179:5: note: previous statement is here
  if (argc < 1 || argc > 2)
  ^

Modified:
  stable/12/sbin/newfs_msdos/newfs_msdos.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/newfs_msdos/newfs_msdos.c
==
--- stable/12/sbin/newfs_msdos/newfs_msdos.cTue Feb  4 18:56:26 2020
(r357512)
+++ stable/12/sbin/newfs_msdos/newfs_msdos.cTue Feb  4 19:01:17 2020
(r357513)
@@ -178,10 +178,10 @@ main(int argc, char *argv[])
 argv += optind;
 if (argc < 1 || argc > 2)
usage();
-   if (o.align) {
-   if (o.reserved_sectors)
-   errx(1, "align (-A) is incompatible with -r");
-   }
+if (o.align) {
+   if (o.reserved_sectors)
+   errx(1, "align (-A) is incompatible with -r");
+}
 fname = *argv++;
 if (!o.create_size && !strchr(fname, '/')) {
snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357388 - head/sys/dev/tpm

2020-02-01 Thread Dimitry Andric
Author: dim
Date: Sat Feb  1 21:43:45 2020
New Revision: 357388
URL: https://svnweb.freebsd.org/changeset/base/357388

Log:
  Amend r357367 by using register values from the TPM datasheet.
  
  As Ian Lepore noted, writing ~1 to a register might have a completely
  different effect than doing a regular read-modify-write operation.
  
  Follow the TCG_PC_Client_Platform_TPM_Profile_PTP_2.0_r1.03_v22
  datasheet instead, and use the actual values mentioned there:
  (uint32_t)1 to cancel the command, (uint32_t)0 to clear the field.
  
  MFC after:3 days

Modified:
  head/sys/dev/tpm/tpm_crb.c

Modified: head/sys/dev/tpm/tpm_crb.c
==
--- head/sys/dev/tpm/tpm_crb.c  Sat Feb  1 20:38:38 2020(r357387)
+++ head/sys/dev/tpm/tpm_crb.c  Sat Feb  1 21:43:45 2020(r357388)
@@ -70,7 +70,8 @@ __FBSDID("$FreeBSD$");
 #defineTPM_CRB_CTRL_STS_ERR_BITBIT(0)
 #defineTPM_CRB_CTRL_STS_IDLE_BIT   BIT(1)
 
-#defineTPM_CRB_CTRL_CANCEL_CMD BIT(0)
+#defineTPM_CRB_CTRL_CANCEL_CMD 0x1
+#defineTPM_CRB_CTRL_CANCEL_CLEAR   0x0
 
 #defineTPM_CRB_CTRL_START_CMD  BIT(0)
 
@@ -298,7 +299,7 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc)
return (false);
}
 
-   WR4(sc, TPM_CRB_CTRL_CANCEL, ~TPM_CRB_CTRL_CANCEL_CMD);
+   WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR;
return (true);
 }
 
@@ -330,7 +331,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length)
return (EIO);
}
/* Clear cancellation bit */
-   WR4(sc, TPM_CRB_CTRL_CANCEL, ~TPM_CRB_CTRL_CANCEL_CMD);
+   WR4(sc, TPM_CRB_CTRL_CANCEL, TPM_CRB_CTRL_CANCEL_CLEAR;
 
/* Switch device to idle state if necessary */
if (!(RD4(sc, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_IDLE_BIT)) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r357349 - in head/sys: conf modules/tpm

2020-02-01 Thread Dimitry Andric
On 1 Feb 2020, at 18:55, Ian Lepore  wrote:
> 
> On Fri, 2020-01-31 at 19:36 +, Dimitry Andric wrote:
>> Author: dim
>> Date: Fri Jan 31 19:36:14 2020
>> New Revision: 357349
>> URL: https://svnweb.freebsd.org/changeset/base/357349
>> 
>> Log:
>>  Merge r357348 from the clang 10.0.0 import branch:
>> 
>>  Disable new clang 10.0.0 warnings about converting the result of shift
>>  operations to a boolean in tpm(4):
>> 
>>  sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
>> boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
>>  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
>>^
>>  sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
>> 'TPM_CRB_CTRL_CANCEL_CMD'
>>  #define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
>>  ^
>>  sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
>>  #define BIT(x) (1 << (x))
>>^
>> 
>>  Such warnings can be useful in C++ contexts, but not so much in kernel
>>  drivers, where this type of bit twiddling is commonplace.  So disable it
>>  for this case.
>> 
> 
> I think the point of the compiler warning about shift in a boolean
> context is the same as warning about assignment in a boolean
> context.  I.e,
> 
>   if (a << 3)
> 
> might be a typo for
> 
>   if (a < 3)
> 
> in the same way as "a = 3" might have been intended to be "a == 3".

Yes, clang inherited this warning from gcc, where it says in:
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-in-bool-context

-Wint-in-bool-context
  Warn for suspicious use of integer values where boolean values are
  expected, such as conditional expressions (?:) using non-boolean
  integer constants in boolean context, like if (a <= b ? 2 : 3). Or
  left shifting of signed integers in boolean context, like for (a = 0;
  1 << a; a++);. Likewise for all kinds of multiplications regardless of
  the data type. This warning is enabled by -Wall.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: svn commit: r357349 - in head/sys: conf modules/tpm

2020-02-01 Thread Dimitry Andric
On 1 Feb 2020, at 18:48, Ian Lepore  wrote:
> 
> On Fri, 2020-01-31 at 23:36 +0100, Dimitry Andric wrote:
>> Hmm yes, you are quite right.  Other parts of the code also seem to
>> use ~TPM_XXX, and the WR4() inline function called takes a
>> uint32_t.  I'll revert my change and apply the tilde version instead!
>> 
>> -Dimitry
>> 
> 
> So you're going to switch from writing 0 to writing 0xfffe, and
> just assume that will work the same?  Like, without looking at the
> datasheet or TRM for the device?  Surely those other 31 bits you're
> turning on in a control register can't do anything important, can they?

Hmm, the data sheet says:

Writes ( 0001h): Cancel a command
Writes ( h): Clears field when command has been cancelled

It seems the other bits in the register are not used for anything.

So indeed it is probably better to explicitly define these values as 0x0
and 0x1, and not use ~ or ! operators at all.


> I haven't looked at the code, but I'll bet the other places that are
> using ~SYMBOLNAME are doing so in the context of read-modify-write in a
> way that preserves existing bits, which is completely different than
> just turning on 31 bits as a side effect of turning one bit off.

There aren't many places, but they tend to use the AND4() and OR4()
inline functions, which do are more usual pattern of read-modify-write.

I'll fix up the code again...

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r357367 - head/sys/dev/tpm

2020-02-01 Thread Dimitry Andric
Author: dim
Date: Sat Feb  1 17:02:26 2020
New Revision: 357367
URL: https://svnweb.freebsd.org/changeset/base/357367

Log:
  Fix new clang 10.0.0 warnings about converting the result of shift
  operations to a boolean in tpm(4):
  
sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
^
sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
'TPM_CRB_CTRL_CANCEL_CMD'
#define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
  ^
sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
#define BIT(x) (1 << (x))
^
  
  In this case, the intent was to clear the zeroth bit, and leave the rest
  unaffected.  Therefore, the ~ operator should be used instead.
  
  Noticed by:   cem
  MFC after:3 days

Modified:
  head/sys/dev/tpm/tpm_crb.c

Modified: head/sys/dev/tpm/tpm_crb.c
==
--- head/sys/dev/tpm/tpm_crb.c  Sat Feb  1 16:57:04 2020(r357366)
+++ head/sys/dev/tpm/tpm_crb.c  Sat Feb  1 17:02:26 2020(r357367)
@@ -298,7 +298,7 @@ tpmcrb_cancel_cmd(struct tpm_sc *sc)
return (false);
}
 
-   WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
+   WR4(sc, TPM_CRB_CTRL_CANCEL, ~TPM_CRB_CTRL_CANCEL_CMD);
return (true);
 }
 
@@ -330,7 +330,7 @@ tpmcrb_transmit(struct tpm_sc *sc, size_t length)
return (EIO);
}
/* Clear cancellation bit */
-   WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
+   WR4(sc, TPM_CRB_CTRL_CANCEL, ~TPM_CRB_CTRL_CANCEL_CMD);
 
/* Switch device to idle state if necessary */
if (!(RD4(sc, TPM_CRB_CTRL_STS) & TPM_CRB_CTRL_STS_IDLE_BIT)) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357366 - in head/sys: conf modules/tpm

2020-02-01 Thread Dimitry Andric
Author: dim
Date: Sat Feb  1 16:57:04 2020
New Revision: 357366
URL: https://svnweb.freebsd.org/changeset/base/357366

Log:
  Revert r357349, since the clang 10.0.0 warning was actually correct, and
  the ! operator should have been a ~ instead:
  
Merge r357348 from the clang 10.0.0 import branch:
  
Disable new clang 10.0.0 warnings about converting the result of
shift operations to a boolean in tpm(4):
  
sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
^
sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
'TPM_CRB_CTRL_CANCEL_CMD'
#define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
  ^
sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
#define BIT(x) (1 << (x))
^
  
Such warnings can be useful in C++ contexts, but not so much in kernel
drivers, where this type of bit twiddling is commonplace.  So disable
it for this case.
  
  Noticed by:   cem
  MFC after:3 days

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/kern.mk
  head/sys/modules/tpm/Makefile
Directory Properties:
  head/   (props changed)

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Sat Feb  1 11:31:45 2020(r357365)
+++ head/sys/conf/files.amd64   Sat Feb  1 16:57:04 2020(r357366)
@@ -323,8 +323,7 @@ dev/syscons/scvesactl.c optionalsc vga 
vesa
 dev/syscons/scvgarndr.coptionalsc vga
 dev/tpm/tpm.c  optionaltpm
 dev/tpm/tpm20.coptionaltpm
-dev/tpm/tpm_crb.c  optionaltpm acpi \
-   compile-with "${NORMAL_C} ${NO_WINT_IN_BOOL_CONTEXT}"
+dev/tpm/tpm_crb.c  optionaltpm acpi
 dev/tpm/tpm_tis.c  optionaltpm acpi
 dev/tpm/tpm_acpi.c optionaltpm acpi
 dev/tpm/tpm_isa.c  optionaltpm isa

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Sat Feb  1 11:31:45 2020(r357365)
+++ head/sys/conf/kern.mk   Sat Feb  1 16:57:04 2020(r357366)
@@ -37,9 +37,6 @@ CWARNEXTRA+=  -Wno-error-shift-negative-value
 .if ${COMPILER_VERSION} >= 4
 CWARNEXTRA+=   -Wno-address-of-packed-member
 .endif
-.if ${COMPILER_VERSION} >= 10
-NO_WINT_IN_BOOL_CONTEXT=   -Wno-int-in-bool-context
-.endif
 .endif
 
 .if ${COMPILER_TYPE} == "gcc"

Modified: head/sys/modules/tpm/Makefile
==
--- head/sys/modules/tpm/Makefile   Sat Feb  1 11:31:45 2020
(r357365)
+++ head/sys/modules/tpm/Makefile   Sat Feb  1 16:57:04 2020
(r357366)
@@ -11,5 +11,3 @@ SRCS+=tpm_isa.c tpm_acpi.c isa_if.h opt_acpi.h acpi_i
 SRCS+= tpm20.c tpm_crb.c tpm_tis.c opt_tpm.h
 
 .include 
-
-CWARNFLAGS.tpm_crb.c+= ${NO_WINT_IN_BOOL_CONTEXT}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r357349 - in head/sys: conf modules/tpm

2020-01-31 Thread Dimitry Andric
Hmm yes, you are quite right.  Other parts of the code also seem to use 
~TPM_XXX, and the WR4() inline function called takes a uint32_t.  I'll revert 
my change and apply the tilde version instead!

-Dimitry

> On 31 Jan 2020, at 22:13, Conrad Meyer  wrote:
> 
> Hi Dimitry,
> 
> Do you think maybe the intent is to use ~TPM_CRB_CTRL_CANCEL_CMD
> instead?  Plain "0" might also make sense.  But I think the compiler
> is right here and the warning should not be disabled — !BIT(foo)
> doesn't really make sense for a register.  It happens to affect the
> right bit only because CANCEL_CMD is BIT(0).
> 
> Thanks,
> Conrad
> 
> On Fri, Jan 31, 2020 at 11:36 AM Dimitry Andric  wrote:
>> 
>> Author: dim
>> Date: Fri Jan 31 19:36:14 2020
>> New Revision: 357349
>> URL: https://svnweb.freebsd.org/changeset/base/357349
>> 
>> Log:
>>  Merge r357348 from the clang 10.0.0 import branch:
>> 
>>  Disable new clang 10.0.0 warnings about converting the result of shift
>>  operations to a boolean in tpm(4):
>> 
>>  sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
>> boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
>>  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
>>^
>>  sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
>> 'TPM_CRB_CTRL_CANCEL_CMD'
>>  #define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
>>  ^
>>  sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
>>  #define BIT(x) (1 << (x))
>>^
>> 
>>  Such warnings can be useful in C++ contexts, but not so much in kernel
>>  drivers, where this type of bit twiddling is commonplace.  So disable it
>>  for this case.
>> 
>>  MFC after:3 days
>> 
>> Modified:
>>  head/sys/conf/files.amd64
>>  head/sys/conf/kern.mk
>>  head/sys/modules/tpm/Makefile
>> Directory Properties:
>>  head/   (props changed)
>> 
>> Modified: head/sys/conf/files.amd64
>> ==
>> --- head/sys/conf/files.amd64   Fri Jan 31 19:35:21 2020(r357348)
>> +++ head/sys/conf/files.amd64   Fri Jan 31 19:36:14 2020(r357349)
>> @@ -323,7 +323,8 @@ dev/syscons/scvesactl.c optionalsc 
>> vga vesa
>> dev/syscons/scvgarndr.coptionalsc vga
>> dev/tpm/tpm.c  optionaltpm
>> dev/tpm/tpm20.coptionaltpm
>> -dev/tpm/tpm_crb.c  optionaltpm acpi
>> +dev/tpm/tpm_crb.c  optionaltpm acpi \
>> +   compile-with "${NORMAL_C} ${NO_WINT_IN_BOOL_CONTEXT}"
>> dev/tpm/tpm_tis.c  optionaltpm acpi
>> dev/tpm/tpm_acpi.c optionaltpm acpi
>> dev/tpm/tpm_isa.c  optionaltpm isa
>> 
>> Modified: head/sys/conf/kern.mk
>> ==
>> --- head/sys/conf/kern.mk   Fri Jan 31 19:35:21 2020(r357348)
>> +++ head/sys/conf/kern.mk   Fri Jan 31 19:36:14 2020(r357349)
>> @@ -37,6 +37,9 @@ CWARNEXTRA+=  -Wno-error-shift-negative-value
>> .if ${COMPILER_VERSION} >= 4
>> CWARNEXTRA+=   -Wno-address-of-packed-member
>> .endif
>> +.if ${COMPILER_VERSION} >= 10
>> +NO_WINT_IN_BOOL_CONTEXT=   -Wno-int-in-bool-context
>> +.endif
>> .endif
>> 
>> .if ${COMPILER_TYPE} == "gcc"
>> 
>> Modified: head/sys/modules/tpm/Makefile
>> ==
>> --- head/sys/modules/tpm/Makefile   Fri Jan 31 19:35:21 2020
>> (r357348)
>> +++ head/sys/modules/tpm/Makefile   Fri Jan 31 19:36:14 2020
>> (r357349)
>> @@ -11,3 +11,5 @@ SRCS+=tpm_isa.c tpm_acpi.c isa_if.h opt_acpi.h 
>> acpi_i
>> SRCS+= tpm20.c tpm_crb.c tpm_tis.c opt_tpm.h
>> 
>> .include 
>> +
>> +CWARNFLAGS.tpm_crb.c+= ${NO_WINT_IN_BOOL_CONTEXT}



signature.asc
Description: Message signed with OpenPGP


svn commit: r357354 - in stable: 11/stand/i386/gptboot 12/stand/i386/gptboot

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 21:20:22 2020
New Revision: 357354
URL: https://svnweb.freebsd.org/changeset/base/357354

Log:
  MFC r357232:
  
  Merge r357231 from the clang1000-import branch:
  
  Work around assembler error from clang 10.0.0 in gptboot:
  
  stand/i386/gptboot/gptldr.S:141:3: error: value of 36878 is too large for 
field of 2 bytes.
jmp MEM_JMP # Start BTX
^
  
  Use the same construct as in stand/i386/boot2/boot1.S, which ensures the
  jump distance does not become too large.

Modified:
  stable/12/stand/i386/gptboot/gptldr.S
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/stand/i386/gptboot/gptldr.S
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/stand/i386/gptboot/gptldr.S
==
--- stable/12/stand/i386/gptboot/gptldr.S   Fri Jan 31 21:08:33 2020
(r357353)
+++ stable/12/stand/i386/gptboot/gptldr.S   Fri Jan 31 21:20:22 2020
(r357354)
@@ -138,5 +138,5 @@ seta20.3:   sti # Enable 
interrupts
  * Save drive number from BIOS so boot2 can see it and start BTX.
  */
movb %dl,MEM_ARG
-   jmp MEM_JMP # Start BTX
+   jmp start+MEM_JMP-MEM_ORG   # Start BTX
 end:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357354 - in stable: 11/stand/i386/gptboot 12/stand/i386/gptboot

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 21:20:22 2020
New Revision: 357354
URL: https://svnweb.freebsd.org/changeset/base/357354

Log:
  MFC r357232:
  
  Merge r357231 from the clang1000-import branch:
  
  Work around assembler error from clang 10.0.0 in gptboot:
  
  stand/i386/gptboot/gptldr.S:141:3: error: value of 36878 is too large for 
field of 2 bytes.
jmp MEM_JMP # Start BTX
^
  
  Use the same construct as in stand/i386/boot2/boot1.S, which ensures the
  jump distance does not become too large.

Modified:
  stable/11/stand/i386/gptboot/gptldr.S
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/stand/i386/gptboot/gptldr.S
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/stand/i386/gptboot/gptldr.S
==
--- stable/11/stand/i386/gptboot/gptldr.S   Fri Jan 31 21:08:33 2020
(r357353)
+++ stable/11/stand/i386/gptboot/gptldr.S   Fri Jan 31 21:20:22 2020
(r357354)
@@ -138,5 +138,5 @@ seta20.3:   sti # Enable 
interrupts
  * Save drive number from BIOS so boot2 can see it and start BTX.
  */
movb %dl,MEM_ARG
-   jmp MEM_JMP # Start BTX
+   jmp start+MEM_JMP-MEM_ORG   # Start BTX
 end:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357351 - in stable: 10/contrib/binutils/bfd 11/contrib/binutils/bfd 12/contrib/binutils/bfd 9/contrib/binutils/bfd

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 20:04:32 2020
New Revision: 357351
URL: https://svnweb.freebsd.org/changeset/base/357351

Log:
  MFC r357226:
  
  Merge r357224 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in binutils:
  
  contrib/binutils/bfd/peicode.h:1356:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (efi)
  ^
  contrib/binutils/bfd/peicode.h:1353:8: note: previous statement is here
if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
^
  contrib/binutils/bfd/peicode.h:1370:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (!efi)
  ^
  contrib/binutils/bfd/peicode.h:1367:8: note: previous statement is here
if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
^

Modified:
  stable/9/contrib/binutils/bfd/peicode.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/binutils/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/binutils/bfd/peicode.h
  stable/11/contrib/binutils/bfd/peicode.h
  stable/12/contrib/binutils/bfd/peicode.h
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/9/contrib/binutils/bfd/peicode.h
==
--- stable/9/contrib/binutils/bfd/peicode.h Fri Jan 31 19:40:40 2020
(r357350)
+++ stable/9/contrib/binutils/bfd/peicode.h Fri Jan 31 20:04:32 2020
(r357351)
@@ -1353,13 +1353,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
continue;
 
-   if (efi)
- {
-   /* TARGET_PTR is an EFI backend.  Don't match
-  TARGET with a EFI file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (efi)
+   {
+ /* TARGET_PTR is an EFI backend.  Don't match
+TARGET with a EFI file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
  else if (bfd_target_pei_p (*target_ptr))
{
@@ -1367,13 +1367,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
continue;
 
-   if (!efi)
- {
-   /* TARGET_PTR is a PE backend.  Don't match
-  TARGET with a PE file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (!efi)
+   {
+ /* TARGET_PTR is a PE backend.  Don't match
+TARGET with a PE file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
}
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357351 - in stable: 10/contrib/binutils/bfd 11/contrib/binutils/bfd 12/contrib/binutils/bfd 9/contrib/binutils/bfd

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 20:04:32 2020
New Revision: 357351
URL: https://svnweb.freebsd.org/changeset/base/357351

Log:
  MFC r357226:
  
  Merge r357224 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in binutils:
  
  contrib/binutils/bfd/peicode.h:1356:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (efi)
  ^
  contrib/binutils/bfd/peicode.h:1353:8: note: previous statement is here
if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
^
  contrib/binutils/bfd/peicode.h:1370:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (!efi)
  ^
  contrib/binutils/bfd/peicode.h:1367:8: note: previous statement is here
if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
^

Modified:
  stable/10/contrib/binutils/bfd/peicode.h
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/binutils/bfd/peicode.h
  stable/12/contrib/binutils/bfd/peicode.h
  stable/9/contrib/binutils/bfd/peicode.h
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/binutils/   (props changed)

Modified: stable/10/contrib/binutils/bfd/peicode.h
==
--- stable/10/contrib/binutils/bfd/peicode.hFri Jan 31 19:40:40 2020
(r357350)
+++ stable/10/contrib/binutils/bfd/peicode.hFri Jan 31 20:04:32 2020
(r357351)
@@ -1353,13 +1353,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
continue;
 
-   if (efi)
- {
-   /* TARGET_PTR is an EFI backend.  Don't match
-  TARGET with a EFI file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (efi)
+   {
+ /* TARGET_PTR is an EFI backend.  Don't match
+TARGET with a EFI file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
  else if (bfd_target_pei_p (*target_ptr))
{
@@ -1367,13 +1367,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
continue;
 
-   if (!efi)
- {
-   /* TARGET_PTR is a PE backend.  Don't match
-  TARGET with a PE file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (!efi)
+   {
+ /* TARGET_PTR is a PE backend.  Don't match
+TARGET with a PE file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
}
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357351 - in stable: 10/contrib/binutils/bfd 11/contrib/binutils/bfd 12/contrib/binutils/bfd 9/contrib/binutils/bfd

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 20:04:32 2020
New Revision: 357351
URL: https://svnweb.freebsd.org/changeset/base/357351

Log:
  MFC r357226:
  
  Merge r357224 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in binutils:
  
  contrib/binutils/bfd/peicode.h:1356:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (efi)
  ^
  contrib/binutils/bfd/peicode.h:1353:8: note: previous statement is here
if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
^
  contrib/binutils/bfd/peicode.h:1370:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (!efi)
  ^
  contrib/binutils/bfd/peicode.h:1367:8: note: previous statement is here
if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
^

Modified:
  stable/11/contrib/binutils/bfd/peicode.h
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/binutils/bfd/peicode.h
  stable/12/contrib/binutils/bfd/peicode.h
  stable/9/contrib/binutils/bfd/peicode.h
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/binutils/   (props changed)

Modified: stable/11/contrib/binutils/bfd/peicode.h
==
--- stable/11/contrib/binutils/bfd/peicode.hFri Jan 31 19:40:40 2020
(r357350)
+++ stable/11/contrib/binutils/bfd/peicode.hFri Jan 31 20:04:32 2020
(r357351)
@@ -1353,13 +1353,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
continue;
 
-   if (efi)
- {
-   /* TARGET_PTR is an EFI backend.  Don't match
-  TARGET with a EFI file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (efi)
+   {
+ /* TARGET_PTR is an EFI backend.  Don't match
+TARGET with a EFI file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
  else if (bfd_target_pei_p (*target_ptr))
{
@@ -1367,13 +1367,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
continue;
 
-   if (!efi)
- {
-   /* TARGET_PTR is a PE backend.  Don't match
-  TARGET with a PE file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (!efi)
+   {
+ /* TARGET_PTR is a PE backend.  Don't match
+TARGET with a PE file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
}
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357351 - in stable: 10/contrib/binutils/bfd 11/contrib/binutils/bfd 12/contrib/binutils/bfd 9/contrib/binutils/bfd

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 20:04:32 2020
New Revision: 357351
URL: https://svnweb.freebsd.org/changeset/base/357351

Log:
  MFC r357226:
  
  Merge r357224 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in binutils:
  
  contrib/binutils/bfd/peicode.h:1356:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (efi)
  ^
  contrib/binutils/bfd/peicode.h:1353:8: note: previous statement is here
if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
^
  contrib/binutils/bfd/peicode.h:1370:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (!efi)
  ^
  contrib/binutils/bfd/peicode.h:1367:8: note: previous statement is here
if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
^

Modified:
  stable/12/contrib/binutils/bfd/peicode.h
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/binutils/bfd/peicode.h
  stable/11/contrib/binutils/bfd/peicode.h
  stable/9/contrib/binutils/bfd/peicode.h
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/binutils/   (props changed)

Modified: stable/12/contrib/binutils/bfd/peicode.h
==
--- stable/12/contrib/binutils/bfd/peicode.hFri Jan 31 19:40:40 2020
(r357350)
+++ stable/12/contrib/binutils/bfd/peicode.hFri Jan 31 20:04:32 2020
(r357351)
@@ -1353,13 +1353,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
continue;
 
-   if (efi)
- {
-   /* TARGET_PTR is an EFI backend.  Don't match
-  TARGET with a EFI file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (efi)
+   {
+ /* TARGET_PTR is an EFI backend.  Don't match
+TARGET with a EFI file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
  else if (bfd_target_pei_p (*target_ptr))
{
@@ -1367,13 +1367,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
continue;
 
-   if (!efi)
- {
-   /* TARGET_PTR is a PE backend.  Don't match
-  TARGET with a PE file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (!efi)
+   {
+ /* TARGET_PTR is a PE backend.  Don't match
+TARGET with a PE file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
}
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357349 - in head/sys: conf modules/tpm

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 19:36:14 2020
New Revision: 357349
URL: https://svnweb.freebsd.org/changeset/base/357349

Log:
  Merge r357348 from the clang 10.0.0 import branch:
  
  Disable new clang 10.0.0 warnings about converting the result of shift
  operations to a boolean in tpm(4):
  
  sys/dev/tpm/tpm_crb.c:301:32: error: converting the result of '<<' to a 
boolean; did you mean '(1 << (0)) != 0'? [-Werror,-Wint-in-bool-context]
  WR4(sc, TPM_CRB_CTRL_CANCEL, !TPM_CRB_CTRL_CANCEL_CMD);
^
  sys/dev/tpm/tpm_crb.c:73:34: note: expanded from macro 
'TPM_CRB_CTRL_CANCEL_CMD'
  #define TPM_CRB_CTRL_CANCEL_CMD BIT(0)
  ^
  sys/dev/tpm/tpm20.h:60:19: note: expanded from macro 'BIT'
  #define BIT(x) (1 << (x))
^
  
  Such warnings can be useful in C++ contexts, but not so much in kernel
  drivers, where this type of bit twiddling is commonplace.  So disable it
  for this case.
  
  MFC after:3 days

Modified:
  head/sys/conf/files.amd64
  head/sys/conf/kern.mk
  head/sys/modules/tpm/Makefile
Directory Properties:
  head/   (props changed)

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Fri Jan 31 19:35:21 2020(r357348)
+++ head/sys/conf/files.amd64   Fri Jan 31 19:36:14 2020(r357349)
@@ -323,7 +323,8 @@ dev/syscons/scvesactl.c optionalsc vga 
vesa
 dev/syscons/scvgarndr.coptionalsc vga
 dev/tpm/tpm.c  optionaltpm
 dev/tpm/tpm20.coptionaltpm
-dev/tpm/tpm_crb.c  optionaltpm acpi
+dev/tpm/tpm_crb.c  optionaltpm acpi \
+   compile-with "${NORMAL_C} ${NO_WINT_IN_BOOL_CONTEXT}"
 dev/tpm/tpm_tis.c  optionaltpm acpi
 dev/tpm/tpm_acpi.c optionaltpm acpi
 dev/tpm/tpm_isa.c  optionaltpm isa

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Fri Jan 31 19:35:21 2020(r357348)
+++ head/sys/conf/kern.mk   Fri Jan 31 19:36:14 2020(r357349)
@@ -37,6 +37,9 @@ CWARNEXTRA+=  -Wno-error-shift-negative-value
 .if ${COMPILER_VERSION} >= 4
 CWARNEXTRA+=   -Wno-address-of-packed-member
 .endif
+.if ${COMPILER_VERSION} >= 10
+NO_WINT_IN_BOOL_CONTEXT=   -Wno-int-in-bool-context
+.endif
 .endif
 
 .if ${COMPILER_TYPE} == "gcc"

Modified: head/sys/modules/tpm/Makefile
==
--- head/sys/modules/tpm/Makefile   Fri Jan 31 19:35:21 2020
(r357348)
+++ head/sys/modules/tpm/Makefile   Fri Jan 31 19:36:14 2020
(r357349)
@@ -11,3 +11,5 @@ SRCS+=tpm_isa.c tpm_acpi.c isa_if.h opt_acpi.h acpi_i
 SRCS+= tpm20.c tpm_crb.c tpm_tis.c opt_tpm.h
 
 .include 
+
+CWARNFLAGS.tpm_crb.c+= ${NO_WINT_IN_BOOL_CONTEXT}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357347 - in head: share/mk usr.bin/lex

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 19:06:49 2020
New Revision: 357347
URL: https://svnweb.freebsd.org/changeset/base/357347

Log:
  Merge r357345 from the clang1000-import branch:
  
  Disable new clang 10.0.0 warnings about misleading indentation in flex.
  
  As this is contributed code with very messy indentation, which will
  almost certainly never be upgraded, just disable the warning.
  
  MFC after:3 days

Modified:
  head/share/mk/bsd.sys.mk
  head/usr.bin/lex/Makefile
Directory Properties:
  head/   (props changed)

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkFri Jan 31 19:06:01 2020(r357346)
+++ head/share/mk/bsd.sys.mkFri Jan 31 19:06:49 2020(r357347)
@@ -111,6 +111,11 @@ CWARNFLAGS.clang+= -Wno-parentheses
 .if defined(NO_WARRAY_BOUNDS)
 CWARNFLAGS.clang+= -Wno-array-bounds
 .endif # NO_WARRAY_BOUNDS
+.if defined(NO_WMISLEADING_INDENTATION) && \
+((${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 10) || \
+ (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100))
+CWARNFLAGS+=   -Wno-misleading-indentation
+.endif # NO_WMISLEADING_INDENTATION
 .endif # WARNS
 
 .if defined(FORMAT_AUDIT)
@@ -154,8 +159,7 @@ CWARNFLAGS+=-Wno-error=address  
\
 
 # GCC 6.1.0
 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100
-CWARNFLAGS+=   -Wno-error=misleading-indentation   \
-   -Wno-error=nonnull-compare  \
+CWARNFLAGS+=   -Wno-error=nonnull-compare  \
-Wno-error=shift-negative-value \
-Wno-error=tautological-compare \
-Wno-error=unused-const-variable

Modified: head/usr.bin/lex/Makefile
==
--- head/usr.bin/lex/Makefile   Fri Jan 31 19:06:01 2020(r357346)
+++ head/usr.bin/lex/Makefile   Fri Jan 31 19:06:49 2020(r357347)
@@ -32,6 +32,8 @@ MLINKS+=  lex.1 lex++.1
 
 WARNS?=3
 
+NO_WMISLEADING_INDENTATION=
+
 CLEANFILES=scan.c skel.c
 GENFILES=  parse.c parse.h scan.c skel.c
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357346 - head/share/mk

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 19:06:01 2020
New Revision: 357346
URL: https://svnweb.freebsd.org/changeset/base/357346

Log:
  Merge r357342 from the clang1000-import branch:
  
  Work around two -Werror warning issues in googletest, which have been
  solved upstream in the mean time.
  
  The first issue is because one of googletest's generated headers contain
  classes with a user-declared copy assignment operator, but rely on the
  generation by the compiler of an implicit copy constructor, which is now
  deprecated:
  
  
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8:
 error: definition of implicit copy constructor for 
'CartesianProductHolder3, 
testing::internal::ValueArray3, 
testing::internal::ValueArray4 
>' is deprecated because it has a user-declared copy assignment operator 
[-Werror,-Wdeprecated-copy]
void operator=(const CartesianProductHolder3& other);
 ^
  
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10:
 note: in implicit copy constructor for 
'testing::internal::CartesianProductHolder3,
 testing::internal::ValueArray3, 
testing::internal::ValueArray4 
>' first required here
return internal::CartesianProductHolder3(
   ^
  /usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function 
template specialization 
'testing::Combine, 
testing::internal::ValueArray3, 
testing::internal::ValueArray4 
>' requested here
  Combine(Bool(), /* async read */
  ^
  
  For now, silence the warning using -Wno-deprecated-copy.
  
  The second issue is because one of the googlemock test programs attempts
  to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
  and at best, hazily defined:
  
  contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 
'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0U, BuiltInDefaultValue::Get());
  ^
  contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 
'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0, BuiltInDefaultValue::Get());
 ^
  
  For now, silence the warning using -Wno-signed-unsigned-wchar.
  
  MFC after:3 days

Modified:
  head/share/mk/googletest.test.inc.mk
Directory Properties:
  head/   (props changed)

Modified: head/share/mk/googletest.test.inc.mk
==
--- head/share/mk/googletest.test.inc.mkFri Jan 31 19:02:53 2020
(r357345)
+++ head/share/mk/googletest.test.inc.mkFri Jan 31 19:06:01 2020
(r357346)
@@ -5,6 +5,18 @@ GTESTS_CXXFLAGS+= -DGTEST_HAS_PTHREAD=1
 GTESTS_CXXFLAGS+= -DGTEST_HAS_STREAM_REDIRECTION=1
 GTESTS_CXXFLAGS+= -frtti
 
+.include 
+
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 10
+# Required until googletest is upgraded to a more recent version (after
+# upstream commit efecb0bfa687cf87836494f5d62868485c00fb66).
+GTESTS_CXXFLAGS+= -Wno-deprecated-copy
+
+# Required until googletest is upgraded to a more recent version (after
+# upstream commit d44b137fd104dfffdcdea103f7de11b9eccc45c2).
+GTESTS_CXXFLAGS+= -Wno-signed-unsigned-wchar
+.endif
+
 # XXX: src.libnames.mk should handle adding this directory for libgtest's,
 # libgmock's, etc, headers.
 CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357340 - head/usr.sbin/bsnmpd/modules/snmp_pf

2020-01-31 Thread Dimitry Andric
Author: dim
Date: Fri Jan 31 18:13:00 2020
New Revision: 357340
URL: https://svnweb.freebsd.org/changeset/base/357340

Log:
  Merge r357339 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
  
  usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1661:4: error: misleading 
indentation; statement is not part of the previous 'else' 
[-Werror,-Wmisleading-indentation]
  return (-1);
  ^
  usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c:1658:5: note: previous statement is 
here
  } else
^
  
  The intent was to group the return statement with the previous syslog()
  call.
  
  MFC after:3 days

Modified:
  head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
Directory Properties:
  head/   (props changed)

Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
==
--- head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c  Fri Jan 31 18:09:27 
2020(r357339)
+++ head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c  Fri Jan 31 18:13:00 
2020(r357340)
@@ -1655,10 +1655,11 @@ altq_is_enabled(int pfdev)
syslog(LOG_INFO, "No ALTQ support in kernel\n"
"ALTQ related functions disabled\n");
return (0);
-   } else
+   } else {
syslog(LOG_ERR, "DIOCGETALTQS returned an error: %s",
strerror(errno));
return (-1);
+   }
}
return (1);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357272 - head/usr.sbin/bsnmpd/modules/snmp_bridge

2020-01-29 Thread Dimitry Andric
Author: dim
Date: Wed Jan 29 21:41:45 2020
New Revision: 357272
URL: https://svnweb.freebsd.org/changeset/base/357272

Log:
  Merge r357271 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in bsnmpd:
  
  usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c:1235:43: error: overlapping 
comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
  begemotBridgeStpPortEnable_enabled ||
  ~~~^~
  
  Work around it by casting the enum values to the type of val->v.integer.
  
  MFC after:3 days

Modified:
  head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
Directory Properties:
  head/   (props changed)

Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c
==
--- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c  Wed Jan 29 
21:40:35 2020(r357271)
+++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c  Wed Jan 29 
21:41:45 2020(r357272)
@@ -1232,9 +1232,9 @@ op_begemot_stp_port(struct snmp_context *ctx, struct s
 
case LEAF_begemotBridgeStpPortEnable:
if (val->v.integer !=
-   begemotBridgeStpPortEnable_enabled ||
+   (int32_t)begemotBridgeStpPortEnable_enabled ||
val->v.integer !=
-   begemotBridgeStpPortEnable_disabled)
+   (int32_t)begemotBridgeStpPortEnable_disabled)
return (SNMP_ERR_WRONG_VALUE);
 
ctx->scratch->int1 = bp->enable;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357269 - head/usr.bin/tip/tip

2020-01-29 Thread Dimitry Andric
Author: dim
Date: Wed Jan 29 21:07:46 2020
New Revision: 357269
URL: https://svnweb.freebsd.org/changeset/base/357269

Log:
  Merge r357267 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in tip:
  
  usr.bin/tip/tip/tip.c:428:4: error: misleading indentation; statement is not 
part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (gch == EOF)
  ^
  usr.bin/tip/tip/tip.c:426:5: note: previous statement is here
  } else if (!cumode && gch == character(value(FORCE)))
^
  
  The intent was to have the EOF check grouped with the getchar() call
  just above it.  This was accidentally introduced in r354624.
  
  MFC after:3 days

Modified:
  head/usr.bin/tip/tip/tip.c
Directory Properties:
  head/   (props changed)

Modified: head/usr.bin/tip/tip/tip.c
==
--- head/usr.bin/tip/tip/tip.c  Wed Jan 29 21:06:22 2020(r357268)
+++ head/usr.bin/tip/tip/tip.c  Wed Jan 29 21:07:46 2020(r357269)
@@ -423,11 +423,12 @@ tipin(void)
if (boolean(value(HALFDUPLEX)))
printf("\r\n");
continue;
-   } else if (!cumode && gch == character(value(FORCE)))
+   } else if (!cumode && gch == character(value(FORCE))) {
gch = getchar();
if (gch == EOF)
return;
gch = gch & STRIP_PAR;
+   }
bol = any(gch, value(EOL));
if (boolean(value(RAISE)) && islower(gch))
gch = toupper(gch);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357268 - head/usr.bin/procstat

2020-01-29 Thread Dimitry Andric
Author: dim
Date: Wed Jan 29 21:06:22 2020
New Revision: 357268
URL: https://svnweb.freebsd.org/changeset/base/357268

Log:
  Merge r357260 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in procstat:
  
  usr.bin/procstat/procstat_sigs.c:79:3: error: misleading indentation; 
statement is not part of the previous 'else' [-Werror,-Wmisleading-indentation]
  xo_close_container(name);
  ^
  usr.bin/procstat/procstat_sigs.c:77:4: note: previous statement is here
  } else
^
  
  The intent was to group the xo_close_container() call to the previous
  snprintf() call.
  
  MFC after:3 days

Modified:
  head/usr.bin/procstat/procstat_sigs.c
Directory Properties:
  head/   (props changed)

Modified: head/usr.bin/procstat/procstat_sigs.c
==
--- head/usr.bin/procstat/procstat_sigs.c   Wed Jan 29 20:56:31 2020
(r357267)
+++ head/usr.bin/procstat/procstat_sigs.c   Wed Jan 29 21:06:22 2020
(r357268)
@@ -74,9 +74,10 @@ procstat_close_signame(int sig)
for (i = 0; name[i] != 0; i++)
name[i] = toupper(name[i]);
xo_close_container(name);
-   } else
+   } else {
snprintf(name, 12, "%d", sig);
xo_close_container(name);
+   }
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357232 - head/stand/i386/gptboot

2020-01-28 Thread Dimitry Andric
Author: dim
Date: Tue Jan 28 21:46:59 2020
New Revision: 357232
URL: https://svnweb.freebsd.org/changeset/base/357232

Log:
  Merge r357231 from the clang1000-import branch:
  
  Work around assembler error from clang 10.0.0 in gptboot:
  
  stand/i386/gptboot/gptldr.S:141:3: error: value of 36878 is too large for 
field of 2 bytes.
jmp MEM_JMP # Start BTX
^
  
  Use the same construct as in stand/i386/boot2/boot1.S, which ensures the
  jump distance does not become too large.
  
  MFC after:3 days

Modified:
  head/stand/i386/gptboot/gptldr.S
Directory Properties:
  head/   (props changed)

Modified: head/stand/i386/gptboot/gptldr.S
==
--- head/stand/i386/gptboot/gptldr.STue Jan 28 21:41:37 2020
(r357231)
+++ head/stand/i386/gptboot/gptldr.STue Jan 28 21:46:59 2020
(r357232)
@@ -138,5 +138,5 @@ seta20.3:   sti # Enable 
interrupts
  * Save drive number from BIOS so boot2 can see it and start BTX.
  */
movb %dl,MEM_ARG
-   jmp MEM_JMP # Start BTX
+   jmp start+MEM_JMP-MEM_ORG   # Start BTX
 end:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357227 - head/sbin/newfs_msdos

2020-01-28 Thread Dimitry Andric
Author: dim
Date: Tue Jan 28 20:12:29 2020
New Revision: 357227
URL: https://svnweb.freebsd.org/changeset/base/357227

Log:
  Merge r357225 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in newfs_msdos:
  
  sbin/newfs_msdos/newfs_msdos.c:181:2: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (o.align) {
  ^
  sbin/newfs_msdos/newfs_msdos.c:179:5: note: previous statement is here
  if (argc < 1 || argc > 2)
  ^
  
  MFC after:3 days

Modified:
  head/sbin/newfs_msdos/newfs_msdos.c
Directory Properties:
  head/   (props changed)

Modified: head/sbin/newfs_msdos/newfs_msdos.c
==
--- head/sbin/newfs_msdos/newfs_msdos.c Tue Jan 28 20:11:27 2020
(r357226)
+++ head/sbin/newfs_msdos/newfs_msdos.c Tue Jan 28 20:12:29 2020
(r357227)
@@ -178,10 +178,10 @@ main(int argc, char *argv[])
 argv += optind;
 if (argc < 1 || argc > 2)
usage();
-   if (o.align) {
-   if (o.reserved_sectors)
-   errx(1, "align (-A) is incompatible with -r");
-   }
+if (o.align) {
+   if (o.reserved_sectors)
+   errx(1, "align (-A) is incompatible with -r");
+}
 fname = *argv++;
 if (!o.create_size && !strchr(fname, '/')) {
snprintf(buf, sizeof(buf), "%s%s", _PATH_DEV, fname);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2020-01-28 Thread Dimitry Andric
Author: dim
Date: Tue Jan 28 20:11:27 2020
New Revision: 357226
URL: https://svnweb.freebsd.org/changeset/base/357226

Log:
  Merge r357224 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in binutils:
  
  contrib/binutils/bfd/peicode.h:1356:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (efi)
  ^
  contrib/binutils/bfd/peicode.h:1353:8: note: previous statement is here
if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
^
  contrib/binutils/bfd/peicode.h:1370:3: error: misleading indentation; 
statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
  if (!efi)
  ^
  contrib/binutils/bfd/peicode.h:1367:8: note: previous statement is here
if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
^
  
  MFC after:3 days

Modified:
  head/contrib/binutils/bfd/peicode.h
Directory Properties:
  head/   (props changed)
  head/contrib/binutils/   (props changed)

Modified: head/contrib/binutils/bfd/peicode.h
==
--- head/contrib/binutils/bfd/peicode.h Tue Jan 28 20:10:26 2020
(r357225)
+++ head/contrib/binutils/bfd/peicode.h Tue Jan 28 20:11:27 2020
(r357226)
@@ -1353,13 +1353,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
continue;
 
-   if (efi)
- {
-   /* TARGET_PTR is an EFI backend.  Don't match
-  TARGET with a EFI file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (efi)
+   {
+ /* TARGET_PTR is an EFI backend.  Don't match
+TARGET with a EFI file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
  else if (bfd_target_pei_p (*target_ptr))
{
@@ -1367,13 +1367,13 @@ pe_bfd_object_p (bfd * abfd)
  if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
continue;
 
-   if (!efi)
- {
-   /* TARGET_PTR is a PE backend.  Don't match
-  TARGET with a PE file.  */
-   bfd_set_error (bfd_error_wrong_format);
-   return NULL;
- }
+ if (!efi)
+   {
+ /* TARGET_PTR is a PE backend.  Don't match
+TARGET with a PE file.  */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+   }
}
}
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357223 - head/libexec/rbootd

2020-01-28 Thread Dimitry Andric
Author: dim
Date: Tue Jan 28 20:05:25 2020
New Revision: 357223
URL: https://svnweb.freebsd.org/changeset/base/357223

Log:
  Merge r357222 from the clang1000-import branch:
  
  Fix the following -Werror warning from clang 10.0.0 in rbootd:
  
  libexec/rbootd/rmpproto.c:335:49: error: multiple unsequenced modifications 
to 'filename' [-Werror,-Wunsequenced]
  filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
   ~ ^
  
  MFC after:3 days

Modified:
  head/libexec/rbootd/rmpproto.c
Directory Properties:
  head/   (props changed)

Modified: head/libexec/rbootd/rmpproto.c
==
--- head/libexec/rbootd/rmpproto.c  Tue Jan 28 19:19:55 2020
(r357222)
+++ head/libexec/rbootd/rmpproto.c  Tue Jan 28 20:05:25 2020
(r357223)
@@ -332,7 +332,8 @@ SendBootRepl(struct rmp_packet *req, RMPCONN *rconn, c
 *  stripped file name and spoof the client into thinking that it
 *  really got what it wanted.
 */
-   filename = (filename = strrchr(filepath,'/'))? ++filename: filepath;
+   filename = strrchr(filepath,'/');
+   filename = filename? filename + 1: filepath;
 
/*
 *  Check that this is a valid boot file name.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357168 - in stable/12/contrib/llvm-project: clang/lib/Basic/Targets clang/lib/Driver/ToolChains/Arch llvm/include/llvm/ADT llvm/lib/Support llvm/lib/Target/PowerPC

2020-01-26 Thread Dimitry Andric
Author: dim
Date: Mon Jan 27 07:03:57 2020
New Revision: 357168
URL: https://svnweb.freebsd.org/changeset/base/357168

Log:
  MFC r356929:
  
  Merge commit bc4bc5aa0 from llvm git (by Justin Hibbits):
  
Add 8548 CPU definition and attributes
  
8548 CPU is GCC's name for the e500v2, so accept this in clang.  The
e500v2 doesn't support lwsync, so define __NO_LWSYNC__ for this as
well, as GCC does.
  
Differential Revision:  https://reviews.llvm.org/D67787
  
  Merge commit ff0311c4b from llvm git (by Justin Hibbits):
  
[PowerPC]: Add powerpcspe target triple subarch component
  
Summary:
This allows the use of '-target powerpcspe-unknown-linux-gnu' or
'powerpcspe-unknown-freebsd' to be used, instead of '-target
powerpc-unknown-linux-gnu -mspe'.
  
Reviewed By: dim
Differential Revision: https://reviews.llvm.org/D72014
  
  Merge commit ba91dffaf from llvm git (by Fangrui Song):
  
[Driver][PowerPC] Move powerpcspe logic from cc1 to Driver
  
Follow-up of D72014. It is more appropriate to use a target feature
instead of a SubTypeArch to express the difference.
  
Reviewed By: #powerpc, jhibbits
  
Differential Revision: https://reviews.llvm.org/D72433
  
  commit 36eedfcb3 from llvm git (by Justin Hibbits):
  
[PowerPC] Fix powerpcspe subtarget enablement in llvm backend
  
Summary:
  
As currently written, -target powerpcspe will enable SPE regardless
of disabling the feature later on in the command line.  Instead,
change this to just set a default CPU to 'e500' instead of a generic
CPU.
  
As part of this, add FeatureSPE to the e500 definition.
  
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D72673
  
  These are needed to unbreak the build for powerpcspe.
  
  Requested by: jhibbits

Modified:
  stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp
  stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
  stable/12/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp
  stable/12/contrib/llvm-project/llvm/include/llvm/ADT/Triple.h
  stable/12/contrib/llvm-project/llvm/lib/Support/Triple.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
Directory Properties:
  stable/12/   (props changed)
  stable/12/contrib/llvm-project/clang/   (props changed)
  stable/12/contrib/llvm-project/llvm/   (props changed)

Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp
==
--- stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp  Mon Jan 
27 07:02:52 2020(r357167)
+++ stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp  Mon Jan 
27 07:03:57 2020(r357168)
@@ -157,6 +157,8 @@ void PPCTargetInfo::getTargetDefines(const LangOptions
 Builder.defineMacro("_ARCH_A2Q");
 Builder.defineMacro("_ARCH_QP");
   }
+  if (ArchDefs & ArchDefineE500)
+Builder.defineMacro("__NO_LWSYNC__");
 
   if (getTriple().getVendor() == llvm::Triple::BGQ) {
 Builder.defineMacro("__bg__");
@@ -312,6 +314,11 @@ bool PPCTargetInfo::initFeatureMap(
 .Case("pwr8", true)
 .Default(false);
 
+  Features["spe"] = llvm::StringSwitch(CPU)
+.Case("8548", true)
+.Case("e500", true)
+.Default(false);
+
   if (!ppcUserFeaturesCheck(Diags, FeaturesVec))
 return false;
 
@@ -449,16 +456,16 @@ ArrayRef PPCTargetInfo::getGC
 }
 
 static constexpr llvm::StringLiteral ValidCPUNames[] = {
-{"generic"}, {"440"}, {"450"}, {"601"},{"602"},
-{"603"}, {"603e"},{"603ev"},   {"604"},{"604e"},
-{"620"}, {"630"}, {"g3"},  {"7400"},   {"g4"},
-{"7450"},{"g4+"}, {"750"}, {"970"},{"g5"},
-{"a2"},  {"a2q"}, {"e500mc"},  {"e5500"},  {"power3"},
-{"pwr3"},{"power4"},  {"pwr4"},{"power5"}, {"pwr5"},
-{"power5x"}, {"pwr5x"},   {"power6"},  {"pwr6"},   {"power6x"},
-{"pwr6x"},   {"power7"},  {"pwr7"},{"power8"}, {"pwr8"},
-{"power9"},  {"pwr9"},{"powerpc"}, {"ppc"},{"powerpc64"},
-{"ppc64"},   {"powerpc64le"}, {"ppc64le"},
+{"generic"},   {"440"},   {"450"}, {"601"}, {"602"},
+{"603"},   {"603e"},  {"603ev"},   {"604"}, {"604e"},
+{"620"},   {"630"},   {"g3"},  {"7400"},{"g4"},
+{"7450"},  {"g4+"},   {"750"}, {"8548"},{"970"},
+{"g5"},{"a2"},{"a2q"}, {"e500"},{"e500mc"},
+{"e5500"}, {"power3"},{"pwr3"},{"power4"},  {"pwr4"},
+{"power5"},{"pwr5"},  {"power5x"}, {"pwr5x"},   {"power6"},
+{"pwr6"},  {"power6x"},   {"pwr6x"},   

svn commit: r357167 - in stable/12/contrib/llvm-project/llvm/lib: MC Object Target/Mips

2020-01-26 Thread Dimitry Andric
Author: dim
Date: Mon Jan 27 07:02:52 2020
New Revision: 357167
URL: https://svnweb.freebsd.org/changeset/base/357167

Log:
  MFC r356789 (by arichardson):
  
  Merge commit 894f742acb from llvm git (by me):
  
[MIPS][ELF] Use PC-relative relocations in .eh_frame when possible
  
When compiling position-independent executables, we now use
DW_EH_PE_pcrel | DW_EH_PE_sdata4. However, the MIPS ABI does not define a
64-bit PC-relative ELF relocation so we cannot use sdata8 for the large
code model case. When using the large code model, we fall back to the
previous behaviour of generating absolute relocations.
  
With this change clang-generated .o files can be linked by LLD without
having to pass -Wl,-z,notext (which creates text relocations).
This is simpler than the approach used by ld.bfd, which rewrites the
.eh_frame section to convert absolute relocations into relative references.
  
I saw in D13104 that apparently ld.bfd did not accept pc-relative 
relocations
for MIPS ouput at some point. However, I also checked that recent ld.bfd
can process the clang-generated .o files so this no longer seems true.
  
Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D72228
  
  Merge commit 8e8ccf47 from llvm git (by me)
  
[MIPS] Don't emit R_(MICRO)MIPS_JALR relocations against data symbols
  
The R_(MICRO)MIPS_JALR optimization only works when used against functions.
Using the relocation against a data symbol (e.g. function pointer) will
cause some linkers that don't ignore the hint in this case (e.g. LLD prior
to commit 5bab291) to generate a relative branch to the data symbol
which crashes at run time. Before this patch, LLVM was erroneously emitting
these relocations against local-dynamic TLS function pointers and global
function pointers with internal visibility.
  
Reviewers: atanasyan, jrtc27, vstefanovic
Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D72571
  
  These two changes should allow using lld for MIPS64 (and maybe also MIPS32)
  by default.
  The second commit is not strictly necessary for clang+lld since LLD9 will
  not perform the R_MIPS_JALR optimization (it was only added for 10) but it
  is probably required in order to use recent ld.bfd.
  
  Reviewed By:  dim, emaste
  Differential Revision: https://reviews.freebsd.org/D23203

Modified:
  stable/12/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp
  stable/12/contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/Mips/MipsISelLowering.cpp
Directory Properties:
  stable/12/   (props changed)
  stable/12/contrib/llvm-project/llvm/   (props changed)

Modified: stable/12/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp
==
--- stable/12/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp Mon Jan 
27 06:05:43 2020(r357166)
+++ stable/12/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp Mon Jan 
27 07:02:52 2020(r357167)
@@ -303,9 +303,14 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const T
   case Triple::mipsel:
   case Triple::mips64:
   case Triple::mips64el:
-FDECFIEncoding = Ctx->getAsmInfo()->getCodePointerSize() == 4
- ? dwarf::DW_EH_PE_sdata4
- : dwarf::DW_EH_PE_sdata8;
+// We cannot use DW_EH_PE_sdata8 for the large PositionIndependent case
+// since there is no R_MIPS_PC64 relocation (only a 32-bit version).
+if (PositionIndependent && !Large)
+  FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+else
+  FDECFIEncoding = Ctx->getAsmInfo()->getCodePointerSize() == 4
+   ? dwarf::DW_EH_PE_sdata4
+   : dwarf::DW_EH_PE_sdata8;
 break;
   case Triple::ppc64:
   case Triple::ppc64le:

Modified: stable/12/contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp
==
--- stable/12/contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp   
Mon Jan 27 06:05:43 2020(r357166)
+++ stable/12/contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp   
Mon Jan 27 07:02:52 2020(r357167)
@@ -103,6 +103,7 @@ static bool supportsMips64(uint64_t Type) {
   case ELF::R_MIPS_32:
   case ELF::R_MIPS_64:
   case ELF::R_MIPS_TLS_DTPREL64:
+  case ELF::R_MIPS_PC32:
 return true;
   default:
 return false;
@@ -117,6 +118,8 @@ static uint64_t resolveMips64(RelocationRef R, uint64_
 return S + getELFAddend(R);
   case ELF::R_MIPS_TLS_DTPREL64:
 return S + getELFAddend(R) - 0x8000;
+  case ELF::R_MIPS_PC32:
+return S + getELFAddend(R) - R.getOffset();
   default:
 llvm_unreachable("Invalid relocation type");
   }

Modified: 

svn commit: r357098 - vendor/llvm-project/llvmorg-10-init-17538-gd11abddb32f

2020-01-24 Thread Dimitry Andric
Author: dim
Date: Fri Jan 24 22:13:08 2020
New Revision: 357098
URL: https://svnweb.freebsd.org/changeset/base/357098

Log:
  Tag llvm-project release/10.x llvmorg-10-init-17538-gd11abddb32f.

Added:
  vendor/llvm-project/llvmorg-10-init-17538-gd11abddb32f/
 - copied from r357097, vendor/llvm-project/release-10.x/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r357097 - in vendor/llvm-project/release-10.x: clang/include/clang/AST clang/include/clang/Basic clang/include/clang/Driver clang/include/clang/Parse clang/include/clang/Sema clang/incl...

2020-01-24 Thread Dimitry Andric
Author: dim
Date: Fri Jan 24 22:11:32 2020
New Revision: 357097
URL: https://svnweb.freebsd.org/changeset/base/357097

Log:
  Vendor import of llvm-project release/10.x
  llvmorg-10-init-17538-gd11abddb32f.

Added:
  vendor/llvm-project/release-10.x/clang/include/clang/AST/ExprConcepts.h   
(contents, props changed)
  vendor/llvm-project/release-10.x/clang/lib/AST/ExprConcepts.cpp   (contents, 
props changed)
Modified:
  vendor/llvm-project/release-10.x/clang/include/clang/AST/ASTConcept.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/ASTContext.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/ASTNodeTraverser.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/DeclCXX.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/DeclTemplate.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/ExprCXX.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/PropertiesBase.td
  vendor/llvm-project/release-10.x/clang/include/clang/AST/RecursiveASTVisitor.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/Stmt.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/StmtVisitor.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/TemplateBase.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/Type.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/TypeLoc.h
  vendor/llvm-project/release-10.x/clang/include/clang/AST/TypeProperties.td
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/AttrDocs.td
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/Builtins.def
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/CodeGenOptions.def
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/DeclNodes.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticDriverKinds.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticFrontendKinds.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticParseKinds.td
  
vendor/llvm-project/release-10.x/clang/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/LangOptions.def
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/StmtNodes.td
  vendor/llvm-project/release-10.x/clang/include/clang/Basic/TokenKinds.def
  vendor/llvm-project/release-10.x/clang/include/clang/Driver/CC1Options.td
  vendor/llvm-project/release-10.x/clang/include/clang/Driver/Driver.h
  vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td
  vendor/llvm-project/release-10.x/clang/include/clang/Parse/Parser.h
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/DeclSpec.h
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/ParsedTemplate.h
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/Scope.h
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/ScopeInfo.h
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/SemaConcept.h
  vendor/llvm-project/release-10.x/clang/include/clang/Sema/TemplateDeduction.h
  
vendor/llvm-project/release-10.x/clang/include/clang/Serialization/ASTBitCodes.h
  vendor/llvm-project/release-10.x/clang/lib/AST/ASTConcept.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ASTContext.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ASTImporter.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ASTStructuralEquivalence.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/DeclBase.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/DeclCXX.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/DeclTemplate.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/Expr.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ExprCXX.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ExprClassification.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ExprConstant.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ItaniumMangle.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/ODRHash.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/Stmt.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/StmtPrinter.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/StmtProfile.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/TemplateBase.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/TextNodeDumper.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/Type.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/TypeLoc.cpp
  vendor/llvm-project/release-10.x/clang/lib/AST/TypePrinter.cpp
  vendor/llvm-project/release-10.x/clang/lib/Basic/IdentifierTable.cpp
  vendor/llvm-project/release-10.x/clang/lib/CodeGen/CGBuiltin.cpp
  vendor/llvm-project/release-10.x/clang/lib/CodeGen/CGDecl.cpp
  vendor/llvm-project/release-10.x/clang/lib/CodeGen/CGExprScalar.cpp
  vendor/llvm-project/release-10.x/clang/lib/CodeGen/CodeGenFunction.cpp
  vendor/llvm-project/release-10.x/clang/lib/Driver/Compilation.cpp
  

svn commit: r356930 - in head/contrib/llvm-project: clang compiler-rt libcxx libunwind lld lldb llvm openmp

2020-01-20 Thread Dimitry Andric
Author: dim
Date: Mon Jan 20 20:26:04 2020
New Revision: 356930
URL: https://svnweb.freebsd.org/changeset/base/356930

Log:
  Add more Subversion mergeinfo bootstrap information, to hopefully
  increase the probability of merging in vendor changes.

Modified:
Directory Properties:
  head/contrib/llvm-project/clang/   (props changed)
  head/contrib/llvm-project/compiler-rt/   (props changed)
  head/contrib/llvm-project/libcxx/   (props changed)
  head/contrib/llvm-project/libunwind/   (props changed)
  head/contrib/llvm-project/lld/   (props changed)
  head/contrib/llvm-project/lldb/   (props changed)
  head/contrib/llvm-project/llvm/   (props changed)
  head/contrib/llvm-project/openmp/   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356929 - in head/contrib/llvm-project: clang/lib/Basic/Targets clang/lib/Driver/ToolChains/Arch llvm/include/llvm/ADT llvm/lib/Support llvm/lib/Target/PowerPC

2020-01-20 Thread Dimitry Andric
Author: dim
Date: Mon Jan 20 20:10:28 2020
New Revision: 356929
URL: https://svnweb.freebsd.org/changeset/base/356929

Log:
  Merge commit bc4bc5aa0 from llvm git (by Justin Hibbits):
  
Add 8548 CPU definition and attributes
  
8548 CPU is GCC's name for the e500v2, so accept this in clang.  The
e500v2 doesn't support lwsync, so define __NO_LWSYNC__ for this as
well, as GCC does.
  
Differential Revision:  https://reviews.llvm.org/D67787
  
  Merge commit ff0311c4b from llvm git (by Justin Hibbits):
  
[PowerPC]: Add powerpcspe target triple subarch component
  
Summary:
This allows the use of '-target powerpcspe-unknown-linux-gnu' or
'powerpcspe-unknown-freebsd' to be used, instead of '-target
powerpc-unknown-linux-gnu -mspe'.
  
Reviewed By: dim
Differential Revision: https://reviews.llvm.org/D72014
  
  Merge commit ba91dffaf from llvm git (by Fangrui Song):
  
[Driver][PowerPC] Move powerpcspe logic from cc1 to Driver
  
Follow-up of D72014. It is more appropriate to use a target feature
instead of a SubTypeArch to express the difference.
  
Reviewed By: #powerpc, jhibbits
  
Differential Revision: https://reviews.llvm.org/D72433
  
  commit 36eedfcb3 from llvm git (by Justin Hibbits):
  
[PowerPC] Fix powerpcspe subtarget enablement in llvm backend
  
Summary:
  
As currently written, -target powerpcspe will enable SPE regardless
of disabling the feature later on in the command line.  Instead,
change this to just set a default CPU to 'e500' instead of a generic
CPU.
  
As part of this, add FeatureSPE to the e500 definition.
  
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D72673
  
  These are needed to unbreak the build for powerpcspe.
  
  Requested by: jhibbits
  MFC after:1 week

Modified:
  head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp
  head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
  head/contrib/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp
  head/contrib/llvm-project/llvm/include/llvm/ADT/Triple.h
  head/contrib/llvm-project/llvm/lib/Support/Triple.cpp
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPC.td
  head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp

Modified: head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp
==
--- head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp   Mon Jan 20 
19:56:22 2020(r356928)
+++ head/contrib/llvm-project/clang/lib/Basic/Targets/PPC.cpp   Mon Jan 20 
20:10:28 2020(r356929)
@@ -157,6 +157,8 @@ void PPCTargetInfo::getTargetDefines(const LangOptions
 Builder.defineMacro("_ARCH_A2Q");
 Builder.defineMacro("_ARCH_QP");
   }
+  if (ArchDefs & ArchDefineE500)
+Builder.defineMacro("__NO_LWSYNC__");
 
   if (getTriple().getVendor() == llvm::Triple::BGQ) {
 Builder.defineMacro("__bg__");
@@ -312,6 +314,11 @@ bool PPCTargetInfo::initFeatureMap(
 .Case("pwr8", true)
 .Default(false);
 
+  Features["spe"] = llvm::StringSwitch(CPU)
+.Case("8548", true)
+.Case("e500", true)
+.Default(false);
+
   if (!ppcUserFeaturesCheck(Diags, FeaturesVec))
 return false;
 
@@ -449,16 +456,16 @@ ArrayRef PPCTargetInfo::getGC
 }
 
 static constexpr llvm::StringLiteral ValidCPUNames[] = {
-{"generic"}, {"440"}, {"450"}, {"601"},{"602"},
-{"603"}, {"603e"},{"603ev"},   {"604"},{"604e"},
-{"620"}, {"630"}, {"g3"},  {"7400"},   {"g4"},
-{"7450"},{"g4+"}, {"750"}, {"970"},{"g5"},
-{"a2"},  {"a2q"}, {"e500mc"},  {"e5500"},  {"power3"},
-{"pwr3"},{"power4"},  {"pwr4"},{"power5"}, {"pwr5"},
-{"power5x"}, {"pwr5x"},   {"power6"},  {"pwr6"},   {"power6x"},
-{"pwr6x"},   {"power7"},  {"pwr7"},{"power8"}, {"pwr8"},
-{"power9"},  {"pwr9"},{"powerpc"}, {"ppc"},{"powerpc64"},
-{"ppc64"},   {"powerpc64le"}, {"ppc64le"},
+{"generic"},   {"440"},   {"450"}, {"601"}, {"602"},
+{"603"},   {"603e"},  {"603ev"},   {"604"}, {"604e"},
+{"620"},   {"630"},   {"g3"},  {"7400"},{"g4"},
+{"7450"},  {"g4+"},   {"750"}, {"8548"},{"970"},
+{"g5"},{"a2"},{"a2q"}, {"e500"},{"e500mc"},
+{"e5500"}, {"power3"},{"pwr3"},{"power4"},  {"pwr4"},
+{"power5"},{"pwr5"},  {"power5x"}, {"pwr5x"},   {"power6"},
+{"pwr6"},  {"power6x"},   {"pwr6x"},   {"power7"},  {"pwr7"},
+{"power8"},{"pwr8"},  {"power9"},  {"pwr9"},
{"powerpc"},
+{"ppc"},   {"powerpc64"}, {"ppc64"},   {"powerpc64le"}, 
{"ppc64le"},
 };
 
 bool 

svn commit: r356847 - vendor/llvm-project/llvmorg-10-init-17468-gc4a134a5107

2020-01-17 Thread Dimitry Andric
Author: dim
Date: Fri Jan 17 21:22:11 2020
New Revision: 356847
URL: https://svnweb.freebsd.org/changeset/base/356847

Log:
  Tag llvm-project release/10.x c4a134a51.

Added:
  vendor/llvm-project/llvmorg-10-init-17468-gc4a134a5107/
 - copied from r356846, vendor/llvm-project/release-10.x/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356846 - in vendor/llvm-project/release-10.x/clang: include/clang/Driver lib/Driver tools/driver

2020-01-17 Thread Dimitry Andric
Author: dim
Date: Fri Jan 17 21:20:15 2020
New Revision: 356846
URL: https://svnweb.freebsd.org/changeset/base/356846

Log:
  Vendor import of llvm-project release/10.x c4a134a51.

Modified:
  vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td
  vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cpp
  vendor/llvm-project/release-10.x/clang/tools/driver/driver.cpp

Modified: vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td
==
--- vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td  
Fri Jan 17 20:50:00 2020(r356845)
+++ vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td  
Fri Jan 17 21:20:15 2020(r356846)
@@ -2855,6 +2855,14 @@ def fintegrated_as : Flag<["-"], "fintegrated-as">, Fl
 def fno_integrated_as : Flag<["-"], "fno-integrated-as">,
 Flags<[CC1Option, DriverOption]>, Group,
 HelpText<"Disable the integrated assembler">;
+
+def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">,
+  Flags<[CoreOption, DriverOption]>, Group,
+  HelpText<"Run cc1 in-process">;
+def fno_integrated_cc1 : Flag<["-"], "fno-integrated-cc1">,
+ Flags<[CoreOption, DriverOption]>, Group,
+ HelpText<"Spawn a separate process for each cc1">;
+
 def : Flag<["-"], "integrated-as">, Alias, 
Flags<[DriverOption]>;
 def : Flag<["-"], "no-integrated-as">, Alias,
   Flags<[CC1Option, DriverOption]>;

Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cpp
==
--- vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cppFri Jan 
17 20:50:00 2020(r356845)
+++ vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cppFri Jan 
17 21:20:15 2020(r356846)
@@ -1035,6 +1035,10 @@ Compilation *Driver::BuildCompilation(ArrayRef argv) {
+CreateAndPopulateDiagOpts(ArrayRef argv, bool ) 
{
   auto *DiagOpts = new DiagnosticOptions;
   unsigned MissingArgIndex, MissingArgCount;
   InputArgList Args = getDriverOptTable().ParseArgs(
@@ -303,6 +282,12 @@ CreateAndPopulateDiagOpts(ArrayRef argv)
   // Any errors that would be diagnosed here will also be diagnosed later,
   // when the DiagnosticsEngine actually exists.
   (void)ParseDiagnosticArgs(*DiagOpts, Args);
+
+  UseNewCC1Process =
+  Args.hasFlag(clang::driver::options::OPT_fno_integrated_cc1,
+   clang::driver::options::OPT_fintegrated_cc1,
+   /*Default=*/CLANG_SPAWN_CC1);
+
   return DiagOpts;
 }
 
@@ -330,7 +315,7 @@ static void SetInstallDir(SmallVectorImpl argv) {
   // If we call the cc1 tool from the clangDriver library (through
-  // Driver::CC1Main), we need to cleanup the options usage count. The options
+  // Driver::CC1Main), we need to clean up the options usage count. The options
   // are currently global, and they might have been used previously by the
   // driver.
   llvm::cl::ResetAllOptionOccurrences();
@@ -413,6 +398,8 @@ int main(int argc_, const char **argv_) {
 return ExecuteCC1Tool(argv);
   }
 
+  // Handle options that need handling before the real command line parsing in
+  // Driver::BuildCompilation()
   bool CanonicalPrefixes = true;
   for (int i = 1, size = argv.size(); i < size; ++i) {
 // Skip end-of-line response file markers
@@ -457,8 +444,14 @@ int main(int argc_, const char **argv_) {
 
   std::string Path = GetExecutablePath(argv[0], CanonicalPrefixes);
 
+  // Whether the cc1 tool should be called inside the current process, or if we
+  // should spawn a new clang subprocess (old behavior).
+  // Not having an additional process saves some execution time of Windows,
+  // and makes debugging and profiling easier.
+  bool UseNewCC1Process;
+
   IntrusiveRefCntPtr DiagOpts =
-  CreateAndPopulateDiagOpts(argv);
+  CreateAndPopulateDiagOpts(argv, UseNewCC1Process);
 
   TextDiagnosticPrinter *DiagClient
 = new TextDiagnosticPrinter(llvm::errs(), &*DiagOpts);
@@ -485,6 +478,12 @@ int main(int argc_, const char **argv_) {
   insertTargetAndModeArgs(TargetAndMode, argv, SavedStrings);
 
   SetBackdoorDriverOutputsFromEnvVars(TheDriver);
+
+  if (!UseNewCC1Process) {
+TheDriver.CC1Main = 
+// Ensure the CC1Command actually catches cc1 crashes
+llvm::CrashRecoveryContext::Enable();
+  }
 
   std::unique_ptr C(TheDriver.BuildCompilation(argv));
   int Res = 1;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356845 - vendor/llvm-project/release-10.x

2020-01-17 Thread Dimitry Andric
Author: dim
Date: Fri Jan 17 20:50:00 2020
New Revision: 356845
URL: https://svnweb.freebsd.org/changeset/base/356845

Log:
  Branch vendor/llvm-project/master to vendor/llvm-project/release-10.x,
  to allow for independent merges of the upstream master and release-10.x
  branches.

Added:
  vendor/llvm-project/release-10.x/
 - copied from r356844, vendor/llvm-project/master/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356844 - vendor/llvm-project/llvmorg-10-init-17466-ge26a78e7085

2020-01-17 Thread Dimitry Andric
Author: dim
Date: Fri Jan 17 20:46:33 2020
New Revision: 356844
URL: https://svnweb.freebsd.org/changeset/base/356844

Log:
  Tag llvm-project master e26a78e70, the last commit before the
  llvmorg-11-init tag, from which release/10.x was branched.

Added:
  vendor/llvm-project/llvmorg-10-init-17466-ge26a78e7085/
 - copied from r356843, vendor/llvm-project/master/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356842 - in vendor/llvm-project/release-9.x: libcxx/src lld lld/COFF lld/Common lld/ELF lld/docs lld/lib lld/lib/Core lld/lib/Driver lld/lib/ReaderWriter lld/lib/ReaderWriter/MachO lld...

2020-01-17 Thread Dimitry Andric
Author: dim
Date: Fri Jan 17 20:30:08 2020
New Revision: 356842
URL: https://svnweb.freebsd.org/changeset/base/356842

Log:
  Remove files from vendor/llvm-project/release-9.x which are unused, and
  never merged to contrib.

Deleted:
  vendor/llvm-project/release-9.x/libcxx/src/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/COFF/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/Common/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/ELF/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/docs/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/lib/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/lib/Core/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/lib/Driver/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/lib/ReaderWriter/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/lib/ReaderWriter/MachO/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/lib/ReaderWriter/YAML/CMakeLists.txt
  vendor/llvm-project/release-9.x/lld/tools/lld/CMakeLists.txt
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356841 - in vendor/llvm-project/master: clang/lib/Tooling/Transformer clang/tools/clang-offload-wrapper compiler-rt/lib/gwp_asan/scripts compiler-rt/tools libcxx/src lld lld/COFF lld/C...

2020-01-17 Thread Dimitry Andric
Author: dim
Date: Fri Jan 17 20:27:24 2020
New Revision: 356841
URL: https://svnweb.freebsd.org/changeset/base/356841

Log:
  Remove files from vendor/llvm-project/master which are unused, and never
  merged to contrib.

Deleted:
  vendor/llvm-project/master/clang/lib/Tooling/Transformer/CMakeLists.txt
  vendor/llvm-project/master/clang/tools/clang-offload-wrapper/
  vendor/llvm-project/master/compiler-rt/lib/gwp_asan/scripts/
  vendor/llvm-project/master/compiler-rt/tools/
  vendor/llvm-project/master/libcxx/src/CMakeLists.txt
  vendor/llvm-project/master/lld/CMakeLists.txt
  vendor/llvm-project/master/lld/COFF/CMakeLists.txt
  vendor/llvm-project/master/lld/Common/CMakeLists.txt
  vendor/llvm-project/master/lld/ELF/CMakeLists.txt
  vendor/llvm-project/master/lld/docs/CMakeLists.txt
  vendor/llvm-project/master/lld/lib/CMakeLists.txt
  vendor/llvm-project/master/lld/lib/Core/CMakeLists.txt
  vendor/llvm-project/master/lld/lib/Driver/CMakeLists.txt
  vendor/llvm-project/master/lld/lib/ReaderWriter/CMakeLists.txt
  vendor/llvm-project/master/lld/lib/ReaderWriter/MachO/CMakeLists.txt
  vendor/llvm-project/master/lld/lib/ReaderWriter/YAML/CMakeLists.txt
  vendor/llvm-project/master/lld/tools/lld/CMakeLists.txt
  vendor/llvm-project/master/lldb/source/Plugins/ABI/SysV-arc/CMakeLists.txt
  vendor/llvm-project/master/llvm/tools/llvm-ifs/
  vendor/llvm-project/master/llvm/tools/llvm-reduce/
  vendor/llvm-project/master/llvm/tools/vfabi-demangle-fuzzer/
  vendor/llvm-project/master/llvm/utils/TableGen/GlobalISel/CMakeLists.txt
  vendor/llvm-project/master/llvm/utils/add_argument_names.py
  vendor/llvm-project/master/llvm/utils/llvm-locstats/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r356832 - head/lib/libc/gen

2020-01-17 Thread Dimitry Andric
On 17 Jan 2020, at 16:45, Mateusz Guzik  wrote:
> 
> Author: mjg
> Date: Fri Jan 17 15:45:39 2020
> New Revision: 356832
> URL: https://svnweb.freebsd.org/changeset/base/356832
> 
> Log:
>  libc: fix build after r356830
> 
>  Apparently building with 'cd lib/libc; make all install' is not the same
>  as buildworld.

Definitely not, indeed.  Such a plain make will use your system's
headers for inclusion, not those in /usr/src.  Only use this when you
are certain those headers are up-to-date (or up-to-date enough ;).

-Dimitry



signature.asc
Description: Message signed with OpenPGP


svn commit: r356777 - stable/12/contrib/llvm-project/llvm/lib/Target/Mips

2020-01-15 Thread Dimitry Andric
Author: dim
Date: Thu Jan 16 07:02:09 2020
New Revision: 356777
URL: https://svnweb.freebsd.org/changeset/base/356777

Log:
  MFC r356701:
  
  Merge commit f46ba4f07 from llvm git (by Simon Atanasyan):
  
[mips] Use less registers to load address of TargetExternalSymbol
  
There is no pattern matched `add hi, (MipsLo texternalsym)`. As a
result, loading an address of 32-bit symbol requires two registers
and one more additional instruction:
```
addiu $1, $zero, %lo(foo)
lui   $2, %hi(foo)
addu  $25, $2, $1
```
  
This patch adds the missed pattern and enables generation more
effective set of instructions:
```
lui   $1, %hi(foo)
addiu $25, $1, %lo(foo)
```
  
Differential Revision: https://reviews.llvm.org/D66771
  
llvm-svn: 370196
  
  Merge commit 59bb3609f from llvm git (by Simon Atanasyan):
  
[mips] Fix 64-bit address loading in case of applying 32-bit mask to
the result
  
If result of 64-bit address loading combines with 32-bit mask, LLVM
tries to optimize the code and remove "redundant" loading of upper
32-bits of the address. It leads to incorrect code on MIPS64 targets.
  
MIPS backend creates the following chain of commands to load 64-bit
address in the `MipsTargetLowering::getAddrNonPICSym64` method:
```
(add (shl (add (shl (add %highest(sym), %higher(sym)),
  16),
 %hi(sym)),
16),
 %lo(%sym))
```
  
If the mask presents, LLVM decides to optimize the chain of commands.
It really does not make sense to load upper 32-bits because the
0x0fff mask anyway clears them. After removing redundant commands
we get this chain:
```
(add (shl (%hi(sym), 16), %lo(%sym))
```
  
There is no patterns matched `(MipsHi (i64 symbol))`. Due a bug in
`SYM_32` predicate definition, backend incorrectly selects a pattern
for a 32-bit symbols and uses the `lui` instruction for loading
`%hi(sym)`.
  
As a result we get incorrect set of instructions with unnecessary
16-bit left shifting:
```
lui at,0x0
R_MIPS_HI16 foo
dsllat,at,0x10
daddiu  at,at,0
R_MIPS_LO16 foo
```
  
This patch resolves two problems:
- Fix `SYM_32/SYM_64` predicates to prevent selection of patterns
  dedicated to 32-bit symbols in case of using N64 ABI.
- Add missed patterns for 64-bit symbols for `%hi/%lo`.
  
Fix PR42736.
  
Differential Revision: https://reviews.llvm.org/D66228
  
llvm-svn: 370268
  
  These two commits fix a miscompilation of the kernel for mips64, and
  should allow clang to be used as the default compiler for mips64.
  
  Requested by: arichards

Modified:
  stable/12/contrib/llvm-project/llvm/lib/Target/Mips/Mips.td
  stable/12/contrib/llvm-project/llvm/lib/Target/Mips/Mips64InstrInfo.td
  stable/12/contrib/llvm-project/llvm/lib/Target/Mips/MipsInstrInfo.td
Directory Properties:
  stable/12/   (props changed)
  stable/12/contrib/llvm-project/llvm/   (props changed)

Modified: stable/12/contrib/llvm-project/llvm/lib/Target/Mips/Mips.td
==
--- stable/12/contrib/llvm-project/llvm/lib/Target/Mips/Mips.td Thu Jan 16 
05:01:21 2020(r356776)
+++ stable/12/contrib/llvm-project/llvm/lib/Target/Mips/Mips.td Thu Jan 16 
07:02:09 2020(r356777)
@@ -25,6 +25,8 @@ class PredicateControl {
   list GPRPredicates = [];
   // Predicates for the PTR size such as IsPTR64bit
   list PTRPredicates = [];
+  // Predicates for a symbol's size such as hasSym32.
+  list SYMPredicates = [];
   // Predicates for the FGR size and layout such as IsFP64bit
   list FGRPredicates = [];
   // Predicates for the instruction group membership such as ISA's.
@@ -38,6 +40,7 @@ class PredicateControl {
   list Predicates = !listconcat(EncodingPredicates,
GPRPredicates,
PTRPredicates,
+   SYMPredicates,
FGRPredicates,
InsnPredicates,
HardFloatPredicate,

Modified: stable/12/contrib/llvm-project/llvm/lib/Target/Mips/Mips64InstrInfo.td
==
--- stable/12/contrib/llvm-project/llvm/lib/Target/Mips/Mips64InstrInfo.td  
Thu Jan 16 05:01:21 2020(r356776)
+++ stable/12/contrib/llvm-project/llvm/lib/Target/Mips/Mips64InstrInfo.td  
Thu Jan 16 07:02:09 2020(r356777)
@@ -700,7 +700,21 @@ let AdditionalPredicates = [NotInMicroMips] in {
 (DADDiu GPR64:$hi, tjumptable:$lo)>, ISA_MIPS3, GPR_64, SYM_64;
   def : MipsPat<(add GPR64:$hi, (MipsHigher (i64 tconstpool:$lo))),
 (DADDiu GPR64:$hi, tconstpool:$lo)>, 

svn commit: r356701 - head/contrib/llvm-project/llvm/lib/Target/Mips

2020-01-13 Thread Dimitry Andric
Author: dim
Date: Mon Jan 13 20:31:10 2020
New Revision: 356701
URL: https://svnweb.freebsd.org/changeset/base/356701

Log:
  Merge commit f46ba4f07 from llvm git (by Simon Atanasyan):
  
[mips] Use less registers to load address of TargetExternalSymbol
  
There is no pattern matched `add hi, (MipsLo texternalsym)`. As a
result, loading an address of 32-bit symbol requires two registers
and one more additional instruction:
```
addiu $1, $zero, %lo(foo)
lui   $2, %hi(foo)
addu  $25, $2, $1
```
  
This patch adds the missed pattern and enables generation more
effective set of instructions:
```
lui   $1, %hi(foo)
addiu $25, $1, %lo(foo)
```
  
Differential Revision: https://reviews.llvm.org/D66771
  
llvm-svn: 370196
  
  Merge commit 59bb3609f from llvm git (by Simon Atanasyan):
  
[mips] Fix 64-bit address loading in case of applying 32-bit mask to
the result
  
If result of 64-bit address loading combines with 32-bit mask, LLVM
tries to optimize the code and remove "redundant" loading of upper
32-bits of the address. It leads to incorrect code on MIPS64 targets.
  
MIPS backend creates the following chain of commands to load 64-bit
address in the `MipsTargetLowering::getAddrNonPICSym64` method:
```
(add (shl (add (shl (add %highest(sym), %higher(sym)),
  16),
 %hi(sym)),
16),
 %lo(%sym))
```
  
If the mask presents, LLVM decides to optimize the chain of commands.
It really does not make sense to load upper 32-bits because the
0x0fff mask anyway clears them. After removing redundant commands
we get this chain:
```
(add (shl (%hi(sym), 16), %lo(%sym))
```
  
There is no patterns matched `(MipsHi (i64 symbol))`. Due a bug in
`SYM_32` predicate definition, backend incorrectly selects a pattern
for a 32-bit symbols and uses the `lui` instruction for loading
`%hi(sym)`.
  
As a result we get incorrect set of instructions with unnecessary
16-bit left shifting:
```
lui at,0x0
R_MIPS_HI16 foo
dsllat,at,0x10
daddiu  at,at,0
R_MIPS_LO16 foo
```
  
This patch resolves two problems:
- Fix `SYM_32/SYM_64` predicates to prevent selection of patterns
  dedicated to 32-bit symbols in case of using N64 ABI.
- Add missed patterns for 64-bit symbols for `%hi/%lo`.
  
Fix PR42736.
  
Differential Revision: https://reviews.llvm.org/D66228
  
llvm-svn: 370268
  
  These two commits fix a miscompilation of the kernel for mips64, and
  should allow clang to be used as the default compiler for mips64.
  
  Requested by: arichards
  MFC after:3 days

Modified:
  head/contrib/llvm-project/llvm/lib/Target/Mips/Mips.td
  head/contrib/llvm-project/llvm/lib/Target/Mips/Mips64InstrInfo.td
  head/contrib/llvm-project/llvm/lib/Target/Mips/MipsInstrInfo.td

Modified: head/contrib/llvm-project/llvm/lib/Target/Mips/Mips.td
==
--- head/contrib/llvm-project/llvm/lib/Target/Mips/Mips.td  Mon Jan 13 
20:02:27 2020(r356700)
+++ head/contrib/llvm-project/llvm/lib/Target/Mips/Mips.td  Mon Jan 13 
20:31:10 2020(r356701)
@@ -25,6 +25,8 @@ class PredicateControl {
   list GPRPredicates = [];
   // Predicates for the PTR size such as IsPTR64bit
   list PTRPredicates = [];
+  // Predicates for a symbol's size such as hasSym32.
+  list SYMPredicates = [];
   // Predicates for the FGR size and layout such as IsFP64bit
   list FGRPredicates = [];
   // Predicates for the instruction group membership such as ISA's.
@@ -38,6 +40,7 @@ class PredicateControl {
   list Predicates = !listconcat(EncodingPredicates,
GPRPredicates,
PTRPredicates,
+   SYMPredicates,
FGRPredicates,
InsnPredicates,
HardFloatPredicate,

Modified: head/contrib/llvm-project/llvm/lib/Target/Mips/Mips64InstrInfo.td
==
--- head/contrib/llvm-project/llvm/lib/Target/Mips/Mips64InstrInfo.td   Mon Jan 
13 20:02:27 2020(r356700)
+++ head/contrib/llvm-project/llvm/lib/Target/Mips/Mips64InstrInfo.td   Mon Jan 
13 20:31:10 2020(r356701)
@@ -700,7 +700,21 @@ let AdditionalPredicates = [NotInMicroMips] in {
 (DADDiu GPR64:$hi, tjumptable:$lo)>, ISA_MIPS3, GPR_64, SYM_64;
   def : MipsPat<(add GPR64:$hi, (MipsHigher (i64 tconstpool:$lo))),
 (DADDiu GPR64:$hi, tconstpool:$lo)>, ISA_MIPS3, GPR_64, SYM_64;
+  def : MipsPat<(add GPR64:$hi, (MipsHigher (i64 texternalsym:$lo))),
+(DADDiu GPR64:$hi, texternalsym:$lo)>,
+ 

svn commit: r356518 - stable/12

2020-01-08 Thread Dimitry Andric
Author: dim
Date: Wed Jan  8 21:22:44 2020
New Revision: 356518
URL: https://svnweb.freebsd.org/changeset/base/356518

Log:
  MFC r354859:
  
  WITH_SYSTEM_LINKER: Fix rebuilding lld every time.
  
  This is due to LLD_REVISION_STRING being renamed to LLD_REVISION in
  r351442 and the value being moved to another location in r351965.
  
  `make test-system-linker` can be used to see the values being used here.
  
  Reported by:  ler

Modified:
  stable/12/Makefile.inc1
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/Makefile.inc1
==
--- stable/12/Makefile.inc1 Wed Jan  8 21:07:55 2020(r356517)
+++ stable/12/Makefile.inc1 Wed Jan  8 21:22:44 2020(r356518)
@@ -279,9 +279,9 @@ WANT_LINKER_TYPE=
 .if !defined(WANT_LINKER_FREEBSD_VERSION) && !make(showconfig) && \
 !make(test-system-compiler)
 .if ${WANT_LINKER_TYPE} == "lld"
-WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/lld/Common/Version.inc
+WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/VCSVersion.inc
 WANT_LINKER_FREEBSD_VERSION!= \
-   awk '$$2 == "LLD_REVISION_STRING" {gsub(/"/, "", $$3); print $$3}' \
+   awk '$$2 == "LLD_REVISION" {gsub(/"/, "", $$3); print $$3}' \
${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown
 WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc
 WANT_LINKER_VERSION!= \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356498 - in stable/12/lib: . libclang_rt

2020-01-08 Thread Dimitry Andric
Author: dim
Date: Wed Jan  8 17:23:52 2020
New Revision: 356498
URL: https://svnweb.freebsd.org/changeset/base/356498

Log:
  MFC r355034:
  
  libclang_rt: enable on powerpc*
  
  Summary:
  Enable on powerpc64 and in lib/libclang_rt/Makefile change
  MACHINE_CPUARCH to MACHINE_ARCH because on powerpc64
  MACHINE_ARCH==MACHINE_CPUARCH so the 32-bit library overwrites 64-bit
  library during installworld.
  
  This patch doesn't enable any other libclang_rt libraries because they
  need to be separately ported.
  
  I have verified that games/julius (which fails on powerpc64 elfv2
  without this change because of no libclang_rt profiling library) builds.
  
  Test Plan: Ship it, test on powerpc and powerpcspe
  
  Submitted by: pkubaj
  Reviewed by:  dim, jhibbits
  Differential Revision: https://reviews.freebsd.org/D22425

Modified:
  stable/12/lib/Makefile
  stable/12/lib/libclang_rt/Makefile.inc
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/Makefile
==
--- stable/12/lib/Makefile  Wed Jan  8 17:05:57 2020(r356497)
+++ stable/12/lib/Makefile  Wed Jan  8 17:23:52 2020(r356498)
@@ -158,7 +158,8 @@ SUBDIR.${MK_LDNS}+= libldns
 # built for certain architectures.
 .if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \
 (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \
-${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386")
+${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" || \
+${MACHINE_CPUARCH} == "powerpc")
 _libclang_rt=  libclang_rt
 .endif
 

Modified: stable/12/lib/libclang_rt/Makefile.inc
==
--- stable/12/lib/libclang_rt/Makefile.inc  Wed Jan  8 17:05:57 2020
(r356497)
+++ stable/12/lib/libclang_rt/Makefile.inc  Wed Jan  8 17:23:52 2020
(r356498)
@@ -8,7 +8,7 @@
 (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
 CRTARCH?=  armhf
 .else
-CRTARCH?=  ${MACHINE_CPUARCH:C/amd64/x86_64/}
+CRTARCH?=  ${MACHINE_ARCH:C/amd64/x86_64/}
 .endif
 CRTSRC=${SRCTOP}/contrib/llvm-project/compiler-rt
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r356469 - in stable/12/contrib/llvm-project: lld/ELF/Arch llvm/lib/Target/RISCV llvm/lib/Target/RISCV/MCTargetDesc

2020-01-07 Thread Dimitry Andric
Author: dim
Date: Tue Jan  7 20:13:31 2020
New Revision: 356469
URL: https://svnweb.freebsd.org/changeset/base/356469

Log:
  MFC r356329:
  
  Merge commit 41449c58c from llvm git (by Roger Ferrer Ibanez):
  
[RISCV] Fix evaluation of %pcrel_lo
  
The following testcase
  
  function:
  .Lpcrel_label1:
auipc   a0, %pcrel_hi(other_function)
addia1, a0, %pcrel_lo(.Lpcrel_label1)
.p2align2  # Causes a new fragment to be emitted
  
.type   other_function,@function
  other_function:
ret
  
exposes an odd behaviour in which only the %pcrel_hi relocation is
evaluated but not the %pcrel_lo.
  
  $ llvm-mc -triple riscv64 -filetype obj t.s | llvm-objdump  -d -r -
  
  :  file format ELF64-riscv
  
  Disassembly of section .text:
   function:
 0: 17 05 00 00 auipc   a0, 0
 4: 93 05 05 00 mv  a1, a0
0004:  R_RISCV_PCREL_LO12_I other_function+4
  
  0008 other_function:
 8: 67 80 00 00 ret
  
The reason seems to be that in RISCVAsmBackend::shouldForceRelocation
we only consider the fragment but in RISCVMCExpr::evaluatePCRelLo we
consider the section. This usually works but there are cases where
the section may still be the same but the fragment may be another
one. In that case we end forcing a %pcrel_lo relocation without any
%pcrel_hi.
  
This patch makes RISCVAsmBackend::shouldForceRelocation use the
section, if any, to determine if the relocation must be forced or
not.
  
Differential Revision: https://reviews.llvm.org/D60657
  
  This is a prerequisite for building and linking hard- and soft-float
  riscv worlds with clang and lld.
  
  Requested by: jhb
  
  MFC r356330:
  
  Merge commit da7b129b1 from llvm git (by James Clarke):
  
[RISCV] Don't force Local Exec TLS for non-PIC
  
Summary:
  
Forcing Local Exec TLS requires the use of copy relocations. Copy
relocations need special handling in the runtime linker when being
used against TLS symbols, which is present in glibc, but not in
FreeBSD nor musl, and so cannot be relied upon. Moreover, copy
relocations are a hack that embed the size of an object in the ABI
when it otherwise wouldn't be, and break protected symbols (which are
expected to be DSO local), whilst also wasting space, thus they
should be avoided whenever possible. As discussed in D70398, RISC-V
should move away from forcing Local Exec, and instead use Initial
Exec like other targets, with possible linker relaxation to follow.
The RISC-V GCC maintainers also intend to adopt this
more-conventional behaviour (see
https://github.com/riscv/riscv-elf-psabi-doc/issues/122).
  
Reviewers: asb, MaskRay
  
Reviewed By: MaskRay
  
Subscribers: emaste, krytarowski, hiraditya, rbar, johnrusso,
simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng,
edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe,
PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng,
sameer.abuasal, apazos, llvm-commits, bsdjhb
  
Tags: #llvm
  
Differential Revision: https://reviews.llvm.org/D70649
  
  This is a prerequisite for building and linking hard- and soft-float
  riscv worlds with clang and lld.
  
  Requested by: jhb
  
  MFC r356331:
  
  Merge commit c6b09bff5 from llvm git (by Luís Marques):
  
[RISCV] Fix wrong CFI directives
  
Summary: Removes CFI CFA directives that could incorrectly propagate
beyond the basic block they were inteded for. Specifically it removes
the epilogue CFI directives. See the branch_and_tail_call test for an
example of the issue. Should fix the stack unwinding issues caused by
the incorrect directives.
  
Reviewers: asb, lenary, shiva0217
Reviewed By: lenary
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69723
  
  This is a prerequisite for building and linking hard- and soft-float
  riscv worlds with clang and lld.
  
  Requested by: jhb
  
  MFC r356332:
  
  Merge commit d7be3eab5 from llvm git (by Luís Marques):
  
[RISCV] Handle fcopysign(f32, f64) and fcopysign(f64, f32)
  
Summary: Adds tablegen patterns to explicitly handle fcopysign where
the magnitude and sign arguments have different types, due to the
sign value casts being removed the by DAGCombiner. Support for RV32IF
follows in a separate commit. Adds tests for all relevant scenarios
except RV32IF.
  
Reviewers: lenary
Reviewed By: lenary
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70678
  
  This is a prerequisite for building and linking hard- and soft-float
  riscv worlds with clang and lld.
  
  Requested by: jhb
  
  MFC r356333:
  
  Merge commit 189b7393d from llvm git (by John Baldwin):
  

svn commit: r356468 - stable/12/contrib/llvm-project/llvm/lib/Target/X86

2020-01-07 Thread Dimitry Andric
Author: dim
Date: Tue Jan  7 20:09:58 2020
New Revision: 356468
URL: https://svnweb.freebsd.org/changeset/base/356468

Log:
  MFC r356256:
  
  Merge commit 468a0cb5f from llvm git (by Craig Topper):
  
[X86] Add X87 FCMOV support to X86FlagsCopyLowering.
  
Fixes PR44396
  
  Merge commit 86f48999f from llvm git (by Craig Topper):
  
[X86] Fix typo in getCMovOpcode.
  
The 64-bit HasMemoryOperand line was using CMOV32rm instead of
CMOV64rm. Not sure how to test this. We have no test coverage that
passes true for HasMemoryOperand.
  
  This fixes 'Assertion failed: (MI.findRegisterDefOperand(X86::EFLAGS) &&
  "Expected a def of EFLAGS for this instruction!"), function
  runOnMachineFunction' when compiling the misc/gpsim port for i386.
  
  Reported by:  yuri
  Upstream PR:  https://bugs.llvm.org/show_bug.cgi?id=44396

Modified:
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86InstrInfo.cpp
Directory Properties:
  stable/12/   (props changed)
  stable/12/contrib/llvm-project/llvm/   (props changed)

Modified: 
stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
==
--- stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp 
Tue Jan  7 20:09:02 2020(r356467)
+++ stable/12/contrib/llvm-project/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp 
Tue Jan  7 20:09:58 2020(r356468)
@@ -115,6 +115,10 @@ class X86FlagsCopyLoweringPass : public MachineFunctio
MachineBasicBlock::iterator TestPos, DebugLoc TestLoc,
MachineInstr , MachineOperand ,
CondRegArray );
+  void rewriteFCMov(MachineBasicBlock ,
+MachineBasicBlock::iterator TestPos, DebugLoc TestLoc,
+MachineInstr , MachineOperand ,
+CondRegArray );
   void rewriteCondJmp(MachineBasicBlock ,
   MachineBasicBlock::iterator TestPos, DebugLoc TestLoc,
   MachineInstr , CondRegArray );
@@ -334,6 +338,28 @@ static MachineBasicBlock (MachineBasicBlock
   return NewMBB;
 }
 
+static X86::CondCode getCondFromFCMOV(unsigned Opcode) {
+  switch (Opcode) {
+  default: return X86::COND_INVALID;
+  case X86::CMOVBE_Fp32:  case X86::CMOVBE_Fp64:  case X86::CMOVBE_Fp80:
+return X86::COND_BE;
+  case X86::CMOVB_Fp32:   case X86::CMOVB_Fp64:   case X86::CMOVB_Fp80:
+return X86::COND_B;
+  case X86::CMOVE_Fp32:   case X86::CMOVE_Fp64:   case X86::CMOVE_Fp80:
+return X86::COND_E;
+  case X86::CMOVNBE_Fp32: case X86::CMOVNBE_Fp64: case X86::CMOVNBE_Fp80:
+return X86::COND_A;
+  case X86::CMOVNB_Fp32:  case X86::CMOVNB_Fp64:  case X86::CMOVNB_Fp80:
+return X86::COND_AE;
+  case X86::CMOVNE_Fp32:  case X86::CMOVNE_Fp64:  case X86::CMOVNE_Fp80:
+return X86::COND_NE;
+  case X86::CMOVNP_Fp32:  case X86::CMOVNP_Fp64:  case X86::CMOVNP_Fp80:
+return X86::COND_NP;
+  case X86::CMOVP_Fp32:   case X86::CMOVP_Fp64:   case X86::CMOVP_Fp80:
+return X86::COND_P;
+  }
+}
+
 bool X86FlagsCopyLoweringPass::runOnMachineFunction(MachineFunction ) {
   LLVM_DEBUG(dbgs() << "** " << getPassName() << " : " << MF.getName()
 << " **\n");
@@ -593,6 +619,8 @@ bool X86FlagsCopyLoweringPass::runOnMachineFunction(Ma
 // Otherwise we can just rewrite in-place.
 if (X86::getCondFromCMov(MI) != X86::COND_INVALID) {
   rewriteCMov(*TestMBB, TestPos, TestLoc, MI, *FlagUse, CondRegs);
+} else if (getCondFromFCMOV(MI.getOpcode()) != X86::COND_INVALID) {
+  rewriteFCMov(*TestMBB, TestPos, TestLoc, MI, *FlagUse, CondRegs);
 } else if (X86::getCondFromSETCC(MI) != X86::COND_INVALID) {
   rewriteSetCC(*TestMBB, TestPos, TestLoc, MI, *FlagUse, CondRegs);
 } else if (MI.getOpcode() == TargetOpcode::COPY) {
@@ -849,6 +877,51 @@ void X86FlagsCopyLoweringPass::rewriteCMov(MachineBasi
   .setImm(Inverted ? X86::COND_E : X86::COND_NE);
   FlagUse.setIsKill(true);
   LLVM_DEBUG(dbgs() << "fixed cmov: "; CMovI.dump());
+}
+
+void X86FlagsCopyLoweringPass::rewriteFCMov(MachineBasicBlock ,
+MachineBasicBlock::iterator 
TestPos,
+DebugLoc TestLoc,
+MachineInstr ,
+MachineOperand ,
+CondRegArray ) {
+  // First get the register containing this specific condition.
+  X86::CondCode Cond = getCondFromFCMOV(CMovI.getOpcode());
+  unsigned CondReg;
+  bool Inverted;
+  std::tie(CondReg, Inverted) =
+  getCondOrInverseInReg(TestMBB, TestPos, TestLoc, Cond, CondRegs);
+
+  MachineBasicBlock  = *CMovI.getParent();
+
+  // Insert a direct test of the saved register.
+  insertTest(MBB, 

svn commit: r356467 - in stable/12: contrib/llvm-project/clang/lib/AST contrib/llvm-project/clang/lib/Basic/Targets contrib/llvm-project/compiler-rt/lib/builtins contrib/llvm-project/llvm/lib/Targe...

2020-01-07 Thread Dimitry Andric
Author: dim
Date: Tue Jan  7 20:09:02 2020
New Revision: 356467
URL: https://svnweb.freebsd.org/changeset/base/356467

Log:
  MFC r356100:
  
  Merge commit d3aeac8e2 from llvm git (by Justin Hibbits)
  
[PowerPC] Only use PLT annotations if using PIC relocation model
  
Summary:
The default static (non-PIC, non-PIE) model for 32-bit powerpc does
not use @PLT annotations and relocations in GCC.  LLVM shouldn't use
@PLT annotations either, because it breaks secure-PLT linking with
(some versions of?) GNU LD.
  
Update the available-externally.ll test to reflect that default mode
should be the same as the static relocation, by using the same check
prefix.
  
Reviewed by:sfertile
Differential Revision: https://reviews.llvm.org/D70570
  
  Reviewed by:  jhibbits
  Differential Revision: https://reviews.freebsd.org/D22913
  
  MFC r356104 (by jhibbits):
  
  [PowerPC] enable atomic.c in compiler_rt and do not check and forces
  lock/lock_free decisions in compiled time
  
  Summary:
  Enables atomic.c in compiler_rt and forces clang to not emit a call for 
runtime
  decision about lock/lock_free.  At compiling time, if clang can't decide if
  atomic operation can be lock free, it emits calls to external functions  like
  `__atomic_is_lock_free`, `__c11_atomic_is_lock_free` and
  `__atomic_always_lock_free`, postponing decision to a runtime check.  
According
  to LLVM code documentation, the mechanism exists due to differences between
  x86_64 processors that can't be decided at runtime.
  
  On PowerPC and PowerPCSPE (32 bits), we already know in advance it can't be 
lock
  free, so we force the decision at compile time and avoid having to implement 
it
  in an external library.
  
  This patch was made after 32 bit users testing the PowePC32 bit ISO reported
  llvm could not be compiled with in-base llvm due to `__atomic_load8` not
  implemented.
  
  Submitted by: alfredo.junior_eldorado.org.br
  Reviewed by:  jhibbits, dim
  
  Differential Revision:https://reviews.freebsd.org/D22549
  
  MFC r356112 (by jhibbits):
  
  [PowerPC64] Starting from FreeBSD 13.0, default to ELFv2 ABI
  
  This changes the LLVM default powerpc64 ABI to ELFv2, if target OS is
  FreeBSD >= 13.0
  
  This will also be sent upstream.
  
  Submitted by: alfredo.junior_eldorado.org.br
  Reviewed by:  dim, luporl
  Relnotes: YES
  Differential Revision:https://reviews.freebsd.org/D20383

Modified:
  stable/12/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
  stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
  stable/12/contrib/llvm-project/compiler-rt/lib/builtins/atomic.c
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  stable/12/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
  stable/12/lib/libcompiler_rt/Makefile.inc
Directory Properties:
  stable/12/   (props changed)
  stable/12/contrib/llvm-project/clang/   (props changed)
  stable/12/contrib/llvm-project/compiler-rt/   (props changed)
  stable/12/contrib/llvm-project/llvm/   (props changed)

Modified: stable/12/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp
==
--- stable/12/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp   Tue Jan 
 7 20:06:26 2020(r356466)
+++ stable/12/contrib/llvm-project/clang/lib/AST/ExprConstant.cpp   Tue Jan 
 7 20:09:02 2020(r356467)
@@ -9896,6 +9896,13 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const Call
   }
 }
 
+// Avoid emiting call for runtime decision on PowerPC 32-bit
+// The lock free possibilities on this platform are covered by the lines 
+// above and we know in advance other cases require lock
+if (Info.Ctx.getTargetInfo().getTriple().getArch() == llvm::Triple::ppc) {
+return Success(0, E);
+}
+
 return BuiltinOp == Builtin::BI__atomic_always_lock_free ?
 Success(0, E) : Error(E);
   }

Modified: stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.h
==
--- stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.hTue Jan 
 7 20:06:26 2020(r356466)
+++ stable/12/contrib/llvm-project/clang/lib/Basic/Targets/PPC.hTue Jan 
 7 20:09:02 2020(r356467)
@@ -375,12 +375,29 @@ class LLVM_LIBRARY_VISIBILITY PPC64TargetInfo : public
 IntMaxType = SignedLong;
 Int64Type = SignedLong;
 
+if (Triple.getEnvironment() != llvm::Triple::UnknownEnvironment) {
+  switch (Triple.getEnvironment()){
+case llvm::Triple::ELFv1:
+  ABI = "elfv1";
+  break;
+   default:
+  ABI = "elfv2";
+   break;
+  }
+} else {
+  if ((Triple.getOS() == llvm::Triple::FreeBSD) &&
+ (Triple.getOSMajorVersion() < 13)) {
+ABI = "elfv1";
+  } else {
+ABI = "elfv2";
+  }
+}
+
+
   

svn commit: r356466 - in stable/12/contrib/llvm-project/libcxx/include: . ext

2020-01-07 Thread Dimitry Andric
Author: dim
Date: Tue Jan  7 20:06:26 2020
New Revision: 356466
URL: https://svnweb.freebsd.org/changeset/base/356466

Log:
  MFC r356005:
  
  Merge commit f97936fab from llvm git (by Eric Fiselier):
  
[libc++] Cleanup and enable multiple warnings.
  
Too many warnings are being disabled too quickly. Warnings are
important to keeping libc++ correct. This patch re-enables two
warnings: -Wconstant-evaluated and -Wdeprecated-copy.
  
In future, all warnings disabled for the test suite should require an
attached bug. The bug should state the plan for re-enabling that
warning, or a strong case why it should remain disabled.
  
  This should fix a number of new g++ 9 warnings.
  
  Requested by: rlibby

Modified:
  stable/12/contrib/llvm-project/libcxx/include/__bit_reference
  stable/12/contrib/llvm-project/libcxx/include/__hash_table
  stable/12/contrib/llvm-project/libcxx/include/__tree
  stable/12/contrib/llvm-project/libcxx/include/ext/hash_map
  stable/12/contrib/llvm-project/libcxx/include/random
  stable/12/contrib/llvm-project/libcxx/include/valarray
Directory Properties:
  stable/12/   (props changed)
  stable/12/contrib/llvm-project/libcxx/   (props changed)

Modified: stable/12/contrib/llvm-project/libcxx/include/__bit_reference
==
--- stable/12/contrib/llvm-project/libcxx/include/__bit_reference   Tue Jan 
 7 20:01:59 2020(r356465)
+++ stable/12/contrib/llvm-project/libcxx/include/__bit_reference   Tue Jan 
 7 20:06:26 2020(r356466)
@@ -1108,8 +1108,12 @@ class __bit_iterator (public)
 #endif
 {}
 
+// avoid re-declaring a copy constructor for the non-const version.
+using __type_for_copy_to_const =
+  _If<_IsConst, __bit_iterator<_Cp, false>, struct __private_nat>;
+
 _LIBCPP_INLINE_VISIBILITY
-__bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT
+__bit_iterator(const __type_for_copy_to_const& __it) _NOEXCEPT
 : __seg_(__it.__seg_), __ctz_(__it.__ctz_) {}
 
 _LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT

Modified: stable/12/contrib/llvm-project/libcxx/include/__hash_table
==
--- stable/12/contrib/llvm-project/libcxx/include/__hash_table  Tue Jan  7 
20:01:59 2020(r356465)
+++ stable/12/contrib/llvm-project/libcxx/include/__hash_table  Tue Jan  7 
20:06:26 2020(r356466)
@@ -825,10 +825,12 @@ class __hash_node_destructor (private)
 
 allocator_type& __na_;
 
-__hash_node_destructor& operator=(const __hash_node_destructor&);
-
 public:
 bool __value_constructed;
+
+__hash_node_destructor(__hash_node_destructor const&) = default;
+__hash_node_destructor& operator=(const __hash_node_destructor&) = delete;
+
 
 _LIBCPP_INLINE_VISIBILITY
 explicit __hash_node_destructor(allocator_type& __na,

Modified: stable/12/contrib/llvm-project/libcxx/include/__tree
==
--- stable/12/contrib/llvm-project/libcxx/include/__treeTue Jan  7 
20:01:59 2020(r356465)
+++ stable/12/contrib/llvm-project/libcxx/include/__treeTue Jan  7 
20:06:26 2020(r356466)
@@ -775,10 +775,13 @@ class __tree_node_destructor (private)
 typedef __tree_node_types _NodeTypes;
 allocator_type& __na_;
 
-__tree_node_destructor& operator=(const __tree_node_destructor&);
 
 public:
 bool __value_constructed;
+
+
+__tree_node_destructor(const __tree_node_destructor &) = default;
+__tree_node_destructor& operator=(const __tree_node_destructor&) = delete;
 
 _LIBCPP_INLINE_VISIBILITY
 explicit __tree_node_destructor(allocator_type& __na, bool __val = false) 
_NOEXCEPT

Modified: stable/12/contrib/llvm-project/libcxx/include/ext/hash_map
==
--- stable/12/contrib/llvm-project/libcxx/include/ext/hash_map  Tue Jan  7 
20:01:59 2020(r356465)
+++ stable/12/contrib/llvm-project/libcxx/include/ext/hash_map  Tue Jan  7 
20:06:26 2020(r356466)
@@ -315,11 +315,12 @@ class __hash_map_node_destructor (private)
 
 allocator_type& __na_;
 
-__hash_map_node_destructor& operator=(const __hash_map_node_destructor&);
-
 public:
 bool __first_constructed;
 bool __second_constructed;
+
+__hash_map_node_destructor(__hash_map_node_destructor const&) = default;
+__hash_map_node_destructor& operator=(const __hash_map_node_destructor&) = 
delete;
 
 _LIBCPP_INLINE_VISIBILITY
 explicit __hash_map_node_destructor(allocator_type& __na)

Modified: stable/12/contrib/llvm-project/libcxx/include/random
==
--- stable/12/contrib/llvm-project/libcxx/include/randomTue Jan  7 
20:01:59 2020(r356465)
+++ 

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