DragonFlyBSD/src 9b3eb08sys/net/disc Makefile

disc(4): Remove the obsolete NBPF from makefile
DeltaFile
+0-2sys/net/disc/Makefile
+0-21 files

DragonFlyBSD/src 1d4437cgnu/lib/gcc120/libstdcxx/components/libconv_2011 Makefile

gcc120: Remove unneeded 'supcxx' group from libstdcxx/libconv_2011

The '-I${SRCDIR}/libsupc++' parameter is already added via
libstdcxx/Makefile.inc, so the 'supcxx' flags group is not needed.
DeltaFile
+1-3gnu/lib/gcc120/libstdcxx/components/libconv_2011/Makefile
+1-31 files

DragonFlyBSD/src efd7ab5sys/conf kmod.mk

kmod.mk: Remove redundant '-fno-omit-frame-pointer' CFLAGS

This flag is already added by platform/{pc64,vkernel64}/conf/kern.mk, so
no need to add it again.
DeltaFile
+0-3sys/conf/kmod.mk
+0-31 files

DragonFlyBSD/src c12d112sys/dev/drm/amd/amdgpu Makefile

amdgpu: Improve makefile for sources that require double floats

* Use a '.for' loop expression to reduce duplicate.
* Remove the unported/unavailable sources: dcn20_resource.o,
  dcn21_resource.o
* Remove the unneeded '-mpreferred-stack-boundary=4' compiler flag,
  which is the default on x86_64.  (Linux's amdgpu requires this because
  the kernel sets '-mpreferred-stack-boundary=3' as the global default.)
* Add '-msse2' to enable SSE2 and thus better generate double precision
  FP instructions. [1][2]

[1] drm/amd/display: readd -msse2 to prevent Clang from emitting
    libcalls to undefined SW FP routines
    https://github.com/torvalds/linux/commit/0f0727d971f6fdf8f1077180d495ddb9928f0c8b
[2] drm/amdgpu: enable -msse2 for GCC 7.1+ users
    https://github.com/torvalds/linux/commit/e8a170ff9a3576730e43c0dbdd27b7cd3dc56848
DeltaFile
+8-20sys/dev/drm/amd/amdgpu/Makefile
+8-201 files

DragonFlyBSD/src 8363c80sys/platform/pc64/conf kern.mk, sys/platform/vkernel64/conf kern.mk

kern.mk: Simplify and improve FPU/SIMD compiler flags

* Simplify and modernize the global kernel compiler flags for disabling
  FPU/SIMD to be:

      -mno-mmx -mno-sse -msoft-float -mno-fp-ret-in-387

  while the various -mno-* flags are removed as they are already implied
  by the above flags.  This reduces maintenance burden and is similarly
  adopted by FreeBSD and Linux kernel.

* Drop '-mfpmath=387' to allow the compiler to choose the 'sse' backend
  when SSE/SSE2 is explicitly enabled. (further explained below for
  amdgpu sources)

* Also remove the redundant '-mpreferred-stack-boundary=4' option, which
  is the default on x86_64.

To validate correctness, all kernel objects were rebuilt and compared

    [23 lines not shown]
DeltaFile
+17-27sys/platform/pc64/conf/kern.mk
+12-12sys/platform/vkernel64/conf/kern.mk
+29-392 files

DragonFlyBSD/src 06c5892sys/cpu/x86_64/include cpufunc.h, sys/platform/pc64/x86_64 npx.c

pc64: Replace SMSW/LMSW with MOV CR0

The SMSW and LMSW instructions are deprecated and provided for
compatibility with 80286.

Intel SDM Volume 2 Section 4.3:
> This instruction is provided for compatibility with the Intel 286
> processor; programs and procedures intended to run on IA-32 and Intel
> 64 processors beginning with Intel386 processors should use the MOV
> (control registers) instruction to load the whole CR0 register.

Obtained-from: FreeBSD (commit d706ec297a60775e242168eecbb5160cc692c9a6)
Discussed-with: dillon
DeltaFile
+4-3sys/platform/pc64/x86_64/npx.c
+6-0sys/cpu/x86_64/include/cpufunc.h
+10-32 files

DragonFlyBSD/src ae45ae8gnu/usr.bin/cc80/libbackend Makefile

gcc80: Remove legacy CXXFLAGS adjustment in libbackend for GCC 4.7
DeltaFile
+0-5gnu/usr.bin/cc80/libbackend/Makefile
+0-51 files

DragonFlyBSD/src 078e02ainitrd/rescue.libcrypto Makefile

initrd: Add fsck_hammer2(8) to rescue.libcrypto
DeltaFile
+1-0initrd/rescue.libcrypto/Makefile
+1-01 files

DragonFlyBSD/src ab0d5a4sys/platform/vkernel64/include acpica_machdep.h

Fix the VKERNEL64 build.

ACPI plays no role in the vkernel, so just add a <machine/acpica_machdep.h>
for it (copied from pc64).

Reported-by: aly
DeltaFile
+53-0sys/platform/vkernel64/include/acpica_machdep.h
+53-01 files

DragonFlyBSD/src 99f5e86sys/kern tty_cons.c

kernel: Fix a wrong comment for caps_priv_check_self() in cnopen()

While there, trim trailing whitespaces.
DeltaFile
+6-6sys/kern/tty_cons.c
+6-61 files

DragonFlyBSD/src 9839bce. Makefile_upgrade.inc

Remove obsolete <sys/priv.h>

It was removed in commit 2b3f93ea6d1f70880f3e87f3c2cbe0dc0bfc9332.
DeltaFile
+1-0Makefile_upgrade.inc
+1-01 files

DragonFlyBSD/src 8e1fcacsys/dev/misc/syscons syscons.c

kernel - Fix console access by non-root

* Fix console access via /dev/tty or /dev/ttyv* via a user login,
  when logged in as that user.

  The priv check was only allowing root access and needed a flag to
  also allow matching users access.

* Note that console access from a restricted root "root" user such
  as from a jail is not allowed (intentionally), because console ioctls
  can be dangerous.

Reported-by: aly, peeterm
DeltaFile
+7-2sys/dev/misc/syscons/syscons.c
+7-21 files

DragonFlyBSD/src 9e5be63sbin/fsck_hammer2 test.c

fsck_hammer2 - Print recursion stack with error message

* Print the full blockref spec (that can be used in a "hammer2 show")

* Print the recursion stack leading up to and including the error block.

* Errored blocks and stack are printed without needing any -d options.
  Note that two -d opts will dump the full stack during the scan, which
  could end up being terrabytes of text so... maybe don't do that.
DeltaFile
+115-45sbin/fsck_hammer2/test.c
+115-451 files

DragonFlyBSD/src 7aa11e7etc Makefile

etc/Makefile: Skip directories in 'check-deprecated-files'

Skip directories so we don't list the directories containing the
deprecated files in the end.

For example, the line `/usr/lib/gcc47 is deprecated` will not appear
after this change:
```
===> Checking for deprecated files
     (harmless ELF linker warnings may appear here)
/lib/libprivate_crypto.so.45 is deprecated
/lib/libprivate_crypto.so.46 is deprecated
/lib/libprivate_ssl.so.47 is deprecated
/lib/libprivate_ssl.so.48 is deprecated
/usr/lib/gcc47/libgomp.so.1 is deprecated
/usr/lib/gcc47/libssp.so.0 is deprecated
/usr/lib/gcc47/libstdc++.so.9 is deprecated
/usr/lib/gcc47 is deprecated
==================================================================

    [2 lines not shown]
DeltaFile
+1-1etc/Makefile
+1-11 files

DragonFlyBSD/src 7b6e195lib/liblzma config.h, usr.bin/xz config.h

gcc47: Remove obsolete HAVE_IMMINTRIN_H change for liblzma/xz
DeltaFile
+0-3lib/liblzma/config.h
+0-3usr.bin/xz/config.h
+0-62 files

DragonFlyBSD/src adff8c1contrib/gcc-4.7/gcc dwarf2out.c, contrib/gcc-4.7/gcc/config/i386 i386.c

gcc47: Remove source files
DeltaFile
+0-39,132contrib/gcc-4.7/gcc/config/i386/i386.c
+0-27,432contrib/gcc-4.7/gcc/cp/parser.c
+0-22,881contrib/gcc-4.7/gcc/dwarf2out.c
+0-20,374contrib/gcc-4.7/gcc/cp/pt.c
+0-20,014contrib/gcc-4.7/gcc/doc/invoke.texi
+0-18,800contrib/gcc-4.7/gcc/doc/gcc.1
+0-148,6332,110 files not shown
+0-1,737,5902,116 files

DragonFlyBSD/src 0f44b32etc/defaults make.conf, share/man/man5 make.conf.5

gcc47: Clean up makefiles after removal
DeltaFile
+0-107share/mk/bsd.cpu.gcc47.mk
+2-10share/mk/bsd.sys.mk
+3-4share/man/man5/make.conf.5
+2-2etc/defaults/make.conf
+0-3share/mk/sys.mk
+1-1sys/conf/kmod.mk
+8-1275 files not shown
+10-13211 files

DragonFlyBSD/src 9ad47edgnu/lib/gcc47/libstdc++ config.h libstdc++-symbols.ver, gnu/usr.bin/cc47/cc_prep auto-host.h

gcc47: Unhook build and remove makefiles

We had been keeping GCC 4.7.4 for a long time because it's the last GCC
that was written in pure C and thus can be bootstrapped with a C
compiler.  However, GCC 4.7.4 only has experimental C++11 support, so
it's unable to compile the newly imported GCC 12.5.

There are too many missing pieces in GCC 4.7.4 for it to be able to
compile GCC 12.5.  A more feasible method would be to patch GCC 12.5
sources to avoid the unsupported C++11 features.  Even we could tweak
the GCC 12.5 source to make it compilable by GCC 4.7.4, it's a big
burden to maintain it and to import a newer GCC like 14.x/15.x.

In conclusion, there is really no much point in keeping GCC 4.7.4
anymore given that it cannot build the world now.

Discussed-with: swildner
DeltaFile
+0-2,036gnu/usr.bin/cc47/cc_prep/auto-host.h
+0-1,207gnu/lib/gcc47/libstdc++/config.h
+0-1,078gnu/lib/gcc47/libstdc++/libstdc++-symbols.ver
+0-721gnu/lib/gcc47/libstdc++/Makefile.headers
+0-497gnu/usr.bin/cc47/cc_tools/libiberty/config.h
+0-497gnu/usr.bin/cc47/libiberty/config.h
+0-6,03658 files not shown
+34-9,86064 files

DragonFlyBSD/src c3b81f5gnu/usr.bin/cc80/drivers/c++ Makefile, gnu/usr.bin/cc80/drivers/cc Makefile

gcc80: Add MKDEPCC=${CXX} for drivers/{c++,cc,cpp,gcov}

The four drivers define ${SRCS} of .c files but actually use/require a
C++ compiler to compile them, so add MKDEPCC=${CXX} to ensure "mkdep"
working correctly for future-proof.

Meanwhile, add the 'hack to force c++ compiler' comment to libcommon and
libcommon-target makefiles as they're already doing so.

Suggested-by: swildner
DeltaFile
+1-0gnu/usr.bin/cc80/drivers/c++/Makefile
+1-0gnu/usr.bin/cc80/drivers/cc/Makefile
+1-0gnu/usr.bin/cc80/drivers/cpp/Makefile
+1-0gnu/usr.bin/cc80/drivers/gcov/Makefile
+1-0gnu/usr.bin/cc80/support-libs/libcommon-target/Makefile
+1-0gnu/usr.bin/cc80/support-libs/libcommon/Makefile
+6-06 files

DragonFlyBSD/src 1f4419elib/libz Makefile.stand

libz: Trim unneeded sources for libstand

The deflate.c and infback.c sources are not used by libstand.
DeltaFile
+1-2lib/libz/Makefile.stand
+1-21 files

DragonFlyBSD/src 353d275stand/lib gzipfs.c

stand: Fix zf_open() by providing 'zalloc' and 'zfree' hooks

When Z_SOLO is defined, zlib is built for a standalone environment,
where there is no host memory management, so the caller must provides
the 'zalloc' and 'zfree' hooks.  Otherwise, inflateInit2() would return
-2 (Z_STREAM_ERROR).

This fixes the failure of booting into rescue mode because loader failed
to decompress 'initrd.img.gz':
```
zf_open: inflateInit returned -2 : (null)
Unable to load /kernel/initrd.img
```
DeltaFile
+16-0stand/lib/gzipfs.c
+16-01 files

DragonFlyBSD/src cc984b7gnu/lib/gcc120/libstdcxx/product Makefile

gcc120: Adjust LDADD and add DPADD for libstdcxx/product

* Adjust LDADD to move '-lm' out of --whole-archive scope, aligning with
  the GCC's own Makefile rules.
* Add DPADD to define the necessary library dependencies.
DeltaFile
+3-2gnu/lib/gcc120/libstdcxx/product/Makefile
+3-21 files

DragonFlyBSD/src c15a212gnu/lib/gcc120/libstdcxx/headers Makefile

gcc120: Add '.ORDER' to fix race in libstdcxx/headers

Add '.ORDER' rules to create directories before generating the header
files.  I observed the race failure on my 3700X desktop with -j16.
DeltaFile
+2-0gnu/lib/gcc120/libstdcxx/headers/Makefile
+2-01 files

DragonFlyBSD/src b787bbdshare/mk bsd.lib.mk sys.mk

share/mk: Allow per-group flags to override default compile flags

Per-group flags support was introduced in commit
6d68f83fef807ce255df27c2482db0d58ff71744, but the per-group flags (i.e.,
${${_FG}_FLAGS} and ${_${.IMPSRC}_FLAGS}) were listed *before* the
default/common compile flags (e.g., ${CFLAGS}).  As a result, there was
no way for per-group flags to override the default compile flags, which
was counter-intuitive and made the feature less useful.

This commit splits the per-group flags into '-I' flags and non-'-I'
flags, and reorders the non-'-I' flags *after* the default compile flags,
allowing them to be overridden on a per-group basis as needed.

An immediate beneficiary will be gnu/lib/gccXX/libstdcxx, which requires
multiple file groups to override the default compile flags.
DeltaFile
+36-22share/mk/bsd.lib.mk
+32-17share/mk/sys.mk
+6-3share/mk/bsd.dep.mk
+4-2share/mk/bsd.hostlib.mk
+78-444 files

DragonFlyBSD/src 6ecd44fgnu/lib/gcc120/libstdcxx/components/libconv_supc Makefile

gcc120: Clean up libstdcxx/libconv_supc's Makefile

The 'gnu11', 'gnu14', and 'gnu1z' flags groups were inherited from gcc80
and are not needed for gcc120, so just remove them.
DeltaFile
+3-14gnu/lib/gcc120/libstdcxx/components/libconv_supc/Makefile
+3-141 files

DragonFlyBSD/src 4db9efagnu/lib/gcc120/libstdcxx/components/libconv_1998 Makefile, gnu/lib/gcc120/libstdcxx/components/libconv_2011 Makefile

gcc120: Simplify libstdcxx makefiles

With the last commit allowing the per-group flags to override the
default flags, the libstdcxx makefiles can be simplified a lot.
DeltaFile
+12-23gnu/lib/gcc120/libstdcxx/components/libconv_2011/Makefile
+9-24gnu/lib/gcc120/libstdcxx/components/libconv_1998/Makefile
+2-4gnu/lib/gcc120/libstdcxx/product/Makefile
+23-513 files

DragonFlyBSD/src ab2fa88gnu/lib/gcc80/libstdcxx/product Makefile

gcc80: Fix libstdcxx/product/Makefile similar to gcc120's

Similar to the same adjustments to gcc120's, apply the same LDADD and
DPADD changes to gcc80's libstdcxx/product/Makefile.  In addition,
remove the unused ARADD, because we're using custom AR script to create
the static archive.
DeltaFile
+3-3gnu/lib/gcc80/libstdcxx/product/Makefile
+3-31 files

DragonFlyBSD/src 1289cdacontrib/gcc-8.0/gcc symbol-summary.h, contrib/gcc-8.0/gcc/cp cfns.h

Merge branch 'vendor/GCC80'
DeltaFile
+18-18contrib/gcc-8.0/gcc/cp/cfns.h
+2-2contrib/gcc-8.0/gcc/symbol-summary.h
+20-202 files

DragonFlyBSD/src 1095058contrib/gcc-8.0/gcc symbol-summary.h, contrib/gcc-8.0/gcc/cp cfns.h

vendor/GCC80: Bring in two fixes from upstream.

These fix -Wmissing-template-keyword and -Wregister warnings we were
getting when building gcc-8.3 with gcc-12.5.

commit 642dc602f89b2c11d5d833a52f37b04427a27cab
Author: Marek Polacek <polacek at redhat.com>
Date:   Fri May 15 17:54:05 2020 -0400

    c++: Regenerate cp/cfns.h.

    Current cfns.h includes register-qualified variables and that wouldn't
    play well when bootstrapping with GCC that uses the C++17 dialect,
    because 'register' was removed in C++17.  Regenerating it using the
    command specified in cfns.h luckily cleaned this up.

            * cfns.h: Regenerated.

commit fccd5b48adf568f0aabe5d5f51206a9d42da095a

    [12 lines not shown]
DeltaFile
+18-18contrib/gcc-8.0/gcc/cp/cfns.h
+2-2contrib/gcc-8.0/gcc/symbol-summary.h
+20-202 files

DragonFlyBSD/src 9245b09libexec/ftpd ftpd.c

Fix the two -Wdangling-pointer warnings in world.

Move line[] to function scope.

-Wdangling-pointer was introduced in GCC 12 and is part of -Wall.

Taken-from: FreeBSD
DeltaFile
+5-4libexec/ftpd/ftpd.c
+5-41 files