Commit Graph

7621 Commits

Author SHA1 Message Date
christos
b2c71d2ddb aarch64 does not have PT_STEP so we start from 0. 2018-07-12 23:18:28 +00:00
joerg
44317eea7c Static PIE should have no linker, otherwise it isn't really static. 2018-07-12 21:39:24 +00:00
joerg
e897e0bb41 PT_PHDR is useful without PT_INTERP, i.e. for static PIE. It removes the
need for platform-specific computations of _DYNAMIC and friends.
2018-07-12 21:38:16 +00:00
macallan
8279ef98c5 build EXA support for nv driver 2018-07-12 21:22:20 +00:00
christos
cc9713c527 regen aarch64 2018-07-12 00:16:32 +00:00
christos
0eedf677ec it is not xx but nn that we want. also add missing dependencies. 2018-07-11 14:51:34 +00:00
christos
b28c7e7ccb fix signness issues. 2018-07-11 13:52:35 +00:00
christos
d5e850450b Add another elfxx conversion. 2018-07-11 13:44:04 +00:00
christos
45cf9d8189 new config files for aarch64 but no progress in getting it to work. 2018-07-11 13:34:27 +00:00
maya
dbf7303b20 Add missing file to openchrome driver.
Prior to this commit, startx failed with a missing symbol.
2018-07-10 17:36:38 +00:00
christos
70306f7025 FIx reproducible builds for EFI boot blocks (from HEAD) 2018-07-09 12:15:31 +00:00
kre
3b6b60d23d Apply the change made to binutils:
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.
2018-07-09 11:55:45 +00:00
christos
cf2d7e97b8 New arp code needs RTF_LLDATA for DELETE to work!
XXX: pullup-8
2018-07-08 21:01:21 +00:00
christos
4522373d91 enable coff/pe executable vectors for i386 for the efi bootblocks.
XXX: pullup-8
2018-07-08 16:53:56 +00:00
triaxx
7d3291fe74 Fix an inconsistency that showed /var/db/duid in the man page while the
binary opened /var/db/dhcpcd/duid.
2018-07-05 05:41:17 +00:00
maya
7ed863e55f Claim to have getopt_long.
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)
2018-07-04 12:25:48 +00:00
christos
4b2f952390 Use the fonts from our installed directory not the system when we are a tool!
Martin found it.
XXX pullup-8
2018-07-03 21:12:10 +00:00
christos
9951f8b9e4 vaxinate the sanitizer build. 2018-07-01 17:41:49 +00:00
christos
46e5459c53 disable one more size check for _LP32 to make pcc build. 2018-07-01 14:20:23 +00:00
mbalmer
62e2d99666 Apply bugfix #7 from lua.org/bugs.html: Memory-allocation error when resizing
a table can leave it in an inconsistent state.
2018-07-01 10:08:38 +00:00
roy
b729dec75a Remove dhclient from the base system.
Discussed here:
https://mail-index.netbsd.org/tech-userlevel/2018/06/21/msg011233.html
2018-06-29 12:34:13 +00:00
kamil
cd35dc3d84 Rework the changes to DTRACE/ZFS files that were fixing Clang/LLVM build
Rever changes to upstream files and replace them with additional -Wno-
compiler argument flags.

Tested with base LLVM.

Requested by <chuq>
2018-06-29 11:33:46 +00:00
kre
cb552d924c Remove (recently) commented out (recently added) liblsan SUBDIR
(it has been added a different way.)
2018-06-28 14:01:12 +00:00
christos
0fd9ea3645 put back lsan 2018-06-28 10:14:01 +00:00
maya
97fc8f3ce3 Correctly specify that iasl needs to be case insensitive.
Fixes PR bin/53405. thanks to martin.
2018-06-28 07:56:22 +00:00
maya
746c9ac266 Remove unused code. No functional change intended.
- We don't need to define __NetBSD__, C compilers do this for us.
- Defines which don't appear anywhere in src
- Don't need libpthread/librt
2018-06-27 16:13:43 +00:00
christos
ecf509af59 Reduce sizes for non _LP64 and compiler checks so that the code compiles
(but it will not work, since there is not enough address space to implement
the shadow space required).
2018-06-27 15:57:20 +00:00
christos
3a31568ee3 use the proper types for operator new 2018-06-27 15:56:30 +00:00
martin
9a2749bc95 Disable liblsan for now - it seems to be 64bit only - all 32bits are
failing and the 64bit ones with compat 32bit do not work either.
2018-06-27 06:06:39 +00:00
kre
94c5c83f44 Since liblsan has been added to the sets already, we should build it. 2018-06-27 01:25:49 +00:00
christos
ae60fed3bd remove temp hack. 2018-06-26 21:06:45 +00:00
christos
92d3d99452 Add support for lsan (Leak Sanitizer), crashes on exit, but works from gdb... 2018-06-26 20:55:37 +00:00
christos
748fe90b99 Add lsan support. 2018-06-26 20:54:32 +00:00
kamil
eb8a7705cd Avoid UB in tmux/window_copy_add_formats()
Do not perform NULL pointer arithmetics.

Reported with MKSANITIZER/UBSan.

The patch proposed by upstream https://github.com/tmux/tmux/issues/1382
2018-06-25 18:41:25 +00:00
kamil
54b8bd3463 Include <stddef.h> for offsetof(3) 2018-06-25 18:36:36 +00:00
kamil
ee01cd1e81 Specify SANITIZER_RENAME_SYMBOL in cvs
Rename local versions of regcomp regerror regexec regfree in order to
remove symbol clash with libc.
2018-06-25 18:03:56 +00:00
kamil
45d1d00b99 Specify SANITIZER_RENAME_SYMBOL in grep
Rename local versions of regcomp regerror regexec regfree in order to
remove symbol clash with libc.
2018-06-25 18:02:49 +00:00
kamil
f1e4bfafe7 Specify SANITIZER_RENAME_SYMBOL in diffutils
Rename local versions of regcomp regerror regexec regfree in order to
remove symbol clash with libc.
2018-06-25 18:01:13 +00:00
kamil
17b10cd3f4 Specify SANITIZER_RENAME_SYMBOL in nvi
Rename local versions of regcomp regerror regexec regfree in order to
remove symbol clash with libc.
2018-06-25 18:00:34 +00:00
kamil
626dd188a2 Avoid unportable offsetof(3) calculation in nvi in log1.c
Detected with MKSANITIZER/UBSan.
2018-06-25 17:42:34 +00:00
kamil
ff37330f94 Fix typo in previous
The -Wno-format-extra-args argument to Clang/LLVM needs trailing 's'.

Noted by <joerg>
2018-06-24 19:27:26 +00:00
kamil
64bc8aa106 Specify -Wno-format-extra-args for Clang/LLVM in gpl2/gettext
This is needed with Clang v. 7svn (HEAD) 2018-06-23 snapshot.
2018-06-23 20:15:23 +00:00
christos
18b55cf995 Fix thread debugging. 2018-06-23 03:15:55 +00:00
christos
d91bf8b52c Explain the -Bstatic -Bdynamic dance. 2018-06-22 20:48:43 +00:00
christos
3306a1539a match our number of registers. 2018-06-22 19:41:40 +00:00
christos
60d5c279c7 use the right emulation 2018-06-22 19:41:16 +00:00
christos
32fa9de216 Don't look in random (legacy) places for fonts. We want reproducible builds
to work.
XXX: pullup-8
2018-06-22 17:28:27 +00:00
roy
8a7c7b0681 Sync 2018-06-21 11:58:23 +00:00
roy
8798a27054 Import dhcpcd-7.0.6 with the following changes:
*  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
2018-06-21 11:55:19 +00:00
kamil
69ca0c2f24 Make building of dhcp compatible with MKSANITIZER
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).
2018-06-21 11:02:48 +00:00
kamil
b3019d4b3d Correct previous change to CHAR_T_OFFSET
The intended operation is offsetof(), not alignof().

Noted by <christos>
2018-06-16 21:00:12 +00:00
kamil
4e2759a682 Do not cause Undefined Behavior in vi(1)
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.
2018-06-16 18:54:52 +00:00
gson
7c2276b8da Use space between words 2018-06-16 15:18:33 +00:00
wiz
20caeb0eac Fix Dd argument. Remove unnecessary whitespace. 2018-06-15 23:15:56 +00:00
christos
fdf2ea1385 Add -n (don't send mail if command exited normally) option. From OpenBSD via
Job Snidjers.
2018-06-14 22:04:28 +00:00
christos
4911152229 Replace with the OpenBSD man page. It removes some historical comparisons
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.
2018-06-14 22:02:57 +00:00
kamil
079a9ba6ba Make the alignof() usage more portable in grep(1)
Remove NetBSD specific check and replace it with GCC extension __alignof__
that is available since GCC 2.x.

Requested by <kre>
2018-06-14 10:14:39 +00:00
kamil
8317e0eadb Avoid Undefind Behavior in DEFAULT_ALIGNMENT in GNU grep(1)
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.
2018-06-13 17:32:29 +00:00
maya
93c55cb558 Avoid declaring ulonglong_t.
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.
2018-06-13 04:21:21 +00:00
kamil
1ec328561f Prevent Undefined Behavior in shift of signed integer in grep(1)
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>
2018-06-12 21:22:47 +00:00
kamil
463be44101 Do not use index out of bounds in nawk
$ 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>
2018-06-12 13:24:28 +00:00
christos
9137a68872 use LIBISCXX = yes, instead of hard-coding the c++ library. Suggested by joerg 2018-06-11 15:29:33 +00:00
christos
b1e04fb08c Add libstdc++ again; needed for:
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'
2018-06-11 12:47:47 +00:00
christos
2357fc5dd5 use SUBDIR.roff suggested by uwe@ 2018-06-10 17:55:11 +00:00
christos
1ed1559579 don't depend on libstdc++ 2018-06-09 22:40:00 +00:00
christos
db50de0d5b consistency, define to empty. 2018-06-09 22:39:29 +00:00
rjs
272c99c1b7 Add missing xcb files to build.
Fixes xsrc/53337.
2018-06-07 18:16:55 +00:00
kamil
d2d2a14700 Replace HAVE_GCC with ACTIVE_CC == gcc checks
Kernel modules build with GCC and Clang/LLVM.

Requested by <joerg>
2018-06-07 13:21:44 +00:00
kamil
60490a027e Correct compilation of osnet/dev/systrace/systrace.c under Clang
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>
2018-06-06 17:47:10 +00:00
kamil
3982d87926 Correct compilation of osnet/dev/profile/profile.c under Clang
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>
2018-06-06 17:19:49 +00:00
kamil
afef2ab3de Correct compilation of osnet/dev/dtrace/x86/dis_tables.c under Clang
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>
2018-06-06 17:16:56 +00:00
kamil
9a546da821 Correct compilation of osnet/dev/dtrace/dtrace_hacks.c under Clang
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>
2018-06-06 15:54:03 +00:00
kamil
03c04814f0 Correct compilation of osnet/dist/uts/common/dtrace/dtrace.c under Clang
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>
2018-06-06 15:24:57 +00:00
kamil
ec5a3bbdb8 Swap conditions HAVE_LLVM -> HAVE_GCC 2018-06-06 15:01:13 +00:00
kamil
76b9fb4568 Make cddl/osnet/Makefile.zfs compatible with MKLLVM=yes
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>
2018-06-06 14:47:54 +00:00
kamil
8627ada168 Correct compilation of osnet/dist/cmd/dtrace/dtrace.c under Clang
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>
2018-06-06 14:46:58 +00:00
kamil
54f848644c Make cddl/osnet/usr.sbin/dtrace -W compatible with MKLLVM=yes
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>
2018-06-06 14:31:45 +00:00
kamil
38533b841d Make cddl/osnet/lib/libdtrace buildable with MKLLVM=yes
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>
2018-06-06 14:18:39 +00:00
kamil
3aa96d1801 Don't pass -z defs to libc++ with MKSANITIZER=yes
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>
2018-06-06 12:02:43 +00:00
snj
5e36459aec belatedly bump the shlib version for freetype-2.9.1, using the scheme
outlined in src/external/mit/xorg/lib/freetype/shlib_version.
2018-06-06 03:09:12 +00:00
snj
f051e27d61 prune unused-for-5-years Makefile that bogusly installed internal headers. 2018-06-06 02:26:46 +00:00
snj
f62205a9ad - remove duplicate ftpfr.c from SRCS
- psmodule.c -> psnames.c
2018-06-06 02:20:07 +00:00
snj
3120750dcb rats in my attic, mice in my top. i've had enough of these damn rodents. 2018-06-06 02:12:47 +00:00
christos
cc268b724c remove <sys/proc.h> done in the dtrace header now. 2018-06-05 12:04:19 +00:00
christos
61c2ab4099 add <sys/proc.h> because the header needs proc_t kthread_t etc. 2018-06-04 21:36:03 +00:00
christos
fbc4edde8d better to put this (<sys/proc.h>) in the dtrace header where the definitions
are needed.
2018-06-04 21:35:29 +00:00
kre
fea21eb07e The (dtrace version of) <sys/proc.h> is needed for kthread_t
(same as the amd64 version).   This should fix (one of) the
current i386 build breakages.
2018-06-04 20:12:45 +00:00
roy
03a87bcca2 Sync 2018-06-04 16:45:52 +00:00
martin
f96e65b81e Quick hack to fix 32bit big endian platforms: the return value from
__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.
2018-06-04 13:12:54 +00:00
roy
90122e541e Sync 2018-06-04 09:56:16 +00:00
roy
53aec9c10e Import dhcpcd-7.0.5a.
Only change is to fix builds without INET6.
2018-06-04 09:55:13 +00:00
christos
8f1adcbb03 Add a blurb of a general approach how to maintain these files. 2018-06-03 20:59:49 +00:00
christos
68837537fe The native mutex.h has a userland visible portion. make it so and fix the
build.
2018-06-03 14:56:52 +00:00
rin
65b076fb4d Make sure that every wide char occupies at least one display width:
- 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.
2018-06-03 08:08:36 +00:00
chs
bbfe9dbd31 tweak the osnet compat headers to allow building on MacOS and Linux hosts. 2018-06-03 05:55:08 +00:00
eadler
94ea5fdc4c top(1): revert 1.11
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.
2018-06-03 05:29:27 +00:00
chs
01d6e97218 avoid calling kpause() with a delay of 0. 2018-06-03 03:05:56 +00:00
eadler
6aed99669b top(1): chdir to / at init
This allows us to unmount whatever directory we happen to be in when we
started top(1).

ok phone
2018-06-02 22:30:19 +00:00
christos
5a38769f09 - Remove more extraneous includes to avoid circular dependencies with the
real header files.
- Add <sys/errno.h> to <sys/systm.h> to avoid changing the source, but
  it should really belong to the source.
2018-06-02 18:46:34 +00:00
christos
50f0215b97 don't include <sys/proc.h> 2018-06-02 15:47:22 +00:00