Committed By: christos
Date: Sun Jul 8 16:53:56 UTC 2018
Modified Files:
src/external/gpl3/binutils/dist/bfd: config.bfd
src/external/gpl3/binutils/lib/libbfd/arch/i386: defs.mk
Log Message:
enable coff/pe executable vectors for i386 for the efi bootblocks.
XXX: pullup-8
to binutils.old (which is what i386 is using). Should unbreak the build.
We do, and packages occasionally expect the long options to exist.
Pointed out while investigating
PR pkg/53425: graphics/py-matplotlib 2.2.2 import fails
(which is not fixed by this commit)
* fixed compile issues with prior release
* fixed carrier loss not being detected for IPv4
* UUID based DUID is used where available and no prior DUID exists
Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled MKSANITIZER.
These options are incompatible with the current design of sanitizers,
because they cause duplication of symbols into programs and thus symbols
from the interceptors from sanitizers cannot be linked.
This change makes effectively mounting /usr required for dhcp programs like
dhclient(8).
Replace unportable manual calculation of alignof() that causes UB, with
a GCC extension __alignof__.
This fixes a problem reported by UBSan with the MKSANITIZER distribution.
that are not very useful (and trully if any they belong to a separate section
instead of being interspersed in the document), and organizes and formats
the information better.
Replace homegrown logic of calculating alignment with alignof, a C11 header
feature.
Add a check for NetBSD >= 8.0 just in case that someone will want to build
it on older NetBSD.
Issue detected with UBSan.
Comment here already says it isn't necessary and will be removed.
Hasten the process for us and avoid the problematic typedef.
This is useful because u_longlong_t would otherwise need to be
provided by compat headers.
There is an interface in grep: dfa.c with functions to test bit, set bit,
clear bit etc. They operate over the INT-wide mask (INTBITS). Use unsigned
shift in these interfaces to prevent UB.
Detected with MKSANITIZER with the undefined behavior sanitizer option.
Sponsored by <The NetBSD Foundation>
$ awk '{w=$1}' < /dev/null
/public/src.git/external/historical/nawk/bin/../dist/lex.c:476:16: runtime error: index -1 out of bounds for type 'const Keyword [46]'
There used to be documented a bug in the code that index ouf of bounds
can in theory fault (by daniel barrett).
Before assigning the pointer, first check for the index whether it's not
not -1. This was a suggested solution in the comment in the code.
The sanitizer is overcautious as this pointer wasn't dereferenced, but
fix is nonetheless.
Sponsored by <The NetBSD Foundation>
undefined reference to `typeinfo for __cxxabiv1::__class_type_info'
undefined reference to `typeinfo for __cxxabiv1::__si_class_type_info'
undefined reference to `typeinfo for __cxxabiv1::__vmi_class_type_info'
undefined reference to `typeinfo for std::type_info'
undefined reference to `__dynamic_cast'
Mark arguments to dtrace_probe_lookup() with __UNCONST().
The proper fix constifying it causes pollution of const in too many files.
This could be done with -W flags, but they are incompatible between
compilers.
This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.
Sponsored by <The NetBSD Foundation>
Constify char* types when initialized with liternals.
This could be done with -W flags, but they are incompatible between
compilers.
This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.
Sponsored by <The NetBSD Foundation>
Constify dgr_suffix.
This could be done with -W flags, but they are incompatible between
compilers.
This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.
Sponsored by <The NetBSD Foundation>
Use __UNCONST() to remove const from an argument.
This could be done with -W flags, but they are incompatible between
compilers.
This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.
Sponsored by <The NetBSD Foundation>
Add missing const keywords in dtrace_strncmp().
Initialize lim1 and lim2 to zero always. This prevents a false positive
about potentially unset but used variable.
This could be done with -W flags, but they are incompatible between
compilers.
This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.
Sponsored by <The NetBSD Foundation>
Clang/LLVM does not recognize:
- -Wno-discarded-qualifiers
This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.
Sponsored by <The NetBSD Foundation>
Add missing const keywords.
This could be done with -W flags, but they are incompatible between
compilers.
This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.
Sponsored by <The NetBSD Foundation>
Clang/LLVM does not recognize:
- -Wno-discarded-qualifiers
- -Wno-unused-but-set-variable
This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.
Sponsored by <The NetBSD Foundation>
Clang/LLVM does not recognize:
- -Wno-maybe-uninitialized
- -Wno-unused-but-set-variable
MKGCC=yes still builds the distribution.
This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.
Sponsored by <The NetBSD Foundation>
Sanitizers are conflicting with this option:
When linking shared libraries, the AddressSanitizer run-time is not
linked, so -Wl,-z,defs may cause link errors (t use it with
AddressSanitizer).
https://clang.llvm.org/docs/AddressSanitizer.html
When linking shared libraries, the MemorySanitizer run-time is not
linked, so -Wl,-z,defs may cause link errors (t use it with
MemorySanitizer).
https://clang.llvm.org/docs/MemorySanitizer.html
Solution suggested by <christos>
Root cause of breaking libc++ investigated by <Yang Zheng>
__syscall() needs to be shifted into the lower 32bits to form a proper
pointer. Temporarily steal __SYSCALL_TO_UINTPTR_T from the syscall/__syscall
test program, Kamil is working on a proper solution.
- Replace non-printable multibyte char with ?-symbol.
- Put space before non-spacing char.
Fix problems reported in PR bin/53164 and
PR bin/53323, that are because we did not take into account non-printable
multibyte char of wctob(wc) == EOF && wcwidth(wc) == -1.
This change breaks the expectations of users that would like a coredump
of top(1). Other similar applications such as vmstat(1) don't do this.
Since the change was just a courtesy, revert.