Commit Graph

17661 Commits

Author SHA1 Message Date
christos a47d0a4f5e Fix reproducible builds (Jan-Benedict Glaw) 2024-03-20 00:31:54 +00:00
riastradh 1e152b590b libcrypto: Add some trivial tests for truncated SHA-512 variants.
These should use more of the test vectors from

https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing#Testing

but this will do for now to detect the buffer overrun rake we left
lying around for ourselves.

PR lib/58039
2024-03-15 15:32:07 +00:00
riastradh 9c98722158 evbarm/instkernel/sshramdisk: Put firmware in the right paths.
Maybe this should also be wired up to `release' to put the ramdisk in
the releasedir so we detect destdir path leakage like this had.

PR port-evbarm/58035
2024-03-15 02:20:58 +00:00
rillig 897cdf26ba tests/stat: test the left-aligned and right-aligned 'S' format 2024-03-14 21:00:32 +00:00
christos b250f22a56 Fix reproducible build (Jan-Benedict Glaw) 2024-03-14 15:41:54 +00:00
mrg aa397e14a2 allow XZ_OPT to be overriden. 2024-03-09 06:50:15 +00:00
christos 81e2be5eb1 Add _dlauxinfo.3 2024-03-07 22:15:52 +00:00
macallan 6cd4d7a2ec install stireg.h 2024-03-04 10:19:13 +00:00
riastradh 5d9e12cf39 mozilla-certdata: Update set lists. 2024-03-03 04:35:18 +00:00
rillig c9de07fbb0 lint: check for unreachable bits and fields in snprintb formats
While here, clean up a few existing checks.
2024-03-03 00:50:41 +00:00
rillig 1ec17c714c lint: check snprintb formats for overlapping bits and fields 2024-03-02 11:56:37 +00:00
rillig 38c0bdf232 lint: test format strings from snprintb calls
The functions snprintb and snprintb_m are specific to NetBSD, and their
format strings are tricky to get correct.  Provide some assistance in
catching the most common mistakes.
2024-03-01 19:39:28 +00:00
christos 90b19e4963 new sqlite 2024-03-01 15:48:24 +00:00
christos ac69e99e78 one more timestamp fix I forgot to commit 2024-02-25 16:49:32 +00:00
christos 1fcbeeff9a new tool 2024-02-22 01:13:42 +00:00
christos e359e10520 add new bind tools 2024-02-22 00:58:49 +00:00
christos 21a52f56eb changes for new bind.
XXX: removing lint libraries where lint does not work anymore is temporary.
2024-02-21 22:53:47 +00:00
christos b37be858f1 fix debug sets for sun2 (libgcc_s_g.a and libgcc_eh_g.a should be in shl.mi) 2024-02-20 14:13:45 +00:00
riastradh b29b1fdf39 ramdisk-zfsroot: Enable build by default on amd64.
XXX Should maybe copy this to other ports like evbarm64 too.

PR port-amd64/57948
2024-02-19 17:55:46 +00:00
riastradh a7b033762e longjmp(3): Add test for PR lib/57946. 2024-02-19 04:30:38 +00:00
christos 2e4f73b7b0 bump libunbound 2024-02-17 18:32:19 +00:00
christos 25d856e749 Fix MKREPRO build (Jan-Benedict Glaw) 2024-02-17 15:07:03 +00:00
mlelstv 265bb24603 Quote argument to -n as required. [ -n ] is not a syntax error but
evaluates to true.
2024-02-12 11:30:33 +00:00
christos 5dc3a23d37 PR/57925: Jan-Benedict Glaw: Honor $MKREPRO_TIMESTAMP, don't embed name and
stamp in gzip.
2024-02-11 17:29:50 +00:00
andvar a10c2cec39 fix various typos in comments and log messages. 2024-02-10 09:21:51 +00:00
christos 5d78d08de1 PR/57913: Jan-Benedict Glaw: Don't embed build timestamp into archive
While here, modernize backquotes.
2024-02-09 15:34:34 +00:00
christos 05264c9b54 PR/57911: Jan-Benedict Glaw: Allow to set repro timestamp (and use it) 2024-02-08 19:24:43 +00:00
christos 40f2c3cc74 PR/57910: Jan-Benedict Glaw: Fix typo preventing reproducible builds 2024-02-08 18:14:02 +00:00
christos 7c3feac8da PR/57906: Jan-Benedict Glaw: Extend`mkbootimage` to allow for
$MKREPRO_TIMESTAMP usage
2024-02-08 17:57:54 +00:00
andvar d30e897588 s/dependancies/dependencies/ and s/independantly/independently/ in comments and
distrib notes.
2024-02-05 21:39:51 +00:00
andvar 23997cfc64 s/formated/formatted/ in comment and distrib sets descriptions. 2024-02-05 21:20:09 +00:00
rillig 139c6401cd lint: warn about short octal escape followed by '8' or '9'
These mistakes is typically found in snprintb format directives but is
probably a typo everywhere else as well.
2024-02-03 20:10:10 +00:00
rillig 3454588e0f tests/lint: test UTF-8 mode 2024-02-02 23:30:38 +00:00
rillig 183f84fe87 tests/lint: test lexing of characters and strings 2024-02-02 19:07:57 +00:00
martin 2cf65fcd1b Fix previous, use sed to fix up the set.${set} line in non-METAFILE mode 2024-01-30 10:24:39 +00:00
martin 49eab889a9 When building in priviledged mode, remove the entry for the output file
from etc/mtree/set.* - it may exist and contain stale data.
2024-01-29 15:56:49 +00:00
mrg 1fae5a330f properly quote arguments. 2024-01-29 05:46:55 +00:00
tsutsui fb1d4f6a14 Also put back libfb.a in xorg_server_ver=110 case.
It looks required only on building Xorg server binary and
unnecessary for release (actually marked as obsolete only on vax),
but no simple settings to "build static libraries without installation"
and most ports will be switched to Xorg 1.20 soon.
2024-01-28 06:20:02 +00:00
riastradh bbd1e6c887 NetBSD.dist.base: Nix /var/run/named.
/var/run is emptied at boot time by /etc/rc.d/mountcritlocal, so
there's no point in creating this at install time -- it has to be
created on the fly after /var/run is cleared on every boot anyway.

Mark /var/run/named obsolete in the set lists.  XXX This isn't quite
right, because it is legitimate for /var/run/named to exist in a
running installation, but it doesn't exist in a freshly installed
system any more.  Maybe we should just remove the entry from the set
lists and add a note to UPDATING about deleting it manually from the
destdir in incremental builds.

PR misc/57877
2024-01-27 21:06:09 +00:00
rillig a4d99aada1 tests/lint: test integer constants in different language levels 2024-01-27 15:10:56 +00:00
nros 7690962a14 Add the long double math functions recently added from FreeBSD to their related man pages 2024-01-26 19:27:29 +00:00
tsutsui b6bf12200d Put back xorg_server_ver=110 specific files lost in 21.1.3 updates.
Also fix syspkg names and reorder entries for readabilities.
Fixes "fail to load libfb.so" errors in case of HAVE_XORG_SERVER_VER=110.
(Note these ports have been switched to HAVE_XORG_SERVER_VER=120)

Ok'ed by mrg@ on tech-x11@:
 https://mail-index.netbsd.org/tech-x11/2024/01/24/msg002434.html
2024-01-26 13:06:36 +00:00
tsutsui d08a8a2fe7 Put back xorg_server_ver=110 specific files lost in 21.1.3 updates.
Also fix syspkg names and reorder entries for readabilities.
Fixes "fail to load libfb.so" errors on X.org 1.10 server ports.

Ok'ed by mrg@ on tech-x11@:
 https://mail-index.netbsd.org/tech-x11/2024/01/24/msg002434.html

Should be pulled up to netbsd-10.
2024-01-26 12:58:51 +00:00
mrg b0c21bdf09 add missing mtree subdir and it's Atffile. 2024-01-25 01:43:58 +00:00
riastradh 00b317fce9 mtree(8): Test the installed sets.
Except etc and xetc, which likely won't match for reasons that aren't
great, like etc including empty log files which in an installed
system have probably changed.

This test will probably fail, but we should make sure it doesn't!

PR misc/57877
2024-01-25 00:30:57 +00:00
jmcneill 276b55c3e3 wii: Add support for passing boot options to the kernel. 2024-01-24 21:53:34 +00:00
rillig b2e1dd2563 tests/lint: revert accidental addition of test for lint message 356 2024-01-23 22:07:23 +00:00
rillig 09702fc7eb lint: rename symt_t to symbol_kind
It was confusing to have two kinds of "symbol type" (s_type and s_symt),
so rename all related identifiers to be more distinctive.

No functional change.
2024-01-23 19:44:28 +00:00
kre 10af4d8cb4 Bump libm minor rev (libm.so.0.13 -> libm.so.0.14) after addition of
all the long double functions (with actual implementations).
2024-01-22 15:19:38 +00:00
jmcneill a5bf488d6f wii: Add 128x48 icon to SD card image 2024-01-21 13:10:55 +00:00
jmcneill cba6955407 build fix: use dd with count=1 for compat with NetBSD dd(1) 2024-01-21 10:28:25 +00:00
jmcneill 8d626ee2f8 evbppc: Add initial support for the Nintendo Wii 2024-01-20 21:35:59 +00:00
skrll 411aa5d8e5 risc-v: Add bwfm(4) firmware files to release image
Create the correct link for beagle,beaglev-starlight-jh7100-r0.txt NVRAM
config file.
2024-01-20 08:09:13 +00:00
thorpej 5eb94defbb Add a common m68k interrupt dispatch implementation. 2024-01-14 22:32:32 +00:00
thorpej dbb30ef1da Merge common sun68k types defns into <sun68k/types.h>. 2024-01-14 18:22:02 +00:00
tsutsui 7480cc65f1 Add three button trackballs (M1309A) to a supported HP-HIL device list.
Asked by Jonathan Stone on port-hp300@, and tested by me:
 https://mail-index.netbsd.org/port-hp300/2024/01/14/msg000238.html
2024-01-14 12:05:33 +00:00
skrll 45e41911cd Import RISC-V starfive DTS from https://github.com/starfive-tech/linux.git"
The files are taken from the visionfive branch with latest DTS related commit

    commit 9b5f280fa413ee76fac20cd575075fc53468d527
    Author: Emil Renner Berthing <kernel@esmil.dk>
    Date:   Sun Oct 31 17:15:58 2021 +0100

        riscv: dts: Add full JH7100, Starlight and VisionFive support
2024-01-14 07:39:25 +00:00
thorpej 7518155848 Add installation ramdisk for virt68k. With the GENERIC kernel, you can
just specify this file with "-initrd /path/to/inst-ramdisk.fs" on the
Qemu command line and it will boot right into the installer.
2024-01-07 00:57:13 +00:00
pgoyette 25ffd25ddc Install securelevel.9 as an alias of secmodel_securelevel.9
According to submitter, this should be sufficient to address misc/57824.
2024-01-07 00:38:18 +00:00
thorpej e1ace90622 First cut at set list for virt68k. 2024-01-06 07:35:38 +00:00
kim e5014a45d8 Install postfix-tls-script (for "postfix tls") 2024-01-01 18:56:53 +00:00
thorpej d244c3ab10 Add a header file for 68030-specific MMU definitions, specifically the
Transparent Translation registers, that do not exist on the 68851.  A
big comment at the top of the file describes the differences between
the 68851 and the 68030's MMU.
2023-12-27 19:22:10 +00:00
thorpej 3c258f0760 Add new headers that describe the 68851 (and 68030) MMU and
68040 (and 68060) MMU structures using names that more closely
align with Motorola's documentation.

The definitions here automagically adapt to 4K or 8K pages, based
on the value of PGSHIFT, which must be a compile-time constant.
2023-12-27 02:40:31 +00:00
pgoyette dd048da8dc Unhook radeondrm module from the build; it doesn't work, and
it's just tempting someone to try it.  Leave the files around
in case someone wants to pursue making this work.

Should address kern/57793

XXX Related modules from the same legacy era should probably be
XXX removed, too, but so far only radeondrm has been reported
XXX as an issue.  Kep an eye out for sisdrm, savagedrm, tdfxdrm,
XXX and r128drm.
2023-12-26 16:20:01 +00:00
christos 145659c19e bump libssh 2023-12-20 17:17:21 +00:00
gutteridge 04662bc40a main: minor style fix 2023-12-15 22:09:16 +00:00
abs 21aef130ed Add note about zfs mount behaviour change in NetBSD 10 2023-12-14 20:46:45 +00:00
andvar 4e59ab5c59 s/MRCOFFE$/MRCOFFEE/ and s/MRCOFFE_OFW/MRCOFFEE_OFW/ in install docs.
Also apply uwe change from sparc/contents s/GENERIC-KRUPS/KRUPS/.
2023-12-11 21:57:41 +00:00
andvar bac9e987c2 s/MRCOFFE$/MRCOFFEE/ and s/MRCOFFE_OFW/MRCOFFEE_OFW/ in install docs. 2023-12-11 21:43:33 +00:00
tsutsui 7b628e9e33 Use defined ${GPTSECTORS} rather than hardcoded 2048. 2023-12-03 07:20:23 +00:00
tsutsui 2701e1fd91 Document USE_GPTMBR and GPTSECTORS. 2023-12-03 07:17:11 +00:00
thorpej 7f2518835c Add a vmem_xalloc_addr() function, which allocates a specific address
from an arena.  This is just a convenience wrapper around vmem_xalloc(),
that's just a bit more obvious how to use and performs some additional
sanity checks.
2023-12-02 21:02:12 +00:00
riastradh 5b36b4ea47 pthread: Add tests for pthread user stack allocation.
PR lib/57721

XXX pullup-10
XXX pullup-9
XXX pullup-8
2023-11-24 16:21:17 +00:00
riastradh 001acc2f8e stack(7): New man page.
Should help with PR pkg/57708.

XXX pullup-10
2023-11-23 21:20:49 +00:00
christos 48ce0cf66c Set the timezone too when invoking date with a timestamp because it can
be affected too:
$ env TZ=UTC date -r 1700157305
Thu Nov 16 17:55:05 UTC 2023
$ env TZ=UTC24:24:24 date -r 1700157305
Wed Nov 15 17:30:41 UTC 2023
2023-11-16 18:06:05 +00:00
christos 3e5c44d0dc Use TOOL_DATE (Jan-Benedict Glaw) 2023-11-13 21:01:51 +00:00
christos d7efda952f Add test for:
PR/57689: RVP: getcwd() not overridable with -D_FORTIFY_SOURCE
2023-11-10 23:04:50 +00:00
christos bc2587b096 Set the file creation mask 2023-11-10 21:05:23 +00:00
christos e3606ab09e More conservative umask 2023-11-08 13:02:47 +00:00
christos f72eceabd2 Set the file creation mask consistently because the files these scripts
create can become part of an iso image.
2023-11-08 12:58:04 +00:00
rin 774ff440e7 lists/debug/mi: Sprinkle gcc to lib[al]san_g.a to fix clang build 2023-11-06 08:56:12 +00:00
simonb ac45218fbd Add some earmv4 kernels. 2023-11-03 09:56:14 +00:00
simonb 0403a3837c Catch up with recent changes in distrib/sets/lists/dtb/ad.earmv7hfeb 2023-11-01 12:51:44 +00:00
simonb a847e02510 Catch up with recent changes in distrib/sets/lists/dtb/ad.earmv7hf. 2023-11-01 12:51:13 +00:00
christos f68f8383fb bump libssh 2023-10-25 20:22:00 +00:00
rjs 1b17496e10 The t_fdrestart test requires rump. 2023-10-17 13:51:52 +00:00
rjs 582124def6 The inpcb tests are only built when rump is enabled. 2023-10-17 13:45:37 +00:00
riastradh 5ba0017fa5 t_fdrestart: New test of closing fd with another thread in I/O on it.
Adapted from regress/sys/kern/dislodgefd.

PR kern/57659
2023-10-15 13:22:52 +00:00
riastradh fbe27be64b sys/wchan.h: Need to install this for sanitizers. 2023-10-15 13:04:15 +00:00
he 0274baaaaf libm Makefile: add fma() functions for mips.
This pushed the ramdisk size, so that needed to be bumped as well.
Otherwise, there were no build issues for either 32 or 64 bit mips.
Sort-of OK'ed by simonb@.
2023-10-08 13:47:51 +00:00
rin 7c76c2272e Drop -O[01] hacks for vax; no longer necessary for patched GCC 10
PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton

XXXRO: GCC 12 may require hacks for a while, but it turned out that
GCC 12 should be treated differently from older versions; a lot of new
files need -O[01] flags, while some may no longer require it.

I will take a look later.

Note that these hacks are not required if Kalvis's patches for GCC 12
are applied.

Keep doc/HACKS entries for a while (will be sync with update for GCC 12).

diff --git a/crypto/external/bsd/openssh/lib/Makefile b/crypto/external/bsd/openssh/lib/Makefile
index 96a93f5e396..4e38be1b642 100644
--- a/crypto/external/bsd/openssh/lib/Makefile
+++ b/crypto/external/bsd/openssh/lib/Makefile
@@ -117,12 +117,6 @@ COPTS.${f}.c+=	-Wno-pointer-sign
 # XXX
 COPTS.channels.c+=	-fno-strict-aliasing

-# XXX
-.if ${MACHINE} == "vax"
-COPTS.poly1305.c+=	-O0
-COPTS.umac.c+=		-O0
-.endif
-
 COPTS.hostfile.c+=	${CC_WNO_FORMAT_TRUNCATION}
 COPTS.sshkey.c+=	${CC_WNO_FORMAT_TRUNCATION}
 COPTS.cipher.c+=	-Wno-error=deprecated-declarations
diff --git a/distrib/utils/x_ping/Makefile b/distrib/utils/x_ping/Makefile
index f1c452a0d60..8ee77580a3f 100644
--- a/distrib/utils/x_ping/Makefile
+++ b/distrib/utils/x_ping/Makefile
@@ -12,10 +12,6 @@ CPPFLAGS+=	-I${SRCDIR} -DCRUNCHOPS
 DPADD=		${LIBM}
 LDADD=		-lm

-.if ${MACHINE_ARCH} == "vax"
-COPTS.ping.c=-O0
-.endif
-
 .include <bsd.prog.mk>

 .PATH:		${SRCDIR}
diff --git a/external/apache2/argon2/lib/libargon2/Makefile.inc b/external/apache2/argon2/lib/libargon2/Makefile.inc
index d3f4470c6c7..6a1dd146d7d 100644
--- a/external/apache2/argon2/lib/libargon2/Makefile.inc
+++ b/external/apache2/argon2/lib/libargon2/Makefile.inc
@@ -16,7 +16,3 @@ CFLAGS+=	-pthread
 LDADD+=-lpthread
 DPADD+=${LIBPTHREAD}
 .endif
-
-.if ${MACHINE} == "vax"
-COPTS.blake2b.c+=	-O0
-.endif
diff --git a/external/bsd/jemalloc/lib/Makefile.inc b/external/bsd/jemalloc/lib/Makefile.inc
index 2f524358f46..d5da774f293 100644
--- a/external/bsd/jemalloc/lib/Makefile.inc
+++ b/external/bsd/jemalloc/lib/Makefile.inc
@@ -53,12 +53,6 @@ COPTS.ctl.c+=-Wno-error=stack-protector
 COPTS.stats.c+=-Wno-error=stack-protector
 COPTS.tcache.c+=-Wno-error=stack-protector

-.if ${MACHINE_ARCH} == "vax"
-# in merge_overlapping_regs, at regrename.c
-COPTS.arena.c+=-O0
-COPTS.extent.c+=-O0
-.endif
-
 SRCS+=${JEMALLOC_SRCS}

 jemalloc.d jemalloc.pico jemalloc.o jemalloc.ln jemalloc.po jemalloc.go: \
diff --git a/external/bsd/mdocml/lib/libmandoc/Makefile b/external/bsd/mdocml/lib/libmandoc/Makefile
index 40d7e29ae88..dfd3077a2c7 100644
--- a/external/bsd/mdocml/lib/libmandoc/Makefile
+++ b/external/bsd/mdocml/lib/libmandoc/Makefile
@@ -39,11 +39,6 @@ tbl_opts.c

 MAN=	mandoc.3

-# XXX
-.if ${MACHINE} == "vax"
-COPTS.mdoc_macro.c+=-O0
-.endif
-
 COPTS.man_validate.c+=-Wno-error=array-bounds

 .include <bsd.lib.mk>
diff --git a/external/gpl3/binutils.old/lib/libbfd/Makefile b/external/gpl3/binutils.old/lib/libbfd/Makefile
index 03477232b55..74a354532fa 100644
--- a/external/gpl3/binutils.old/lib/libbfd/Makefile
+++ b/external/gpl3/binutils.old/lib/libbfd/Makefile
@@ -41,10 +41,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \
 		-DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \
 		-DBINDIR=\"${BINDIR}\"

-.if (${BFD_MACHINE_ARCH} == "vax")
-CPPFLAGS.elf.c +=	-O0
-.endif
-
 COPTS.pei-x86_64.c+=	-Wno-stack-protector
 COPTS.elfxx-mips.c+=	-Wno-stack-protector
 COPTS.elf.c+=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :}
diff --git a/external/gpl3/binutils/lib/libbfd/Makefile b/external/gpl3/binutils/lib/libbfd/Makefile
index 00cb2b20081..a3f0c25fd35 100644
--- a/external/gpl3/binutils/lib/libbfd/Makefile
+++ b/external/gpl3/binutils/lib/libbfd/Makefile
@@ -41,10 +41,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \
 		-DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \
 		-DBINDIR=\"${BINDIR}\"

-.if (${BFD_MACHINE_ARCH} == "vax")
-CPPFLAGS.elf.c +=	-O0
-.endif
-
 COPTS.pei-x86_64.c+=	-Wno-stack-protector
 COPTS.elfxx-mips.c+=	-Wno-stack-protector
 COPTS.elf.c+=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :}
diff --git a/external/gpl3/gcc.old/lib/Makefile.sanitizer b/external/gpl3/gcc.old/lib/Makefile.sanitizer
index efd36ae4bee..5173a5109a0 100644
--- a/external/gpl3/gcc.old/lib/Makefile.sanitizer
+++ b/external/gpl3/gcc.old/lib/Makefile.sanitizer
@@ -88,22 +88,3 @@ COPTS+=-fno-builtin -fno-exceptions -fno-rtti -funwind-tables

 # Can't profile without it`
 #-fomit-frame-pointer
-
-.if ${MACHINE_ARCH} == "vax"
-COPTS.sanitizer_allocator.cc += -O1
-COPTS.sanitizer_common.cc += -O1
-COPTS.sanitizer_common_libcdep.cc += -O1
-COPTS.sanitizer_coverage_libcdep.cc += -O1
-COPTS.sanitizer_coverage_mapping_libcdep.cc += -O1
-COPTS.sanitizer_deadlock_detector1.cc += -O1
-COPTS.sanitizer_mac.cc += -O1
-COPTS.sanitizer_netbsd.cc += -O1
-COPTS.sanitizer_posix.cc += -O1
-COPTS.sanitizer_printf.cc += -O1
-COPTS.sanitizer_procmaps_common.cc += -O1
-COPTS.sanitizer_stackdepot.cc += -O1
-COPTS.sanitizer_symbolizer_libcdep.cc += -O1
-COPTS.sanitizer_symbolizer_report.cc += -O1
-COPTS.ubsan_diag.cc += -O1
-COPTS.ubsan_init.cc += -O1
-.endif
diff --git a/external/gpl3/gcc.old/lib/libasan/Makefile b/external/gpl3/gcc.old/lib/libasan/Makefile
index 1e6f9608abe..3da7bbf2f58 100644
--- a/external/gpl3/gcc.old/lib/libasan/Makefile
+++ b/external/gpl3/gcc.old/lib/libasan/Makefile
@@ -49,14 +49,6 @@ LIBDPLIBS+= m  ${NETBSDSRCDIR}/lib/libm
 LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
 CPPFLAGS+=-DCAN_SANITIZE_UB=0

-.if ${MACHINE_ARCH} == "vax"
-COPTS.asan_allocator.cc += -O1
-COPTS.asan_report.cc += -O1
-COPTS.sanitizer_file.cc += -O1
-COPTS.ubsan_diag.cc += -O1
-COPTS.ubsan_init.cc += -O1
-.endif
-
 .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
 COPTS.asan_interceptors.cc += -O1
 .endif
diff --git a/external/gpl3/gcc.old/lib/liblsan/Makefile b/external/gpl3/gcc.old/lib/liblsan/Makefile
index 4578544a9a8..ddb7981077c 100644
--- a/external/gpl3/gcc.old/lib/liblsan/Makefile
+++ b/external/gpl3/gcc.old/lib/liblsan/Makefile
@@ -16,11 +16,6 @@ LSAN_SRCS+= \
 	lsan_linux.cc \
 	lsan_thread.cc

-.if ${MACHINE_ARCH} == "vax"
-COPTS.lsan_allocator.cc += -O1
-COPTS.sanitizer_file.cc += -O1
-.endif
-
 LIB=	lsan
 SRCS+=	${LSAN_SRCS}
 LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm
diff --git a/external/gpl3/gcc.old/lib/libubsan/Makefile b/external/gpl3/gcc.old/lib/libubsan/Makefile
index 2e2faca7b1c..9de82550d14 100644
--- a/external/gpl3/gcc.old/lib/libubsan/Makefile
+++ b/external/gpl3/gcc.old/lib/libubsan/Makefile
@@ -26,10 +26,6 @@ UBSAN_SRCS= \
 COPTS.${_s}.cc+=-frtti
 .endfor

-.if ${MACHINE_ARCH} == "vax"
-COPTS.sanitizer_file.cc += -O1
-.endif
-
 LIB=	ubsan
 SRCS+=	${UBSAN_SRCS}
 LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm
diff --git a/external/gpl3/gcc.old/usr.bin/cc1/Makefile b/external/gpl3/gcc.old/usr.bin/cc1/Makefile
index c55e292ee8e..ff12a5be524 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1/Makefile
@@ -46,17 +46,6 @@ CPPFLAGS.default-c.c+=	-I${BACKENDOBJ}
 BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh-c.cc sh-c.c
 .endif

-.if ${MACHINE_CPU} == "vax"
-COPTS.c-decl.c+=-O0
-COPTS.c-typeck.c+=-O0
-COPTS.c-array-notation.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1-checksum.c+=-O0
-.endif
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
diff --git a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile
index 3123ee0d60b..aab82ad3448 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile
@@ -44,16 +44,8 @@ COPTS.objc-act.c+=			-Wno-stack-protector
 COPTS.objc-gnu-runtime-abi-01.c+=	-Wno-stack-protector
 COPTS.objc-next-runtime-abi-01.c+=	-Wno-stack-protector

-.if ${MACHINE_ARCH} == "vax"
-COPTS.c-decl.c+=-O0
-COPTS.c-typeck.c+=-O0
-COPTS.c-array-notation.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1obj-checksum.c+=-O0
-.endif
+COPTS.c-cppbuiltin.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
+COPTS.c-typeck.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}

 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
diff --git a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile
index b9c108251c5..e04e8fc7f53 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile
@@ -69,18 +69,6 @@ COPTS.objc-act.c+=			-Wno-stack-protector
 COPTS.objc-gnu-runtime-abi-01.c+=	-Wno-stack-protector
 COPTS.objc-next-runtime-abi-01.c+=	-Wno-stack-protector

-.if ${MACHINE_ARCH} == "vax"
-COPTS.c-decl.c+=-O0
-COPTS.c-typeck.c+=-O0
-COPTS.c-array-notation.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1obj-checksum.c+=-O0
-COPTS.decl.c+=-O0
-.endif
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
diff --git a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile
index 7936efd3a5e..7c54559e21a 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile
@@ -31,23 +31,6 @@ CHECKSUM_OBJS= ${LIBBACKTRACEOBJ}/libbacktrace.a \

 CFLAGS+=	-Wno-error=stack-protector

-.if ${MACHINE_ARCH} == "vax"
-COPTS.call.c+=-O0
-COPTS.decl.c+=-O0
-COPTS.typeck2.c+=-O0
-COPTS.class.c+=-O0
-COPTS.typeck.c+=-O0
-COPTS.init.c+=-O0
-COPTS.semantics.c+=-O0
-COPTS.mangle.c+=-O0
-COPTS.constexpr.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1plus-checksum.c+=-O0
-.endif
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
diff --git a/external/gpl3/gcc.old/usr.bin/gcc/Makefile b/external/gpl3/gcc.old/usr.bin/gcc/Makefile
index 7a66d77ffc7..a5a4b1c3adf 100644
--- a/external/gpl3/gcc.old/usr.bin/gcc/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/gcc/Makefile
@@ -25,9 +25,6 @@ ${SRCS}: ${GCCARCH}/defs.mk
 .include <bsd.info.mk>

 COPTS.gcc.c=	-Wno-stack-protector
-.if ${MACHINE_ARCH} == "vax"
-COPTS.dse.c=	-O1
-.endif

 .PATH: ${DIST}/gcc ${DIST}/gcc/doc ${DIST}/gcc/c

diff --git a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile
index 751d1513eec..33aeb1c9898 100644
--- a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile
@@ -14,10 +14,6 @@ SRCS=		decNumber.c decContext.c decimal32.c decimal64.c decimal128.c
 CPPFLAGS+=	-I${.CURDIR}/arch/${GCC_MACHINE_ARCH} -I${DIST}/libdecnumber
 CPPFLAGS+=	-I${DIST}/libgcc

-.if ${MACHINE_ARCH} == "vax"
-COPTS.decNumber.c=-O0
-.endif
-
 .include <bsd.lib.mk>

 # Force using C++ for this
diff --git a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile
index 90f44a9fcf6..fd251464fb7 100644
--- a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile
@@ -24,11 +24,6 @@ COPTS.lto-common.c+=	-Wno-stack-protector
 .include "../Makefile.backtrace"
 .include "../Makefile.libdecnumber"

-.if ${MACHINE_ARCH} == "vax"
-COPTS.lto-lang.c+=-O0
-COPTS.lto-symtab.c+=-O0
-.endif
-
 LDADD+=	${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm
 DPADD+=	${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} ${LIBINTL} ${LIBZ} ${LIBM}

diff --git a/external/gpl3/gcc.old/usr.bin/lto1/Makefile b/external/gpl3/gcc.old/usr.bin/lto1/Makefile
index 4c49161a64c..340d3c6124f 100644
--- a/external/gpl3/gcc.old/usr.bin/lto1/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/lto1/Makefile
@@ -21,11 +21,6 @@ COPTS.lto-common.c+=	-Wno-stack-protector
 .include "../Makefile.libcpp"
 .include "../Makefile.libdecnumber"

-.if ${MACHINE_ARCH} == "vax"
-COPTS.lto-lang.c+=-O0
-COPTS.lto-symtab.c+=-O0
-.endif
-
 LDADD+= ${LIBIBERTYOBJ}/libiberty.a
 DPADD+= ${LIBIBERTYOBJ}/libiberty.a
 LDADD+=	${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm
diff --git a/external/gpl3/gdb.old/lib/libdecnumber/Makefile b/external/gpl3/gdb.old/lib/libdecnumber/Makefile
index bcd4ae5b222..ce28811526b 100644
--- a/external/gpl3/gdb.old/lib/libdecnumber/Makefile
+++ b/external/gpl3/gdb.old/lib/libdecnumber/Makefile
@@ -18,10 +18,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \

 SRCS=		${G_OBJS:.o=.c} ${G_SOURCES}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.decNumber.c=-O0
-.endif
-
 .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd

 .include <bsd.lib.mk>
diff --git a/external/gpl3/gdb/lib/libdecnumber/Makefile b/external/gpl3/gdb/lib/libdecnumber/Makefile
index c95d36e3dfa..e3169865304 100644
--- a/external/gpl3/gdb/lib/libdecnumber/Makefile
+++ b/external/gpl3/gdb/lib/libdecnumber/Makefile
@@ -18,10 +18,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \

 SRCS=		${G_OBJS:.o=.c} ${G_SOURCES}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.decNumber.c=-O0
-.endif
-
 .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd ${DIST}/libdecnumber/bid

 .include <bsd.lib.mk>
diff --git a/external/gpl3/gdb/lib/libgdb/Makefile b/external/gpl3/gdb/lib/libgdb/Makefile
index b87a515d13a..c118c363975 100644
--- a/external/gpl3/gdb/lib/libgdb/Makefile
+++ b/external/gpl3/gdb/lib/libgdb/Makefile
@@ -66,12 +66,6 @@ CFLAGS:=		${CXXFLAGS} -std=gnu++17 -Wno-error=stack-protector

 ada-exp.c: ada-lex.c

-.if ${MACHINE} == "vax"
-. if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8
-COPTS.read.c+=	-O0
-. endif
-.endif
-
 # These are generated by implicit rules and are not easy to generate
 CLEANDIRFILES+= \
 	ada-exp.c ada-lex.c \
diff --git a/external/mit/xorg/lib/gallium.old/Makefile b/external/mit/xorg/lib/gallium.old/Makefile
index 55b2fe3d1c1..bfa40c8974f 100644
--- a/external/mit/xorg/lib/gallium.old/Makefile
+++ b/external/mit/xorg/lib/gallium.old/Makefile
@@ -1211,10 +1211,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL
 COPTS+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
 .endif

-.if ${MACHINE_ARCH} == "vax"
-COPTS.nir.c += -O1
-.endif
-
 # XXXGCC12
 .if ${MACHINE_ARCH} == "m68k"
 COPTS.st_glsl_to_tgsi.cpp += -O1
diff --git a/external/mit/xorg/lib/gallium/Makefile b/external/mit/xorg/lib/gallium/Makefile
index 6778a8c11c8..9f1422080fe 100644
--- a/external/mit/xorg/lib/gallium/Makefile
+++ b/external/mit/xorg/lib/gallium/Makefile
@@ -1428,10 +1428,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL
 COPTS+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
 .endif

-.if ${MACHINE_ARCH} == "vax"
-COPTS.nir.c += -O1
-.endif
-
 COPTS.u_atomic.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-builtin-declaration-mismatch :}

 .include <bsd.lib.mk>
diff --git a/external/mit/xorg/lib/libX11/Makefile.libx11 b/external/mit/xorg/lib/libX11/Makefile.libx11
index e103d9ace12..0e55c2a4732 100644
--- a/external/mit/xorg/lib/libX11/Makefile.libx11
+++ b/external/mit/xorg/lib/libX11/Makefile.libx11
@@ -471,11 +471,6 @@ COPTS.OpenDis.c+=	-Wno-error	# XXX xf86bigfstr.h
 COPTS.XlibInt.c+=	-Wno-error	# XXX xcmiscstr.h
 COPTS.XKBBind.c+=	-Wno-deprecated-declarations	# uses XKeycodeToKeysym

-# XXX
-.if ${MACHINE} == "vax"
-COPTS.lcWrap.c+=	-O0
-.endif
-
 CWARNFLAGS.clang+=	-Wno-string-plus-int

 .include "${NETBSDSRCDIR}/external/mit/xorg/tools/makekeys/Makefile.makekeys"
diff --git a/games/gomoku/Makefile b/games/gomoku/Makefile
index e86a63aaea7..678537066ed 100644
--- a/games/gomoku/Makefile
+++ b/games/gomoku/Makefile
@@ -9,10 +9,6 @@ LDADD=	-lcurses -lterminfo
 HIDEGAME=hidegame
 CPPFLAGS+=	${DEBUG:D-DDEBUG}

-.if ${MACHINE} == "vax"
-COPTS.pickmove.c += -O0
-.endif
-
 #WARNS=		6	# would produce warnings about small integer types
 LINTFLAGS+=	-w	# treat warnings as errors
 LINTFLAGS+=	-T	# strict bool mode
diff --git a/games/phantasia/Makefile b/games/phantasia/Makefile
index e9c53f23ae5..b919dac17c6 100644
--- a/games/phantasia/Makefile
+++ b/games/phantasia/Makefile
@@ -52,7 +52,3 @@ map: map.c
 	./map | plot > /dev/tty

 .include <bsd.prog.mk>
-
-.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
-COPTS.misc.c+=	-O0
-.endif
diff --git a/lib/i18n_module/UTF7/Makefile b/lib/i18n_module/UTF7/Makefile
index 712c1515d42..7136f7f0cc3 100644
--- a/lib/i18n_module/UTF7/Makefile
+++ b/lib/i18n_module/UTF7/Makefile
@@ -3,6 +3,3 @@
 SRCPRE=citrus_
 .include <bsd.lib.mk>

-.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC)
-COPTS.citrus_utf7.c+=	-O0
-.endif
diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile
index b2aea1e04b0..e60a2862d48 100644
--- a/lib/libbz2/Makefile
+++ b/lib/libbz2/Makefile
@@ -15,11 +15,6 @@ SRCS=		blocksort.c huffman.c crctable.c randtable.c compress.c \
 INCS=		bzlib.h
 INCSDIR=	/usr/include

-# XXX huffman.c gets mis-compiled with 2.95.3
-.if ${MACHINE_ARCH} == "vax"
-COPTS+=		-O0
-.endif
-
 COPTS+=		${CC_WNO_IMPLICIT_FALLTHROUGH}

 # XXX blocksort.c gets mis-compiled with 4.1
diff --git a/lib/libc/gdtoa/Makefile.inc b/lib/libc/gdtoa/Makefile.inc
index 132686fc33d..609da919803 100644
--- a/lib/libc/gdtoa/Makefile.inc
+++ b/lib/libc/gdtoa/Makefile.inc
@@ -44,10 +44,3 @@ SRCS+=	dmisc.c \
 .if ${MACHINE_ARCH} != "vax"
 SRCS+=	strtord.c
 .endif
-
-# XXX revisit with newer GCC.
-# Ensure numbers like 0xffff319f5fa95963 print correctly
-# ("999999999999999.98", not garbage like "?A>C>@>C:BA;A><.:<")
-.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC)
-COPTS.misc.c+=	-O0
-.endif
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index cb3f89d6d09..e9c8be820da 100644
--- a/lib/libcrypt/Makefile
+++ b/lib/libcrypt/Makefile
@@ -30,9 +30,6 @@ SRCS+=		crypt-argon2.c
 SRCS+=		${src}
 COPTS.${src}+=	-fvisibility=hidden
 .  endfor
-.  if ${MACHINE} == "vax"
-COPTS.blake2b.c+=	-O0
-.  endif
 .endif

 WARNS?=	5
diff --git a/libexec/ld.elf_so/Makefile b/libexec/ld.elf_so/Makefile
index f5baae1e883..24f7e1121e5 100644
--- a/libexec/ld.elf_so/Makefile
+++ b/libexec/ld.elf_so/Makefile
@@ -141,10 +141,6 @@ CPPFLAGS+=	-DRTLD_DEFAULT_LIBRARY_PATH=\"${SHLIBDIR}:${LIBDIR}\"
 COPTS.rtld.c+=	-Wno-stack-protector
 COPTS.symbol.c+=-Wno-stack-protector

-.if ${MACHINE_CPU} == "vax"
-COPTS.rtld.c+=	-O0
-.endif
-
 LDADD+=		-Wl,--version-script=${.CURDIR}/symbols.map
 LDADD+=		-L${CLIBOBJ} -L${DESTDIR}${LIBDIR}
 .if ${MKPICLIB} != "no"
diff --git a/sbin/fsck_ffs/Makefile.common b/sbin/fsck_ffs/Makefile.common
index 765638b2801..824e3bf2628 100644
--- a/sbin/fsck_ffs/Makefile.common
+++ b/sbin/fsck_ffs/Makefile.common
@@ -36,7 +36,3 @@ COPTS.ffs_appleufs.c+=	-Wno-pointer-sign
 .if ${MACHINE_ARCH} == "m68000"
 COPTS.pass1.c+=	-fno-tree-fre -fno-tree-lrs
 .endif
-.if ${MACHINE_ARCH} == "vax"
-COPTS.pass1.c+=	-O0
-COPTS.inode.c+=	-O0
-.endif
diff --git a/sbin/fsdb/Makefile b/sbin/fsdb/Makefile
index c039f73a1eb..3b0331e5880 100644
--- a/sbin/fsdb/Makefile
+++ b/sbin/fsdb/Makefile
@@ -39,12 +39,6 @@ COPTS.${f}.c+=	-Wno-pointer-sign
 COPTS.pass1.c+=	-fno-tree-fre -fno-tree-lrs
 .endif

-.if ${MACHINE_ARCH} == "vax"
-COPTS.pass1.c+=	-O0
-COPTS.inode.c+=	-O0
-COPTS.fsdb.c+=	-O0
-.endif
-
 CWARNFLAGS.gcc+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}

 .include <bsd.prog.mk>
diff --git a/sbin/newfs_ext2fs/Makefile b/sbin/newfs_ext2fs/Makefile
index 40a44b9a038..ecfdbff4d3a 100644
--- a/sbin/newfs_ext2fs/Makefile
+++ b/sbin/newfs_ext2fs/Makefile
@@ -20,8 +20,4 @@ DPADD+=${LIBPROP}

 .PATH:	${NETBSDSRCDIR}/sys/ufs/ext2fs ${FSCK}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.mke2fs.c=-O0
-.endif
-
 .include <bsd.prog.mk>
diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile
index 4f33501ea7a..1f7f56e3ea5 100644
--- a/sbin/ping/Makefile
+++ b/sbin/ping/Makefile
@@ -12,8 +12,4 @@ CPPFLAGS+=	-DIPSEC
 LDADD+= -lipsec
 DPADD+= ${LIBIPSEC}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.ping.c=-O0
-.endif
-
 .include <bsd.prog.mk>
diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax
index cf095d54a86..c483eaa644a 100644
--- a/sys/arch/vax/conf/Makefile.vax
+++ b/sys/arch/vax/conf/Makefile.vax
@@ -34,7 +34,6 @@ GENASSYM_CONF=	${VAX}/vax/genassym.cf
 CPPFLAGS+=	-D_VAX_INLINE_
 AFLAGS+=	-x assembler-with-cpp -fno-pic
 CFLAGS+=	-fno-pic
-COPTS.wsmux.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -O1 :}


 ##
diff --git a/sys/lib/libsa/Makefile b/sys/lib/libsa/Makefile
index 718c97ce857..4ef3840c753 100644
--- a/sys/lib/libsa/Makefile
+++ b/sys/lib/libsa/Makefile
@@ -96,7 +96,3 @@ SRCS+=	ufs.c
 lib${LIB}.o:: ${OBJS:O} __buildstdlib

 CPPFLAGS+=	-Wno-pointer-sign
-
-.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
-COPTS.bootp.c+=	-O0
-.endif
diff --git a/sys/lib/libz/Makefile b/sys/lib/libz/Makefile
index 6945c0da6c6..61fb7d4f652 100644
--- a/sys/lib/libz/Makefile
+++ b/sys/lib/libz/Makefile
@@ -25,7 +25,3 @@ CLEANFILES+= lib${LIB}.o
 .include <bsd.lib.mk>

 lib${LIB}.o:: ${OBJS:O} __buildstdlib
-
-.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
-COPTS.inftrees.c+=	-O0
-.endif
diff --git a/sys/modules/lfs/Makefile b/sys/modules/lfs/Makefile
index 962538821a5..ea8f187e160 100644
--- a/sys/modules/lfs/Makefile
+++ b/sys/modules/lfs/Makefile
@@ -18,9 +18,4 @@ SRCS+=	ulfs_bmap.c ulfs_dirhash.c ulfs_inode.c ulfs_lookup.c \

 WARNS=	3

-.if ${MACHINE} == "vax"
-# GCC 6.5 and 7.4 cannot compile this with -DDIAGNOSTIC and -O2/-O1
-COPTS.lfs_inode.c+=	-O0
-.endif
-
 .include <bsd.kmodule.mk>
diff --git a/sys/rump/fs/lib/liblfs/Makefile b/sys/rump/fs/lib/liblfs/Makefile
index abade3767d9..68b74c62502 100644
--- a/sys/rump/fs/lib/liblfs/Makefile
+++ b/sys/rump/fs/lib/liblfs/Makefile
@@ -17,9 +17,6 @@ SRCS+=	ulfs_bmap.c ulfs_dirhash.c ulfs_extattr.c 			\


 CFLAGS+=        -DLFS_KERNEL_RFW
-.if ${MACHINE_ARCH} == "vax"
-COPTS.lfs_inode.c+=-O0
-.endif

 .include <bsd.lib.mk>
 .include <bsd.klinks.mk>
diff --git a/usr.sbin/mtrace/Makefile b/usr.sbin/mtrace/Makefile
index aef09db6198..9c125c15265 100644
--- a/usr.sbin/mtrace/Makefile
+++ b/usr.sbin/mtrace/Makefile
@@ -12,10 +12,6 @@ PROG=	mtrace
 SRCS=	igmp.c inet.c kern.c mtrace.c
 MAN=	mtrace.8

-.if ${MACHINE_ARCH} == "vax"
-COPTS.mtrace.c=-O0
-.endif
-
 BINMODE=4555
 BINOWN= root

diff --git a/external/gpl3/gcc.old/usr.bin/backend/Makefile b/external/gpl3/gcc.old/usr.bin/backend/Makefile
index d69a26fe619..99e881c783d 100644
--- a/external/gpl3/gcc.old/usr.bin/backend/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/backend/Makefile
@@ -533,68 +533,9 @@ COPTS.insn-recog.c+=-Wno-error

 .if ${GCC_MACHINE_ARCH} == "vax"
 CPPFLAGS+=-I${.CURDIR}/../../lib/libgcc/libgcov/arch/${GCC_MACHINE_ARCH}
-COPTS.builtins.c+=-O0
-COPTS.calls.c+=-O0
-COPTS.convert.c+=-O0
-COPTS.data-streamer-out.c+=-O0
-COPTS.dse.c+=-O0					# XXX port-vax/51967
-COPTS.dwarf2out.c+=-O0
-COPTS.expmed.c+=-O0
-COPTS.expr.c+=-O0 -Wno-error=tautological-compare
-COPTS.fixed-value.c+=-O0
-COPTS.fold-const.c+=-O0
-COPTS.generic-match.c+=-O0
-COPTS.gimple-fold.c+=-O0
-COPTS.gimple-match.c+=-O0
-COPTS.gimple-ssa-strength-reduction.c+=-O0
-COPTS.gimple-ssa-warn-restrict.c+=-O0
-COPTS.gimple.c+=-O0
-COPTS.internal-fn.c+=-O0
-COPTS.lto-streamer-out.c+=-O0
-COPTS.omp-low.c+=-O0
-COPTS.predict.c+=-O0
-COPTS.range-op.cc+=-O0
-COPTS.recog.c+=-O0
-COPTS.sanopt.c+=-O0
-COPTS.stmt.c+=-O0
-COPTS.stor-layout.c+=-O0
-COPTS.targhooks.c+=-O0
-COPTS.tree-affine.c+=-O0
-COPTS.tree-cfg.c+=-O0
-COPTS.tree-data-ref.c+=-O0
-COPTS.tree-eh.c+=-O0
-COPTS.tree-if-conv.c+=-O0
-COPTS.tree-object-size.c+=-O0
-COPTS.tree-parloops.c+=-O0
-COPTS.tree-predcom.c+=-O0
-COPTS.tree-pretty-print.c+=-O0
-COPTS.tree-ssa-alias.c+=-O0
-COPTS.tree-ssa-ccp.c+=-O0
-COPTS.tree-ssa-forwprop.c+=-O0
-COPTS.tree-ssa-loop-ivopts.c+=-O0
-COPTS.tree-ssa-loop-manip.c+=-O0
-COPTS.tree-ssa-loop-niter.c+=-O0
-COPTS.tree-ssa-math-opts.c+=-O0
-COPTS.tree-ssa-phiopt.c+= -O0
-COPTS.tree-ssa-pre.c+=-O0
-COPTS.tree-ssa-reassoc.c+=-O0
-COPTS.tree-ssa-strlen.c+=-O0
-COPTS.tree-ssa-uninit.c+=-O0
-COPTS.tree-ssa.c+=-O0
-COPTS.tree-switch-conversion.c+=-O0
-COPTS.tree-vect-data-refs.c+=-O0
-COPTS.tree-vect-loop-manip.c+=-O0
-COPTS.tree-vect-loop.c+=-O0
-COPTS.tree-vect-patterns.c+=-O0
-COPTS.tree-vect-stmts.c+=-O0
-COPTS.tree-vrp.c+=-O0
-COPTS.tree.c+=-O0
-COPTS.ubsan.c+=-O0
-COPTS.varasm.c+=-O0
-COPTS.vr-values.c+=-O0
-COPTS.web.c+=-O0
-COPTS.wide-int-range.cc+=-O0
-COPTS.wide-int.cc+=-O0
+
+COPTS.expmed.c+=-Wno-error=tautological-compare
+COPTS.expr.c+=-Wno-error=tautological-compare
 .else
 COPTS.tree.c=	${${ACTIVE_CC} == "clang" :? -O0 :}
 .endif
2023-10-07 12:15:49 +00:00
rin 7521c57073 igc(4): Add and hook manpage 2023-10-04 07:51:36 +00:00
riastradh c2966121dc ec2_init: Suppress error message for nonexistent sysctl.
We're querying to see whether the sysctl node is available and if so
what its text is, not interested in the error message.

XXX pullup-10
2023-09-27 00:27:07 +00:00
riastradh bb38adb487 /etc/rc.d/cerctl_init: New script for certctl rehash in live images.
This is very limited -- it does not supplant postinstall to rehash
certificates on upgrade; it only runs certctl rehash if
/etc/openssl/certs is an empty directory, as you get in live images
not created with sysinst.

We could also have a more general-purpose way to run postinstall(8)
on first boot of an image, but that has a lot more moving parts to
think about, so let's start with this limited-scope low-risk
approach.

PR install/57629

XXX pullup-10
2023-09-27 00:24:12 +00:00
riastradh 56c9a6d008 libbozohttpd, libluabozohttpd: Bump major for libssl.so bump.
libluabozohttpd doesn't appear to be installed, but let's bump the
major just in case.

PR lib/57603

XXX pullup-10
2023-09-06 12:44:45 +00:00
mrg 6180177c92 add description & deps for gpu-firmware-base set. 2023-09-05 04:19:04 +00:00
mrg a75f04971b revive the ./usr/libdata/debug/usr/lib/libisns.so.0.0.debug entry
however, remove the 'obsolete' tag from it.

fixes the amd64 build (at least).
2023-09-05 03:41:49 +00:00
riastradh 109b5dd8ca lists: Remove more bogus shlib obsolete entries.
Too much trouble to have to remember about libuv.so, libgmp.so, &c.
Just apply the rule uniformly.

All that's left is test libraries and loadable modules.

Searched with:

git grep 'lib.*\.so\.[0-9][0-9]*.*obsolete' distrib/sets/lists \
| grep -v '/modules/' \
| grep -v '/locale/lib/' \
| grep -v '/lib/npf/' \
| grep -v '/lib/librump' \
| grep -v '/lib/netbsd/libclang_rt' \
| grep -v '/runemodule/'
2023-09-04 21:36:31 +00:00
riastradh b264f9cb2e lists: Remove bogus libfoo.so.N and libfoo.so.N.M obsolete entries.
These must stay around so applications linked against them will still
work after upgrade, even if libfoo.so now points to libfoo.so.(N+1)
or libfoo.so.N.(M+1).

Exceptions:

- I'm willing to believe the rump modules have a different story so I
  left those obsolete entries alone.

- libuv.so was never supposed to be exposed publicly anyway and never
  went out in a release.  (Maybe this information should be recorded
  somewhere?)

- Same is probably true of lib{gmp,mpc,mpfr}.so, not sure of the
  history.  Maybe libg2c.so too, no idea what that is.

- libisns.so was moved from /usr/lib to /lib, so it's legitimate for
  the debug data to live there too now.  (XXX Maybe we should have a
  separate marker for this.)

- Libraries under /usr/tests are not used by normal applications, so
  they can safely be deleted when obsoleted.

Note: The libfoo.so symlink for a library that has been deleted
altogether, not just upgraded, can be obsoleted.  Loadable modules
that applications aren't linked against can be obsoleted, even if
some of them like npf ext_*.so or pam_*.so are formally versioned
(for reasons unclear to me).

Note: This means that incremental builds may complain about these
.so.N and .so.N.M files in destdir (PR misc/57581), but it's much
worse for an upgrade to break working applications.
2023-09-04 19:07:58 +00:00
riastradh 7c01db3805 base, debug: Remove obsolete entries for older libfido2.
The shared libraries need to stay around for applications on upgrade
(and the debug data should be kept too if the shared libraries are
kept).
2023-09-04 18:30:26 +00:00
riastradh 28b5680627 liblutok.so: Bump major for recent Lua update.
XXX pullup-10
2023-09-04 18:16:19 +00:00
riastradh 6847254d0f heimdal/libsl: Belatedly bump major.
This is to address the major bump of libterminfo.so.9 in:

Author: roy <roy@NetBSD.org>
Date:   Fri Mar 13 15:19:24 2020 +0000

    terminfo: promote numeric parameters from short to int

That commit caught all the other dependent libraries except libsl.

XXX pullup-10
2023-09-04 18:16:01 +00:00
riastradh ad69f62aa2 Recursively revbump all dependents of libcrypto.
Otherwise any existing software linked against the openssl11
libcrypto.so.14 and any of these libraries will suddenly start
pulling in libcrypto.so.15 at the same time, leading to mayhem in the
address space.

PR lib/57603

XXX pullup-10
2023-09-04 18:12:44 +00:00
christos 2809a4e9fe sqlite3 changes 2023-09-04 17:07:59 +00:00
riastradh 24bd4d73cb certctl(8): Install certs.conf in /usr/share/examples too.
This way postinstall(8) can refer to the default one when you've done
an upgrade without etcupdate or similar to pull in new config files
from etc.tgz.

Not great -- we should do this systematically for all config files in
/etc, but this one-off hack is less risky for 10.
2023-09-03 18:31:01 +00:00
mrg 6865a1c6a8 mark all previously gcc=9 files as obsolete.
also mark a bunch of obsolete gcc headers as "comp-obsolete" "set".

should fix a 'postinstall fix obsolete' issue reported by uwe@.
2023-08-29 04:35:26 +00:00
riastradh 6ddc4baa00 distrib/sets/lists: certs.conf belongs in etc, not in base.
Oops.
2023-08-28 23:57:17 +00:00
rin f3e013ccfe lists/comp/ad.riscv: Add new ldscripts for mknative to binutils 2023-08-28 02:45:24 +00:00
rillig 23ee83f7c0 c.7: mention that C11 and C17 have been published 2023-08-27 15:50:47 +00:00
kardel 670e774586 make owtemp a module 2023-08-27 13:20:09 +00:00
rillig 92925e854e tests/usr.bin/error: add basic tests for several error message styles 2023-08-26 10:06:16 +00:00
riastradh 427e5e62a8 mozilla-certdata: Connect it up to the build. 2023-08-26 05:58:48 +00:00
riastradh 50a8b41245 certctl(8): New tool for managing OpenSSL CA certificates.
Same command-line syntax as FreeBSD, clearer semantics about which
parts are config and which parts are cache.
2023-08-26 05:27:13 +00:00
christos 62f0fb475e remove compat linux debugging sets (again) 2023-08-22 11:56:49 +00:00
christos a183ba5d34 add inotify tests, sort 2023-08-21 22:37:17 +00:00
martin 9aeda966c7 Remove the compat linux (linux binaries) helpers *.debug files - they
are not installed (and probably would be useless if they were)
2023-08-21 09:54:07 +00:00
riastradh 1b6a62ea92 distrib/sets/lists/tests: Correction: h_inotify_* are MI.
Debug lists are probably still wrong, though -- looks like there's no
rule to change h_inotify_*.out.debug to h_inotify_*.debug.  Out of
energy to look into this further, though; please fix me!
2023-08-20 19:36:56 +00:00
riastradh 81ec9657b4 distrib/sets/lists: /usr/tests/compat/linux/h_* is amd64-only for now. 2023-08-20 12:29:16 +00:00
riastradh f34e29e918 distrib/sets/lists: compat/linux/h_*.debug is amd64-only for now. 2023-08-20 12:27:02 +00:00
riastradh 40998645f7 distrib/sets/lists: Add .debug files for new compat/linux tests. 2023-08-20 12:21:35 +00:00
christos d3de1600b5 Add inotify tests 2023-08-19 22:57:09 +00:00
rjs d7061538b0 More libpcap changes.
There were two entries for /usr/lib/libpcap.so.
2023-08-19 14:22:41 +00:00
christos 6e39f0c06c new libpcap 2023-08-17 15:19:26 +00:00
gdt e8830a70d1 amd64 installimage: Reduce non-xz size slightly to fit 4GB flash drives
The installimage sizes were bumped in 2022 because of some growth, and
the case for not-xz sets went to 4000 (MiB).  That's just over what a
lot of "4 GB" flash drives are, but seems obviously intended to fit.
The actual usage of the filesystem, from a current build from earlier
this year (with non-xz sets) is:

/dev/dk1           3.7G       833M       2.7G  23% /mnt

and similar for netbsd-10 built yesterday, so we can afford to shrink
slightly.  Drop to 3800, which is still huge, but will make 4 GB flash
drives work.
2023-08-14 13:54:05 +00:00
riastradh 96a51c208c base/shl.mi: Tag libasan.so and libubsan.so with gcc like before.
Not in clang builds.  This tag got dropped in the gcc12 update.
2023-08-12 16:44:15 +00:00
christos f2ba6f3161 off-by-one 2023-08-12 12:40:41 +00:00
christos 75fa30741f sets for libfido2-1.13.0 2023-08-11 23:04:29 +00:00
andvar 702a39f5de s/Partititon/Partition/ 2023-08-10 06:38:15 +00:00
pgoyette 910a1677fc at suggestion from phone@ (via irc/icb) make this file depend on
any version of gdb, not just gdb=1100

XXX I really don't know what I'm doing here, so if anyone has a
XXX better idea, go for it.
2023-08-10 04:55:13 +00:00
andvar 2c4d487849 viadrmums(4): build legacy VIA DRM UMS driver module for amd64.
This driver is not built-in by default, thus loadable module can help (un)lucky
owners of 64-bit capable VIA (Nano/Eden) systems or early AMD/Intel systems
with some VIA chipsets, which include VIA integrated graphics.
I also boldly added product IDs for few later models from VX8xx/VX9xx chipsets
without 3D support (DX9_0) to "expand" the driver support to more systems.
Tested successfully basic functionality on VX800, and partially successfully
on VX900 (on VX900 Xorg failed to initialize due to openchrome related issues,
viadrmums attaches and it is by used the driver).
Didn't test on VX855, I don't have one.

Pull up to netbsd-10 is needed.
2023-08-09 09:36:26 +00:00
rin 53d5bb9a8a lists: Fix build with MKGCCCMDS=no && MKDEBUGLIB=yes 2023-08-08 06:22:31 +00:00
rillig 26eb44f64d tests/lint: show that portable mode depends on PTRDIFF_TSPEC
Since 2023.07.08.12.45.43, lint warns in lib/libkvm on i386.
2023-08-07 22:30:38 +00:00
riastradh 7d4d0aa004 distrib/sets/lists: Fix libtsan entries.
- No obsolete .so.N or .so.N.M entries.
- libtsan.so for gcc.
- libtsan.so.1* for gcc=10.
- libtsan.so.2* for gcc=12.
- No libtsan.so.1* on aarch64, libtsan on aarch64 is new in gcc12.
2023-08-07 16:14:31 +00:00
rin 9aaa692e2a lists/m68k: Obsolete gcc-9 headers 2023-08-07 00:47:29 +00:00
rin d54c06a58c lists/aarch64: Obsolete gcc-9 headers 2023-08-07 00:45:47 +00:00
rillig dca1e8c791 tests/lint: document how much of C99 lint already implements 2023-08-06 19:31:06 +00:00
riastradh a6d7a67277 base/md.amd64, base/md.sparc64: Mark openssl compat directories.
Should fix MKCOMPAT=no build.

PR port-amd64/57567
2023-08-05 08:55:48 +00:00
riastradh 3946811d8d comp/mi: /usr/include/g++/bit is gcc-only, not for clang (or pcc) 2023-08-05 08:15:40 +00:00
pgoyette aca2523560 revert debug data for libtsan to previous version, too.
XXX Perhaps this should be done by obsoleting the 2.0 file?  For now
XXX this will require manual cleaning of the no-longer-used 2.0 file.
2023-08-05 03:13:57 +00:00
riastradh 2293c1ba38 t_ubsan, t_ubsanxx: Remove gcc=10, gcc=12 conditionals.
These are built unconditionally.  Should help fix the clang build.
2023-08-04 20:56:08 +00:00
mrg e010c02046 more updates for sets and GCC 12
- renable sanitizer, add new shlib versions, enable tsan for arm64,
  including moving some stuff into the per-cpu/arch dir from 'mi'.
- fix mips64, 68k, and ia64
- mark many any-gcc-version things just as "gcc" and remove dups
- mark many gcc=9 only things as obsolete
- mark many gcc=10 only things as obsolete with gcc=12 (more could
  be done here.)
2023-08-04 08:54:00 +00:00
rillig 0448d06008 lint: make '_Static_assert' only available in C11 or C23 mode 2023-08-03 18:48:42 +00:00
rin 4d0ce6b850 lists: Belatedly catch up with lib*san bump for GCC 12. 2023-08-03 15:07:06 +00:00
rin 72af11dfa3 base/shl.mi: Fix previous for GCC10... 2023-08-03 14:14:29 +00:00
rin 2a820cdb46 Fix lists for HAVE_GCC=12. 2023-08-03 13:13:04 +00:00
nia 5f926429a0 mark obsolete, don't remove from setlist 2023-08-03 12:30:25 +00:00
nia e6ea867424 Revert addition of epoll to libc until discussion concludes 2023-08-03 12:24:46 +00:00
martin c612895bbd Bump libc minor here too 2023-08-02 12:12:52 +00:00
christos b515b5959a Add companion mempcpy to wmempcpy, bump. 2023-08-01 17:51:24 +00:00
mrg 2a5ef6b72e various updates for GCC 12
- bump some shlibs
- add new header files
- add compiler-version header files
- disable sanitizer libraries for gcc12 for now
2023-08-01 06:35:55 +00:00