libz: Override z_off_t to 'long' to fix bootloader linking
zlib v1.3.2 changed 'z_off_t' from 'long' to 'long long', which is
always 64bit even on i386. As a result, the built libstand32.a
depended on libgcc to provide 64-bit operations, e.g., '__moddi3', and
thus the bootloader failed to link with errors like:
```
/usr/obj/home/jenkins/workspace/DragonFlyBSD/ctools_x86_64_x86_64/usr/libexec/binutils234/elf/ld.bfd: /usr/obj/home/jenkins/workspace/DragonFlyBSD/world_x86_64/home/jenkins/workspace/DragonFlyBSD/stand/boot/pc32/loader/../../libstand32/libstand32.a(adler32.o): in function `adler32_combine_':
adler32.c:(.text+0x22): undefined reference to `__moddi3'
collect2: error: ld returned 1 exit status
```
Fix this problem by overriding 'z_off_t' to 'long' for libstand32.
vendor/ZLIB: Upgrade from 1.3.1 to 1.3.2
Version 1.3.2 (released on 2026-02-17) has these key updates from 1.3.1:
* Address findings of the 7ASecurity audit of zlib.
- Check for negative lengths in crc32_combine functions.
- Copy only the initialized window contents in inflateCopy.
- Prevent the use of insecure functions without an explicit request.
- Add compressBound_z and deflateBound_z functions for large values.
- Use atomics to build inflate fixed tables once.
- Add --undefined option to ./configure for UBSan checker.
- Copy only the initialized deflate state in deflateCopy.
- Zero inflate state on allocation.
- Add compress_z and uncompress_z functions.
* Complete rewrite of cmake support.
* Remove untgz from contrib.
* Vectorize the CRC-32 calculation on the s390x.
* Remove vstudio projects in lieu of cmake-generated projects.
* Add zipAlreadyThere() to minizip zip.c to help avoid duplicates.
[5 lines not shown]
gencat(1): Specially handle "/dev/stdin" to not require devfs
gencat(1) is a bootstrap tool, so dealing with "/dev/stdin" specially
makes it work within a chroot without devfs.
After this change, building and installing the source now work inside a
chroot that does not mount devfs.
While there, minor whitespace cleanups, and remove a legacy ex modeline.
vi(1): Several improvements to catalog/Makefile
* Chain gencat command with '&&' to catch partial failure.
* Remove empty 'buildfiles'.
* Remove erroneous 'FILESFROUPS'.
* Use ${.TARGET} wherever possible.
* Use 'grep -q' instead of redirecting to /dev/null.
* Fix 'egrep' to 'grep -w'.
* Adjust ${CHK} to base on ${CAT} so all the catalogs are checked.
* Minor comment and style tweaks.
vi(1): Fix "make check" for catalog
* The "check" target was creating the wrong output files and that caused
it to fail because the output files were read-only (chmod 444). Fix
the "check" target to use ${.TARGET} as the correct output files.
Also remove the unnecessary chmod.
* Adjust the rules to use 'LC_ALL' instead of 'LANG', as the 'LC_ALL'
can override all the locale settings.
* Fix "check" target to export 'LC_ALL' at the beginning, and thus
fix the following 'sed' errors:
```
... french
sed: RE error: Illegal byte sequence
sed: RE error: Illegal byte sequence
... german
sed: RE error: Illegal byte sequence
[20 lines not shown]
stand: Generate boot2_{32,64}.ldr without using /dev/zero
Use 'awk' instead of 'dd' to generate the 512-byte zero-filled files.
This avoids the '/dev/zero' dependency and helps build the world in a
chroot environment without mounting '/dev'.
net: Fix build for custom kernel without loop interface
This is a follow-up fix to my previous commit
951ecd7f55e2edd33258ad6d9593c9f81c92b42e.
Tested with building the MINI64 kernel config.
Reported-by: swildner
cc80,cc120: Adjust -Wno-narrowing for GCC >= 8.0
Add the necessary check for cc80 libraries so that GCC 12 succeeds in
building GCC 8.
Meanwhile, improve the GCC check to check for any GCC version >= 8.0.
gcc120: Skip installing the headers for plugin development
The list of headers to install and the b-header-vars file are hard to
generate from vendor makefiles and require manual creation from a staged
GCC installation.
Given that these files are only needed for developing GCC plugins
instead of running them, so just skip installing them in the base
system.
One more thing, the 'gengtype' tool should be installed (into
/usr/libexec/gcc120/plugin/) together with these headers for plugin
development.
gcc120: Rework the makefiles to fix issues and ease future upgrades
* Remove many obsolete comments copied from gcc80's makefiles.
* Remove the unneeded 'Makefile.intcxx_lib' because all the C++ files
have been renamed to use the proper .cc suffix so we can simply use
the <bsd.hostlib.mk> makefile.
* Rework libgcc's makefiles. Rewrite the libgcc/Makefile.src to
follow the processes in GCC's makefile as much as possible. Now the
libgcc is built with the same source list as in the GCC's makefile.
* Fix and rework libstdcxx's makefiles.
- Refactor headers/Makefile.headers to reduce the difference with
GCC's makefile.
- Add libconv_2017 and libconv_2020.
- Fix headers preparation and enable '-nostdinc++' for building the
component and product libraries. As a result, use FILESGROUPS
[21 lines not shown]
gcc120: Add makefiles based on gcc80
Based on the makefiles for gcc 8.3, by way of 9.5, 10.5, and 11.5
GCC 12.5 has added:
* a new library "libcody"
* a new place for compiler-related tools "c++tools"
* the static analyzer "gcc/analyzer"
Also, all (C++) '.c' files in gcc/ have been renamed to '.cc'.