Commit Graph

7507 Commits

Author SHA1 Message Date
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
roy
0450c156e9 Sync 2018-06-02 09:44:27 +00:00
roy
32efa79ab1 Import dhcpcd-7.0.5 with the following changes:
*  dhcp: Clarified some checksumming code, style and commentary
     (thanks to Maxime Villard)
  *  dhcp6: IAID is now unique per IA type rather than global
  *  ip6: if an IA callback causes a fork, exit earlier
2018-06-02 09:42:48 +00:00
christos
1a640231a9 Don't warn about undefined symbols when we sanitize, since we are not linking
against the sanitizers.
2018-06-02 01:40:52 +00:00
christos
1372179b4a Don't add a dynamic dependency to the sanitizer shared libaries in other
shared libraries.
2018-06-02 01:40:02 +00:00
christos
a62bd702e8 Don't sanitize the sanitizer. 2018-06-02 01:38:41 +00:00
christos
a4bb88f1bb Use a constant to prevent dynamic array allocation which messes up SSP. 2018-06-02 01:19:46 +00:00
mrg
7af9bd6f50 commit some note updates i wrote last august. 2018-06-01 21:46:18 +00:00
christos
11e4f7ba0a Generate xml files properly. Noted by youri.
XXX: pullup-8
2018-06-01 01:21:02 +00:00
kre
c0824e2dbe Avoid duplicate typedefs so these headers can be used
as part of tools build, when the base system compiler does
not allow duplicate type definitions.

Someone please fix this some better way than this!
2018-06-01 00:56:19 +00:00
christos
bbc1fb973a PR/50893: Bruce Lilly: Handle carp interfaces.
XXX: pullup-8 (in src/external/bsd/dhcp/dist/common/bpf.c)
2018-06-01 00:42:49 +00:00
kamil
ea3d16d0e0 Fix read of unitialized array elements in top(1)
The cp_old array is allocated with malloc(3) and its pointer is passed to
percentages64().

In this function there happens a calculation of total_change, which value
depends on the value inside the unitialized cp_old[] array.

==26662==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x268a2c in percentages64 /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6
#1 0x26748b in get_system_info /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:478:6
#2 0x25518e in do_display /usr/src/external/bsd/top/bin/../dist/top.c:507:5
#3 0x253038 in main /usr/src/external/bsd/top/bin/../dist/top.c:975:2
#4 0x21cad1 in ___start (/usr/bin/top+0x1cad1)
SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 in percentages64
Exiting

Fix this issue by changling malloc(3) with calloc(3).

Detected with Memory Sanitizer during the integration of sanitizers with
the NetBSD basesystem.

Reported by <Yang Zheng>
2018-05-31 10:14:21 +00:00
mrg
197fc894d1 fix XORG_PKG_PACKAGE_NAME to not include multiple quotes for PACKAGE_NAME,
and add a XORG_PKG_RELEASE_DATE to define RELEASE_DATE.
2018-05-31 09:31:39 +00:00
kamil
3ff7937744 Fix unitialized signal mask passed to sigaction(2) in top(1)
Detected with Memory Sanitizer during the integration of sanitizers with
the NetBSD basesystem.

Reported by <Yang Zheng>
2018-05-31 09:20:05 +00:00
mrg
4a035634ac remove unused include. 2018-05-31 09:09:32 +00:00