Commit Graph

2835 Commits

Author SHA1 Message Date
mrg
0d35e2c2c3 i386 -> GCC 8. 2019-11-16 10:22:20 +00:00
maxv
65ee926c5a Make kMSan compatible with KCOV. With kMSan we are forced to stay with the
fsanitize flag on subr_kcov.c, which means that kMSan will instrument KCOV.
We add a bunch of __nomsan attributes to reduce this instrumentation, but
it does not remove it completely. That's fine.
2019-11-15 09:44:44 +00:00
joerg
3cdbfa93d9 Restore pax-as-tar. 2019-11-13 22:32:16 +00:00
maxv
b7edd3d132 Add Kernel Concurrency Sanitizer (kCSan) support. This sanitizer allows us
to detect race conditions at runtime. It is a variation of TSan that is
easy to implement and more suited to kernel internals, albeit theoretically
less precise than TSan's happens-before.

We do basically two things:

 - On every KCSAN_NACCESSES (=2000) memory accesses, we create a cell
   describing the access, and delay the calling CPU (10ms).

 - On all memory accesses, we verify if the memory we're reading/writing
   is referenced in a cell already.

The combination of the two means that, if for example cpu0 does a read that
is selected and cpu1 does a write at the same address, kCSan will fire,
because cpu1's write collides with cpu0's read cell.

The coverage of the instrumentation is the same as that of kASan. Also, the
code is organized in a way similar to kASan, so it is easy to add support
for more architectures than amd64. kCSan is compatible with KCOV.

Reviewed by Kamil.
2019-11-05 20:19:17 +00:00
martin
66ef6a30f0 PR misc/54657: let RELEASEMACHINEDIR default to ${MACHINE}-${MACHINE_ARCH}
for evb{arm,mips,sh3}*.
2019-10-31 06:43:19 +00:00
maxv
a8c6c0bf54 Add nvmmctl, with two commands for now. 2019-10-28 13:04:18 +00:00
christos
20f77b55bf 1. All Makefiles that use ARM_APCS_FLAGS add -marm unconditionally and
bsd.own.mk also adds it for gcc only (so we end up with 2 -marm for gcc).
   Just add -marm unconditionally in bsd.own.mk in ARM_APCS_FLAGS and remove
   it from everywhere else.
2. gcc-8 now warns about thumb internetwork in APCS mode. This does not make
   sense because the documentation says that this flag does not make a
   difference in apcs mode, but might produce larger code in non-APCS mode.
   So we just add it to silence the warnings.
2019-10-24 18:46:20 +00:00
christos
78be1c9f56 move a{md,arch}64 to gcc 8 2019-10-22 13:49:30 +00:00
christos
0c7a7c13c0 Allow individual lex and yacc sources to override/extend LFLAGS and YFLAGS
respectively.
2019-10-15 15:05:00 +00:00
mrg
69f74cd544 make GCC_NO_STRINGOP_OVERFLOW apply to gcc 7 too. 2019-10-13 10:12:13 +00:00
mrg
de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
jhigh
0090dad153 added backend support for argon2 password scheme 2019-10-09 13:13:08 +00:00
uwe
0892295b90 Don't add -Wabi to CXXFLAGS for gcc 8. It warns about differences
from the most up-to-date ABI, which in gcc 8 is used by default.
XXX: This needs a better condition.
2019-10-05 18:37:39 +00:00
mrg
4be7da17b5 gcc 7 can now be found in gcc.old. 2019-09-29 22:10:55 +00:00
bad
c296e4670d Also don't add a sysroot at all if a rumpkernel build. 2019-09-15 21:17:08 +00:00
maya
4bf438acf0 Allow overriding the default man substitutions with X11EXTRAMANTRANSFORMS 2019-09-13 10:23:07 +00:00
kamil
1a5f018b01 Enhance the support of LLVM sanitizers
Define _REENTRANT for MKSANITIZER build. This is needed for at least stdio
code. This caused new build issued with duplicated symbols in few places
and rump kernel code picking different code paths borrowed from libc.
Handle all this in one go.

Add bsd.sanitizer.mk to share common code used by programs and libraries.

Switch from realall to beforeinstall target in .syms files. This is more
reliable in MKSANITIZER.
2019-08-27 22:48:53 +00:00
mrg
1db21b1df3 fix MKCXX=no:
- don't build GDB
- don't build sanitizers
- don't build GCC commands
- fix some set lists
2019-08-23 08:17:26 +00:00
kamil
92253c7761 Add PAXCTL_FLAG rules for MKSANITIZER
Add per-program rules to disable ASLR for ASan, TSan and MSan in all
sanitized programs. This flag is not needed for other supported sanitizers.

Without this change, sanitized init(8) dies early on startup.

Approach originally suggested by <joerg>
2019-08-17 00:14:48 +00:00
kamil
0e6f677375 Add SANITIZER_RENAME_CLASSES in bsd.prog.mk
This adds a more flexible version of SANITIZER_RENAME_SYMBOL.

New symbol allows to specify MKSANITIZER specific renames on per-file and
per-symbol basis.
2019-08-15 08:42:59 +00:00
christos
a3a94da6c9 Add a script to compare the library lists so we can keep them in sync easier. 2019-08-10 12:50:36 +00:00
christos
9b5a96cd27 Make the X11 library lists consistent again. 2019-08-10 12:46:38 +00:00
christos
806cddf3f2 Don't install PIC libraries by default because they are too big since they
contain debug symbols. I supplied a patch in PR/54449 to remove the debugging
symbols but folks preferred to not install them at all.
2019-08-10 12:20:17 +00:00
roy
cb24add28c MKBSDTAR now defaults to yes
Starting to see some modern archives not opening, it's time to make them
work!

OK joerg@ agc@
2019-07-24 09:28:29 +00:00
mrg
9d9d771525 add util-macros src dir. 2019-07-20 20:25:35 +00:00
wiz
c4e128da50 Install the nouveau gm206 firmware as used by my graphics card.
Also add the other gm20x nouveau firmwares to the source tree
to make it easier to add them for someone who can test them.

Installed if MKNOUVEAUFIRMWARE is set to 'yes'.
This defaults to no except on amd64 and i386 (like for radeon).
2019-07-20 19:09:21 +00:00
mrg
f791ec1b3a break the build if a .pc generation leaves something matching "@.*@".
this is an error in the build that doesn't trigger issues until you
try to integrate with eg, pkgsrc.
2019-07-10 21:53:35 +00:00
hannken
ce2428b9c3 When building a module keep symbols if built with "MKCTF" and "COPTS=-g". 2019-07-05 08:28:16 +00:00
mrg
b436459a98 turn on MKLLVMRT for aarch64 X11 builds.
with llvmpipe vs swrast, on pinebook 1080p i see 6x speed up for glxgears,
seamonkey & google maps is significantly faster, and ksudoku is workable.
2019-06-11 04:52:44 +00:00
mrg
963bac2566 minor hack fix for the previous:
MKX11 is used before it was defaulted, leading to eg:

... Malformed conditional (${MKX11} != "no" && ${HAVE_MESA_VER} == "18")

gain knowledge that it defaults to "no" immediately below.
could split this list, but seems uglier.
2019-06-02 21:29:13 +00:00
mrg
047719ee02 fix building x86 with X11 but not LLVM:
- change the defaults for MKLLVMRT and MKX11 so we don't have to
  force-override later.  this makes "build.sh -V MKLLVMRT=no"
  work to disable building the LLVM Mesa components.

- in gallium, don't BUILD_RADEON if MKLLVMRT is no.

this stops GL from working, but basic X seems OK enough for Xvideo
to still work on modern radeon (ie, video mostly works fine, though
eg, "mpv -vo gpu" won't.  use "mpv -vo xv".)
2019-06-02 11:35:55 +00:00
mrg
ac10ab4460 xorg-server 1.20.5 is now current. 2019-06-01 06:57:03 +00:00
christos
39d9abd938 Everyone is on gdb-8.3 now. 2019-05-30 21:33:57 +00:00
christos
61da06b1fb add vax to new gdb 2019-05-30 01:20:41 +00:00
christos
7bb3ca8936 move sparc* to new gdb. 2019-05-29 22:12:16 +00:00
christos
a9359532ef Add i386 2019-05-29 18:19:03 +00:00
christos
fb2b3c4056 amd64 switched to gdb-8.3 2019-05-29 01:57:59 +00:00
christos
70494b87c4 build gdb from gdb.old 2019-05-26 20:26:43 +00:00
kamil
7d75527c60 Allow to use KCOV + kASan together
Stop instrumenting KCOV files with kASan and the other way around.
This fixes booting of the setup of using them together.

In theory the checks could be more fine grained, however there is no good
reason (except extra DIAGNISTIC) for running a kernel sanitizer without
kernel coverage.

Patch by <R3x>
2019-05-22 08:31:25 +00:00
nakayama
43b52312c6 Use ${_TOOL_PREFIX} instead of hardcoding "nb" for consistency. 2019-05-17 13:51:36 +00:00
nakayama
0015932b89 Revert previous.
The binaries created are different, but according to joerg@ there
is no difference in functionality.
2019-05-17 13:44:55 +00:00
nakayama
95541573e2 Rename nb{clang,llvm}-tblgen to ${MACHINE_GNU_PLATFORM}-{clang,llvm}-tblgen
since they contain the default target (e.g. x86_64--netbsd).
2019-05-16 20:00:49 +00:00
christos
3dedd71659 Everyone is using gcc-7 now. 2019-05-11 02:40:31 +00:00
mrg
324b4eb87f add an entry to find upcoming intel-2014 driver. 2019-05-10 06:19:54 +00:00
maya
e5523bd00e G/C unused code.
gcc -combine is no longer a thing, so this entire block isn't usable.
2019-05-09 23:34:51 +00:00
kamil
55506a14cd Fix typo cost -> host 2019-04-19 22:06:03 +00:00
mrg
660c4904e1 switch ia64 to GCC 7. scole@ commited a workaround for the one new problem.
this leaves ppc64 as the only GCC 6 port left.
2019-04-19 21:34:26 +00:00
mrg
6c9d474098 turn on MKCOMPAT for riscv64. 2019-04-18 20:11:57 +00:00
mrg
1ce78da3f1 enable EGL and glamor. partly from maya@.
for x86 and evbarm:
- install headers and libEGL
- install xorg-server glamoregl component
- link xorg drivers against gbm/egl

bonus fix:
- fix some wrongly marked compatx11file files


build tested on shark, sgimips, evbarm64-el, amd64 and i386.
run tested on radeon, intel and nvidia on amd64, including
'modesetting' driver on amd64.  however, my systems disable
it due to llvmpipe so i'm not sure what is happening.
2019-04-16 21:20:50 +00:00
maya
226aa51e27 Don't build compat libraries for riscv, for now. 2019-04-15 15:56:40 +00:00