Otherwise, object files compiled with -mlongcall contain relocation types
referring PLT, which our in-kernel linker cannot handle.
This ends up with failure in kernel module load with
``kobj_reloc: unexpected relocation type 31'' (31 == R_PPC_PLT16_HA here).
See descriptions for -mlongcall in gcc(1) of GCC9 for more details.
right now. new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.
apply to a bunch of the tree. mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it. (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.) clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.
add method to transform both the "__foo__" and "@foo@"
version of various transforms, while upstream are converting
from the former to the latter it seems. convert all the
common transforms to this method.
expand the grep for .pc files to look for missing @foo@
fixes to the man page genration, and ignore a few things
(thanks uwe@ - .IN lines, and stuff between tab(@) and .TE.)
xorg-server __default_font_path__ -> @default_font_path@,
and xfree86 transform xconfigdir, xkbdir, and modulepath
using new both method.
Xorg wsfb servers from 1.20 for dreamcast (16bpp), hp300 (8bpp), and
luna68k (1bpp) work fine even on NetBSD 9.0, and zaurus is also
confirmed working.
Discussed with mrg@ and macallan@ on tech-x11:
https://mail-index.netbsd.org/tech-x11/2020/07/thread1.html#002098
[repeat revision 1.85]
Fix "make tags" to actually build a tags file:
- Use !commands() instead of !target(), so that the rule actually works
- Write to ${.OBJDIR}/tags for read-only source (don't know why ${.TARGET}
isn't sufficient).
- Only match *.[cly] from ${.ALLSRCS} - just excluding *.h causes failures
because of ${targ}: subdir-${targ} in bsd.subdir.mk.
Thanks to uwe@ for assistance.
Revert my recent 1.85 revision that fixed "make tags". It causes too
much build breakage elsewhere in the tree that needs to be resolved first.
Issues include:
- Directories using TESTS_CXX with .cpp and .cxx extension instead of the
default .cc extension (see bsd.prog.mk). Most of these have been fixed.
- external/gpl3/gcc build of .cc files. (No idea what's wrong there).
Fix "make tags" to actually build a tags file:
- Use !commands() instead of !target(), so that the rule actually works
- Write to ${.OBJDIR}/tags for read-only source (don't know why ${.TARGET}
isn't sufficient).
- Only match *.[cly] from ${.ALLSRCS} - just excluding *.h causes failures
because of ${targ}: subdir-${targ} in bsd.subdir.mk.
Thanks to uwe@ for assistance.
to another shared object
2. Don't compare ${LIBISPRIVATE} to "yes", because there are 3 places in
Makefiles which set it to empty (this was a bug)
3. For private libraries, don't create .so* files
/netbsd/modules respectively instead of /netbsd and
/stand/<arch>/<version>/modules. This is only supported for x86,
and is turned off by default. To try it, add KERNEL_DIR=yes in your
/mk.conf and install a system from that build.
libraries from other DSO's. For example in /usr/bin/passwd:
ld: krb5_passwd.o: undefined reference to symbol \
'UI_UTIL_read_pw_string@@OPENSSL_1_1_0'
ld: /usr/obj/amd64-x86_64/release/lib/libcrypto.so.14: error adding symbols: \
DSO missing from command line
This behaviour is probably due to a past behaviour of clang, where it
always emitted frame pointer code.
This is no longer true for clang on netbsd, and I don't think it was true
for GCC.
Meanwhile, this flag bleeds into pkgsrc where it breaks random packages,
requiring workarounds like lang/ruby*-base/hacks.mk.
KLEAK was a nice feature and served its purpose; it allowed us to detect
dozens of info leaks on the kernel->userland boundary, and thanks to it we
tackled a good part of the infoleak problem 1.5 years ago.
Nowadays however, we have kMSan, which can detect uninitialized memory in
the kernel. kMSan supersedes KLEAK: it can detect what KLEAK was able to
detect, but in addition, (1) it operates in all of the kernel and not just
the kernel->userland boundary, (2) it requires no user interaction, and (3)
it is deterministic and not statistical.
That makes kMSan the feature of choice to detect info leaks nowadays;
people interested in detecting info leaks should boot a kMSan kernel and
just wait for the magic to happen.
KLEAK was a good ride, and a fun project, but now is time for it to go.
Discussed with several people, including Thomas Barabosch.
is not changed do that instead of scanning for a single character delim ':',
it scans for "?:". This is because !empty(COMPILE.c:M*-pg*) contains a ':'.
(because the compiler complains), to use a match with the compile flags
and *pg*, instead of using a match to a target suffix (which is NetBSD
build-specific). Pointed out by phone@.
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.